From 2ae4b047a3d9c4236ebd157ef8ee4bf084d4629b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Dec 2007 12:44:24 +0200 Subject: 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 --- sql/field.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index e5c473ed556..476ca797fa0 100644 --- a/sql/field.h +++ b/sql/field.h @@ -961,6 +961,10 @@ public: :Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, table_arg, cs) {} + Field_newdate(bool maybe_null_arg, const char *field_name_arg, + struct st_table *table_arg, CHARSET_INFO *cs) + :Field_str((char*) 0,10, maybe_null_arg ? (uchar*) "": 0,0, + NONE, field_name_arg, table_arg, cs) {} enum_field_types type() const { return FIELD_TYPE_DATE;} enum_field_types real_type() const { return FIELD_TYPE_NEWDATE; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; } -- cgit v1.2.1