summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2007-12-21 12:44:24 +0200
committerunknown <gkodinov/kgeorge@macbook.gmz>2007-12-21 12:44:24 +0200
commit2ae4b047a3d9c4236ebd157ef8ee4bf084d4629b (patch)
tree4d62109704644c540923cd03b7d55acae485a26a /sql/field.h
parent3e2531b9b028c3f9c1c2d4ba9874ad3351273983 (diff)
downloadmariadb-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/field.h')
-rw-r--r--sql/field.h4
1 files changed, 4 insertions, 0 deletions
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; }