Commit c82a7b94 authored by unknown's avatar unknown

Merge macbook.gmz:/Users/kgeorge/mysql/work/B33256-5.0-opt

into  macbook.gmz:/Users/kgeorge/mysql/work/B33256-5.1-opt


mysql-test/r/union.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/type_decimal.result:
  merge of bug 33256 5.0-opt -> 5.1-opt
mysql-test/t/union.test:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/field.h:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item.cc:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item_sum.cc:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item_timefunc.cc:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item_timefunc.h:
  merge of bug 33256 5.0-opt -> 5.1-opt
parents baf5c2c1 2ae4b047
......@@ -786,10 +786,6 @@ from (select 1 as s,'t' as t union select null, null ) as sub1;
select group_concat(t) from t1 group by week(date)/10;
group_concat(t)
t
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
drop table t1;
CREATE TABLE t1 (
qty decimal(16,6) default NULL,
......
......@@ -1269,6 +1269,10 @@ class Field_newdate :public Field_str {
: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; }
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment