Commit aeb561cf authored by Sergei Golubchik's avatar Sergei Golubchik

tests for YEAR(N)

parent ba33d475
......@@ -505,5 +505,63 @@ Warnings:
Warning 1264 Out of range value for column 'a' at row 1
DROP TABLE t1;
#
# Various widths of the YEAR
#
create or replace table t1 (a YEAR(0));
Warnings:
Note 1287 'YEAR(0)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a YEAR(1));
Warnings:
Note 1287 'YEAR(1)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a YEAR(2));
Warnings:
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a YEAR(3));
Warnings:
Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a YEAR(4));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a YEAR(5));
Warnings:
Note 1287 'YEAR(5)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a YEAR(100));
Warnings:
Note 1287 'YEAR(100)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
#
# End of 10.2 tests
#
......@@ -265,6 +265,17 @@ SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
ALTER TABLE t1 MODIFY a YEAR;
DROP TABLE t1;
--echo #
--echo # Various widths of the YEAR
--echo #
create or replace table t1 (a YEAR(0)); SHOW CREATE TABLE t1;
create or replace table t1 (a YEAR(1)); SHOW CREATE TABLE t1;
create or replace table t1 (a YEAR(2)); SHOW CREATE TABLE t1;
create or replace table t1 (a YEAR(3)); SHOW CREATE TABLE t1;
create or replace table t1 (a YEAR(4)); SHOW CREATE TABLE t1;
create or replace table t1 (a YEAR(5)); SHOW CREATE TABLE t1;
create or replace table t1 (a YEAR(100)); SHOW CREATE TABLE t1;
drop table t1;
--echo #
--echo # End of 10.2 tests
......
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