mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/mysql-4.1-bug-12266
This commit is contained in:
commit
de158e94a0
3 changed files with 23 additions and 0 deletions
|
@ -757,3 +757,10 @@ SELECT n+1 AS n FROM t1 GROUP BY n;
|
|||
n
|
||||
2
|
||||
DROP TABLE t1;
|
||||
create table t1 (f1 date);
|
||||
insert into t1 values('2005-06-06');
|
||||
insert into t1 values('2005-06-06');
|
||||
select date(left(f1+0,8)) from t1 group by 1;
|
||||
date(left(f1+0,8))
|
||||
2005-06-06
|
||||
drop table t1;
|
||||
|
|
|
@ -590,4 +590,14 @@ INSERT INTO t1 VALUES (1);
|
|||
SELECT n+1 AS n FROM t1 GROUP BY n;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #12266 GROUP BY expression on DATE column produces result with
|
||||
# reduced length
|
||||
#
|
||||
create table t1 (f1 date);
|
||||
insert into t1 values('2005-06-06');
|
||||
insert into t1 values('2005-06-06');
|
||||
select date(left(f1+0,8)) from t1 group by 1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -709,6 +709,12 @@ public:
|
|||
{
|
||||
return (new Field_date(maybe_null, name, t_arg, &my_charset_bin));
|
||||
}
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
collation.set(&my_charset_bin);
|
||||
max_length= 10;
|
||||
maybe_null= 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue