summaryrefslogtreecommitdiff
path: root/mysql-test/r/type_year.result
diff options
context:
space:
mode:
authorGleb Shchepa <gleb.shchepa@oracle.com>2012-06-29 12:55:45 +0400
committerGleb Shchepa <gleb.shchepa@oracle.com>2012-06-29 12:55:45 +0400
commit767501fb54f19adf3c136e5131daf11e34b3f039 (patch)
tree7f5c6c4320c4997d6be1e35c5562c5795a1efc72 /mysql-test/r/type_year.result
parent07a17e302c816ff0b5f6eb577f3683b6fd3645ea (diff)
downloadmariadb-git-767501fb54f19adf3c136e5131daf11e34b3f039.tar.gz
Backport of the deprecation warning from WL#6219: "Deprecate and remove YEAR(2) type"
Print the warning(note): YEAR(x) is deprecated and will be removed in a future release. Please use YEAR(4) instead on "CREATE TABLE ... YEAR(x)" or "ALTER TABLE MODIFY ... YEAR(x)", where x != 4
Diffstat (limited to 'mysql-test/r/type_year.result')
-rw-r--r--mysql-test/r/type_year.result15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result
index 2dc491c6166..e00569c93c1 100644
--- a/mysql-test/r/type_year.result
+++ b/mysql-test/r/type_year.result
@@ -1,5 +1,7 @@
drop table if exists t1;
create table t1 (y year,y2 year(2));
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
insert into t1 values (0,0),(1999,1999),(2000,2000),(2001,2001),(70,70),(69,69);
select * from t1;
y y2
@@ -50,6 +52,8 @@ End of 5.0 tests
# Bug #49480: WHERE using YEAR columns returns unexpected results
#
CREATE TABLE t2(yy YEAR(2), c2 CHAR(4));
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
CREATE TABLE t4(yyyy YEAR(4), c4 CHAR(4));
INSERT INTO t2 (c2) VALUES (NULL),(1970),(1999),(2000),(2001),(2069);
INSERT INTO t4 (c4) SELECT c2 FROM t2;
@@ -355,4 +359,15 @@ total_rows min_value MAX(c1)
3 0 2155
DROP TABLE t1;
#
+# WL#6219: Deprecate and remove YEAR(2) type
+#
+CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2);
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+DROP TABLE t1;
+#
End of 5.1 tests