diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.h | 4 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/item_sum.cc | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index dc4f1b13cb5..365072a4eec 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1269,6 +1269,10 @@ public: :Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_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 MYSQL_TYPE_DATE;} enum_field_types real_type() const { return MYSQL_TYPE_NEWDATE; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; } diff --git a/sql/item.cc b/sql/item.cc index a8b17a5ca12..922c3b7a976 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4467,7 +4467,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length) break; case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_DATE: - field= new Field_date(maybe_null, name, &my_charset_bin); + field= new Field_newdate(maybe_null, name, &my_charset_bin); break; case MYSQL_TYPE_TIME: field= new Field_time(maybe_null, name, &my_charset_bin); diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 733b6e1e460..881f472d766 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -633,7 +633,7 @@ Field *Item_sum_hybrid::create_tmp_field(bool group, TABLE *table, */ switch (args[0]->field_type()) { case MYSQL_TYPE_DATE: - field= new Field_date(maybe_null, name, collation.collation); + field= new Field_newdate(maybe_null, name, collation.collation); break; case MYSQL_TYPE_TIME: field= new Field_time(maybe_null, name, collation.collation); |