diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-11-15 12:00:08 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-11-15 12:00:08 +0200 |
commit | a9315a65e10720468f89c21e64e7bbaa7eaae40c (patch) | |
tree | 2268d0679cf824dfb2ed2bdfe024df74eb4a5970 /sql/sql_select.h | |
parent | 6f97fb591b577b6766b4a3e9effb9766af49c311 (diff) | |
parent | 36d1659a80ce09f480e2af9efa9c6eb32157ec02 (diff) | |
download | mariadb-git-a9315a65e10720468f89c21e64e7bbaa7eaae40c.tar.gz |
Merge magare.gmz:/home/kgeorge/mysql/work/B31928-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B31928-5.1-opt
mysql-test/t/type_date.test:
Auto merged
sql/sql_select.h:
Auto merged
mysql-test/r/type_date.result:
merge of bug 31928 to 5.1-opt
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 256d57cc10a..cb59032315a 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -594,14 +594,17 @@ public: enum store_key_result copy() { enum store_key_result result; - enum_check_fields saved_count_cuted_fields= - to_field->table->in_use->count_cuted_fields; + THD *thd= to_field->table->in_use; + enum_check_fields saved_count_cuted_fields= thd->count_cuted_fields; + ulong sql_mode= thd->variables.sql_mode; + thd->variables.sql_mode&= ~(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE); - to_field->table->in_use->count_cuted_fields= CHECK_FIELD_IGNORE; + thd->count_cuted_fields= CHECK_FIELD_IGNORE; result= copy_inner(); - to_field->table->in_use->count_cuted_fields= saved_count_cuted_fields; + thd->count_cuted_fields= saved_count_cuted_fields; + thd->variables.sql_mode= sql_mode; return result; } |