Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
aeb561cf
Commit
aeb561cf
authored
Nov 11, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for YEAR(N)
parent
ba33d475
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
mysql-test/r/type_year.result
mysql-test/r/type_year.result
+58
-0
mysql-test/t/type_year.test
mysql-test/t/type_year.test
+11
-0
No files found.
mysql-test/r/type_year.result
View file @
aeb561cf
...
...
@@ -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
#
mysql-test/t/type_year.test
View file @
aeb561cf
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment