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.cc | |
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.cc')
-rw-r--r-- | sql/item_timefunc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 04060d190a0..0cb3c963dad 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -3303,7 +3303,7 @@ Field *Item_func_str_to_date::tmp_table_field(TABLE *t_arg) if (cached_field_type == MYSQL_TYPE_TIME) return (new Field_time(maybe_null, name, t_arg, &my_charset_bin)); if (cached_field_type == MYSQL_TYPE_DATE) - return (new Field_date(maybe_null, name, t_arg, &my_charset_bin)); + return (new Field_newdate(maybe_null, name, t_arg, &my_charset_bin)); if (cached_field_type == MYSQL_TYPE_DATETIME) return (new Field_datetime(maybe_null, name, t_arg, &my_charset_bin)); return (new Field_string(max_length, maybe_null, name, t_arg, &my_charset_bin)); |