diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-08-06 06:34:21 -0700 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-08-06 06:34:21 -0700 |
commit | 9d513b96bceb1a2efb75bdd126e6865b6a54c663 (patch) | |
tree | 22da4f44a01195015e577c3d8b8eb036bedddee9 /sql | |
parent | 0d69d9f62746b8070e34e2848513b58b79d3689e (diff) | |
parent | 1f83b351818fca51a14bc34a224c4a80e14c9476 (diff) | |
download | mariadb-git-9d513b96bceb1a2efb75bdd126e6865b6a54c663.tar.gz |
Merge magare.gmz:/home/kgeorge/mysql/work/B29536-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B29536-5.1-opt
sql/field.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/suite/rpl/r/rpl_timezone.result:
Auto merged
mysql-test/suite/rpl/t/rpl_timezone.test:
Bug 29536 : merge 5.0-opt -> 5.1-opt
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 6 | ||||
-rw-r--r-- | sql/time.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sql/field.cc b/sql/field.cc index 37cdf452652..6b27473e609 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4672,6 +4672,7 @@ longlong Field_timestamp::val_int(void) MYSQL_TIME time_tmp; THD *thd= table ? table->in_use : current_thd; + thd->time_zone_used= 1; #ifdef WORDS_BIGENDIAN if (table && table->s->db_low_byte_first) temp=uint4korr(ptr); @@ -4683,7 +4684,6 @@ longlong Field_timestamp::val_int(void) return(0); /* purecov: inspected */ thd->variables.time_zone->gmt_sec_to_TIME(&time_tmp, (my_time_t)temp); - thd->time_zone_used= 1; return time_tmp.year * LL(10000000000) + time_tmp.month * LL(100000000) + time_tmp.day * 1000000L + time_tmp.hour * 10000L + @@ -4703,6 +4703,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr) to= (char*) val_buffer->ptr(); val_buffer->length(field_length); + thd->time_zone_used= 1; #ifdef WORDS_BIGENDIAN if (table && table->s->db_low_byte_first) temp=uint4korr(ptr); @@ -4718,7 +4719,6 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr) val_buffer->set_charset(&my_charset_bin); // Safety thd->variables.time_zone->gmt_sec_to_TIME(&time_tmp,(my_time_t)temp); - thd->time_zone_used= 1; temp= time_tmp.year % 100; if (temp < YY_PART_YEAR - 1) @@ -4768,6 +4768,7 @@ bool Field_timestamp::get_date(MYSQL_TIME *ltime, uint fuzzydate) { long temp; THD *thd= table ? table->in_use : current_thd; + thd->time_zone_used= 1; #ifdef WORDS_BIGENDIAN if (table && table->s->db_low_byte_first) temp=uint4korr(ptr); @@ -4783,7 +4784,6 @@ bool Field_timestamp::get_date(MYSQL_TIME *ltime, uint fuzzydate) else { thd->variables.time_zone->gmt_sec_to_TIME(ltime, (my_time_t)temp); - thd->time_zone_used= 1; } return 0; } diff --git a/sql/time.cc b/sql/time.cc index c552d085f5e..a6619cf4cee 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -263,11 +263,11 @@ my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, my_bool *in_dst_time_ my_time_t timestamp; *in_dst_time_gap= 0; + thd->time_zone_used= 1; timestamp= thd->variables.time_zone->TIME_to_gmt_sec(t, in_dst_time_gap); if (timestamp) { - thd->time_zone_used= 1; return timestamp; } |