mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB
mode". Changed grammar rule for "type" token. Now we have one branch with optional length specification for TIMESTAMP type instead of two separate branches. mysql-test/r/type_timestamp.result: Added test case for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB mode". mysql-test/t/type_timestamp.test: Added test case for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB mode". sql/sql_yacc.yy: Changed rule for "type" token. Now we have one branch with optional length specification for TIMESTAMP type instead of two separate branches. This also gives us consistent behavior for TIMETSAMP in MAXDB mode.
This commit is contained in:
@ -286,3 +286,15 @@ insert into t1 values ('a', '2004-01-01 00:00:00'), ('a', '2004-01-01 01:00:00')
|
||||
('b', '2004-02-01 00:00:00');
|
||||
select max(t) from t1 group by a;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB
|
||||
# mode". TIMESTAMP columns should be converted DATETIME columns in MAXDB
|
||||
# mode regardless of whether a display width is given.
|
||||
#
|
||||
set sql_mode='maxdb';
|
||||
create table t1 (a timestamp, b timestamp(19));
|
||||
show create table t1;
|
||||
# restore default mode
|
||||
set sql_mode='';
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user