diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2007-12-21 12:44:24 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2007-12-21 12:44:24 +0200 |
commit | 2ae4b047a3d9c4236ebd157ef8ee4bf084d4629b (patch) | |
tree | 4d62109704644c540923cd03b7d55acae485a26a /sql/item_timefunc.h | |
parent | 3e2531b9b028c3f9c1c2d4ba9874ad3351273983 (diff) | |
download | mariadb-git-2ae4b047a3d9c4236ebd157ef8ee4bf084d4629b.tar.gz |
Bug #33256: CREATE ... SELECT creates obsolete table
w/ Field_date instead of Field_newdate
Field_date was still used in temp table creation.
Fixed by using Field_newdate consistently throughout the server
except when reading tables defined with older MySQL version.
No test suite is possible because both Field_date and Field_newdate
return the same values in all the metadata calls.
mysql-test/r/type_decimal.result:
Bug #33256: removed redundant warnings
sql/field.h:
Bug #33256: Add a constructor similar to Field_date::Field_date()
sql/item.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_sum.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_timefunc.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_timefunc.h:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index b647e93b700..7960c03d2e5 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -340,7 +340,7 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - return (new Field_date(maybe_null, name, t_arg, &my_charset_bin)); + return (new Field_newdate(maybe_null, name, t_arg, &my_charset_bin)); } bool result_as_longlong() { return TRUE; } my_decimal *val_decimal(my_decimal *decimal_value) @@ -784,7 +784,7 @@ public: enum_field_types field_type() const { return MYSQL_TYPE_DATE; } Field *tmp_table_field(TABLE *t_arg) { - return (new Field_date(maybe_null, name, t_arg, &my_charset_bin)); + return (new Field_newdate(maybe_null, name, t_arg, &my_charset_bin)); } void fix_length_and_dec() { @@ -884,7 +884,7 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - return (new Field_date(maybe_null, name, t_arg, &my_charset_bin)); + return (new Field_newdate(maybe_null, name, t_arg, &my_charset_bin)); } longlong val_int(); my_decimal *val_decimal(my_decimal *decimal_value) |