mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
tests for YEAR(N)
This commit is contained in:
parent
ba33d4753e
commit
aeb561cf3e
2 changed files with 69 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue