Commit 5e442de3 authored by joerg@trift2's avatar joerg@trift2

Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1

into  trift2.:/M41/push-4.1
parents d8151b63 b7cf8cef
...@@ -468,6 +468,10 @@ SOURCE=..\sql\sql_load.cpp ...@@ -468,6 +468,10 @@ SOURCE=..\sql\sql_load.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\sql\sql_locale.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_manager.cpp SOURCE=..\sql\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -2945,6 +2945,42 @@ ...@@ -2945,6 +2945,42 @@
PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commercial;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/> PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commercial;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="..\sql\sql_locale.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commercial;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
</FileConfiguration>
</File>
<File <File
RelativePath="..\sql\sql_manager.cpp"> RelativePath="..\sql\sql_manager.cpp">
<FileConfiguration <FileConfiguration
......
...@@ -450,6 +450,10 @@ SOURCE=..\sql\sql_load.cpp ...@@ -450,6 +450,10 @@ SOURCE=..\sql\sql_load.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\sql\sql_locale.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_manager.cpp SOURCE=..\sql\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -365,6 +365,10 @@ SOURCE=..\sql\sql_list.cpp ...@@ -365,6 +365,10 @@ SOURCE=..\sql\sql_list.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\sql\sql_locale.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_manager.cpp SOURCE=..\sql\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -2233,6 +2233,42 @@ ...@@ -2233,6 +2233,42 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="..\sql\sql_locale.cpp">
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="..\sql\sql_manager.cpp"> RelativePath="..\sql\sql_manager.cpp">
<FileConfiguration <FileConfiguration
......
...@@ -365,6 +365,10 @@ SOURCE=..\sql\sql_list.cpp ...@@ -365,6 +365,10 @@ SOURCE=..\sql\sql_list.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\sql\sql_locale.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_manager.cpp SOURCE=..\sql\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -1610,6 +1610,10 @@ SOURCE=.\sql_load.cpp ...@@ -1610,6 +1610,10 @@ SOURCE=.\sql_load.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\sql\sql_locale.cpp
# End Source File
# Begin Source File
SOURCE=.\sql_manager.cpp SOURCE=.\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -6083,6 +6083,82 @@ ...@@ -6083,6 +6083,82 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="sql_locale.cpp">
<FileConfiguration
Name="classic nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="sql_manager.cpp"> RelativePath="sql_manager.cpp">
<FileConfiguration <FileConfiguration
......
...@@ -1607,6 +1607,10 @@ SOURCE=.\sql_load.cpp ...@@ -1607,6 +1607,10 @@ SOURCE=.\sql_load.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\sql_locale.cpp
# End Source File
# Begin Source File
SOURCE=.\sql_manager.cpp SOURCE=.\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -789,6 +789,22 @@ SOURCE=.\sql_load.cpp ...@@ -789,6 +789,22 @@ SOURCE=.\sql_load.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\sql_locale.cpp
!IF "$(CFG)" == "mysqldmax - Win32 Release"
!ELSEIF "$(CFG)" == "mysqldmax - Win32 Debug"
# ADD CPP /G5
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "mysqldmax - Win32 nt"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\sql_manager.cpp SOURCE=.\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -1195,6 +1195,31 @@ SOURCE=.\sql_load.cpp ...@@ -1195,6 +1195,31 @@ SOURCE=.\sql_load.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\sql_locale.cpp
!IF "$(CFG)" == "mysqldmax - Win32 Release"
!ELSEIF "$(CFG)" == "mysqldmax - Win32 Debug"
# ADD CPP /G5 /Od
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "mysqldmax - Win32 nt"
!ELSEIF "$(CFG)" == "mysqldmax - WinIA64 Release"
!ELSEIF "$(CFG)" == "mysqldmax - WinIA64 Debug"
# ADD CPP /G5 /Od /G2 /EHsc /D"_IA64_" /Zi /D"WIN64" /D"WIN32" /D"_AFX_NO_DAO_SUPPORT" /Wp64 /Zm600
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "mysqldmax - WinIA64 nt"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\sql_manager.cpp SOURCE=.\sql_manager.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -3680,7 +3680,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs) ...@@ -3680,7 +3680,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs)
error= 2; error= 2;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int4store(ptr,tmp); int4store(ptr,tmp);
} }
...@@ -3738,7 +3738,7 @@ int Field_timestamp::store(longlong nr) ...@@ -3738,7 +3738,7 @@ int Field_timestamp::store(longlong nr)
nr, MYSQL_TIMESTAMP_DATETIME, 1); nr, MYSQL_TIMESTAMP_DATETIME, 1);
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int4store(ptr,timestamp); int4store(ptr,timestamp);
} }
...@@ -3762,7 +3762,7 @@ longlong Field_timestamp::val_int(void) ...@@ -3762,7 +3762,7 @@ longlong Field_timestamp::val_int(void)
THD *thd= table->in_use; THD *thd= table->in_use;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
temp=uint4korr(ptr); temp=uint4korr(ptr);
else else
#endif #endif
...@@ -3792,7 +3792,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr) ...@@ -3792,7 +3792,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr)
val_buffer->length(field_length); val_buffer->length(field_length);
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
temp=uint4korr(ptr); temp=uint4korr(ptr);
else else
#endif #endif
...@@ -3857,7 +3857,7 @@ bool Field_timestamp::get_date(TIME *ltime, uint fuzzydate) ...@@ -3857,7 +3857,7 @@ bool Field_timestamp::get_date(TIME *ltime, uint fuzzydate)
long temp; long temp;
THD *thd= table->in_use; THD *thd= table->in_use;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
temp=uint4korr(ptr); temp=uint4korr(ptr);
else else
#endif #endif
...@@ -3894,7 +3894,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr) ...@@ -3894,7 +3894,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr)
{ {
int32 a,b; int32 a,b;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
a=sint4korr(a_ptr); a=sint4korr(a_ptr);
b=sint4korr(b_ptr); b=sint4korr(b_ptr);
...@@ -3912,7 +3912,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr) ...@@ -3912,7 +3912,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr)
void Field_timestamp::sort_string(char *to,uint length __attribute__((unused))) void Field_timestamp::sort_string(char *to,uint length __attribute__((unused)))
{ {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (!table->db_low_byte_first) if (!table || !table->db_low_byte_first)
{ {
to[0] = ptr[0]; to[0] = ptr[0];
to[1] = ptr[1]; to[1] = ptr[1];
...@@ -3941,7 +3941,7 @@ void Field_timestamp::set_time() ...@@ -3941,7 +3941,7 @@ void Field_timestamp::set_time()
long tmp= (long) table->in_use->query_start(); long tmp= (long) table->in_use->query_start();
set_notnull(); set_notnull();
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int4store(ptr,tmp); int4store(ptr,tmp);
} }
...@@ -4329,7 +4329,7 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs) ...@@ -4329,7 +4329,7 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs)
from, len, MYSQL_TIMESTAMP_DATE, 1); from, len, MYSQL_TIMESTAMP_DATE, 1);
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int4store(ptr,tmp); int4store(ptr,tmp);
} }
...@@ -4357,7 +4357,7 @@ int Field_date::store(double nr) ...@@ -4357,7 +4357,7 @@ int Field_date::store(double nr)
else else
tmp=(long) rint(nr); tmp=(long) rint(nr);
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int4store(ptr,tmp); int4store(ptr,tmp);
} }
...@@ -4385,7 +4385,7 @@ int Field_date::store(longlong nr) ...@@ -4385,7 +4385,7 @@ int Field_date::store(longlong nr)
else else
tmp=(long) nr; tmp=(long) nr;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int4store(ptr,tmp); int4store(ptr,tmp);
} }
...@@ -4411,7 +4411,7 @@ double Field_date::val_real(void) ...@@ -4411,7 +4411,7 @@ double Field_date::val_real(void)
{ {
int32 j; int32 j;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
j=sint4korr(ptr); j=sint4korr(ptr);
else else
#endif #endif
...@@ -4423,7 +4423,7 @@ longlong Field_date::val_int(void) ...@@ -4423,7 +4423,7 @@ longlong Field_date::val_int(void)
{ {
int32 j; int32 j;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
j=sint4korr(ptr); j=sint4korr(ptr);
else else
#endif #endif
...@@ -4438,7 +4438,7 @@ String *Field_date::val_str(String *val_buffer, ...@@ -4438,7 +4438,7 @@ String *Field_date::val_str(String *val_buffer,
val_buffer->alloc(field_length); val_buffer->alloc(field_length);
int32 tmp; int32 tmp;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
tmp=sint4korr(ptr); tmp=sint4korr(ptr);
else else
#endif #endif
...@@ -4456,7 +4456,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr) ...@@ -4456,7 +4456,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr)
{ {
int32 a,b; int32 a,b;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
a=sint4korr(a_ptr); a=sint4korr(a_ptr);
b=sint4korr(b_ptr); b=sint4korr(b_ptr);
...@@ -4474,7 +4474,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr) ...@@ -4474,7 +4474,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr)
void Field_date::sort_string(char *to,uint length __attribute__((unused))) void Field_date::sort_string(char *to,uint length __attribute__((unused)))
{ {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (!table->db_low_byte_first) if (!table || !table->db_low_byte_first)
{ {
to[0] = ptr[0]; to[0] = ptr[0];
to[1] = ptr[1]; to[1] = ptr[1];
...@@ -4698,7 +4698,7 @@ int Field_datetime::store(const char *from,uint len,CHARSET_INFO *cs) ...@@ -4698,7 +4698,7 @@ int Field_datetime::store(const char *from,uint len,CHARSET_INFO *cs)
from, len, MYSQL_TIMESTAMP_DATETIME, 1); from, len, MYSQL_TIMESTAMP_DATETIME, 1);
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int8store(ptr,tmp); int8store(ptr,tmp);
} }
...@@ -4739,7 +4739,7 @@ int Field_datetime::store(longlong nr) ...@@ -4739,7 +4739,7 @@ int Field_datetime::store(longlong nr)
MYSQL_TIMESTAMP_DATETIME, 1); MYSQL_TIMESTAMP_DATETIME, 1);
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int8store(ptr,nr); int8store(ptr,nr);
} }
...@@ -4766,7 +4766,7 @@ void Field_datetime::store_time(TIME *ltime,timestamp_type type) ...@@ -4766,7 +4766,7 @@ void Field_datetime::store_time(TIME *ltime,timestamp_type type)
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED, 1); set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED, 1);
} }
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
int8store(ptr,tmp); int8store(ptr,tmp);
} }
...@@ -4792,7 +4792,7 @@ longlong Field_datetime::val_int(void) ...@@ -4792,7 +4792,7 @@ longlong Field_datetime::val_int(void)
{ {
longlong j; longlong j;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
j=sint8korr(ptr); j=sint8korr(ptr);
else else
#endif #endif
...@@ -4812,7 +4812,7 @@ String *Field_datetime::val_str(String *val_buffer, ...@@ -4812,7 +4812,7 @@ String *Field_datetime::val_str(String *val_buffer,
int part3; int part3;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
tmp=sint8korr(ptr); tmp=sint8korr(ptr);
else else
#endif #endif
...@@ -4877,7 +4877,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr) ...@@ -4877,7 +4877,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr)
{ {
longlong a,b; longlong a,b;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
{ {
a=sint8korr(a_ptr); a=sint8korr(a_ptr);
b=sint8korr(b_ptr); b=sint8korr(b_ptr);
...@@ -4895,7 +4895,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr) ...@@ -4895,7 +4895,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr)
void Field_datetime::sort_string(char *to,uint length __attribute__((unused))) void Field_datetime::sort_string(char *to,uint length __attribute__((unused)))
{ {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (!table->db_low_byte_first) if (!table || !table->db_low_byte_first)
{ {
to[0] = ptr[0]; to[0] = ptr[0];
to[1] = ptr[1]; to[1] = ptr[1];
......
...@@ -713,7 +713,7 @@ class Field_timestamp :public Field_str { ...@@ -713,7 +713,7 @@ class Field_timestamp :public Field_str {
if ((*null_value= is_null())) if ((*null_value= is_null()))
return 0; return 0;
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
if (table->db_low_byte_first) if (table && table->db_low_byte_first)
return sint4korr(ptr); return sint4korr(ptr);
#endif #endif
long tmp; long tmp;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
*/ */
#include <my_global.h> /* Includes errno.h */ #include <my_base.h> /* Includes errno.h */
#include <m_ctype.h> #include <m_ctype.h>
#define MAX_DBL_EXP 308 #define MAX_DBL_EXP 308
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment