diff options
author | unknown <joerg@trift2.> | 2006-07-24 19:18:30 +0200 |
---|---|---|
committer | unknown <joerg@trift2.> | 2006-07-24 19:18:30 +0200 |
commit | 75220954bfca4b5ca706a4f9e4de305e726bbb60 (patch) | |
tree | fe85d256fc5c397701b9b2ff9ddc953295645011 /sql | |
parent | 9d5b76eba92c48758a2d6df9159cf89ed187993c (diff) | |
parent | d7c0c66706aa1ac6d779823f0949e9623472f742 (diff) | |
download | mariadb-git-75220954bfca4b5ca706a4f9e4de305e726bbb60.tar.gz |
Merge trift2.:/M41/clone-4.1
into trift2.:/M41/push-4.1
sql/field.cc:
Auto merged
sql/sql_locale.cc:
Changes were already present (and even better) == Null-merge == "ul".
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 46 | ||||
-rw-r--r-- | sql/field.h | 2 |
2 files changed, 24 insertions, 24 deletions
diff --git a/sql/field.cc b/sql/field.cc index 39d19dc39bc..b66a7d736d0 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3680,7 +3680,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs) error= 2; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int4store(ptr,tmp); } @@ -3738,7 +3738,7 @@ int Field_timestamp::store(longlong nr) nr, MYSQL_TIMESTAMP_DATETIME, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int4store(ptr,timestamp); } @@ -3762,7 +3762,7 @@ longlong Field_timestamp::val_int(void) THD *thd= table->in_use; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) temp=uint4korr(ptr); else #endif @@ -3792,7 +3792,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr) val_buffer->length(field_length); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) temp=uint4korr(ptr); else #endif @@ -3857,7 +3857,7 @@ bool Field_timestamp::get_date(TIME *ltime, uint fuzzydate) long temp; THD *thd= table->in_use; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) temp=uint4korr(ptr); else #endif @@ -3894,7 +3894,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr) { int32 a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { a=sint4korr(a_ptr); b=sint4korr(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))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table || !table->db_low_byte_first) { to[0] = ptr[0]; to[1] = ptr[1]; @@ -3941,7 +3941,7 @@ void Field_timestamp::set_time() long tmp= (long) table->in_use->query_start(); set_notnull(); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int4store(ptr,tmp); } @@ -4329,7 +4329,7 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs) from, len, MYSQL_TIMESTAMP_DATE, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int4store(ptr,tmp); } @@ -4357,7 +4357,7 @@ int Field_date::store(double nr) else tmp=(long) rint(nr); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int4store(ptr,tmp); } @@ -4385,7 +4385,7 @@ int Field_date::store(longlong nr) else tmp=(long) nr; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int4store(ptr,tmp); } @@ -4411,7 +4411,7 @@ double Field_date::val_real(void) { int32 j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -4423,7 +4423,7 @@ longlong Field_date::val_int(void) { int32 j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -4438,7 +4438,7 @@ String *Field_date::val_str(String *val_buffer, val_buffer->alloc(field_length); int32 tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) tmp=sint4korr(ptr); else #endif @@ -4456,7 +4456,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr) { int32 a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { a=sint4korr(a_ptr); b=sint4korr(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))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table || !table->db_low_byte_first) { to[0] = ptr[0]; to[1] = ptr[1]; @@ -4698,7 +4698,7 @@ int Field_datetime::store(const char *from,uint len,CHARSET_INFO *cs) from, len, MYSQL_TIMESTAMP_DATETIME, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int8store(ptr,tmp); } @@ -4739,7 +4739,7 @@ int Field_datetime::store(longlong nr) MYSQL_TIMESTAMP_DATETIME, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int8store(ptr,nr); } @@ -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); } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { int8store(ptr,tmp); } @@ -4792,7 +4792,7 @@ longlong Field_datetime::val_int(void) { longlong j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) j=sint8korr(ptr); else #endif @@ -4812,7 +4812,7 @@ String *Field_datetime::val_str(String *val_buffer, int part3; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) tmp=sint8korr(ptr); else #endif @@ -4877,7 +4877,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr) { longlong a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) { a=sint8korr(a_ptr); b=sint8korr(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))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table || !table->db_low_byte_first) { to[0] = ptr[0]; to[1] = ptr[1]; diff --git a/sql/field.h b/sql/field.h index 966549516b1..a33cb0a93aa 100644 --- a/sql/field.h +++ b/sql/field.h @@ -713,7 +713,7 @@ public: if ((*null_value= is_null())) return 0; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table && table->db_low_byte_first) return sint4korr(ptr); #endif long tmp; |