List:Commits« Previous MessageNext Message »
From:Gleb Shchepa Date:June 29 2012 11:12am
Subject:bzr push into mysql-5.5 branch (gleb.shchepa:3876 to 3877)
View as plain text  
 3877 Gleb Shchepa	2012-06-29 [merge]
      manual merge (WL6219)
     @ sql/sql_yacc.yy
        manual merge (backport of WL6219)

    modified:
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/func_group.result
      mysql-test/r/type_blob.result
      mysql-test/r/type_year.result
      mysql-test/suite/engines/iuds/r/delete_year.result
      mysql-test/suite/engines/iuds/r/insert_year.result
      mysql-test/suite/engines/iuds/r/update_year.result
      mysql-test/suite/funcs_1/r/innodb_views.result
      mysql-test/suite/funcs_1/r/is_columns_innodb.result
      mysql-test/suite/funcs_1/r/is_columns_memory.result
      mysql-test/suite/funcs_1/r/is_columns_myisam.result
      mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
      mysql-test/suite/funcs_1/r/memory_views.result
      mysql-test/suite/funcs_1/r/myisam_views-big.result
      mysql-test/suite/funcs_1/r/storedproc.result
      mysql-test/suite/innodb/r/innodb_bug52745.result
      mysql-test/t/type_year.test
      sql/field.cc
      sql/sql_yacc.yy
 3876 Yasufumi Kinoshita	2012-06-29
      Bug#14251529 : FIX FOR BUG 13704145 CREATES POSSIBLE RACE CONDITION
      make buf_read_page_low() to treat DB_TABLESPACE_DELETED error correctly
      rb#1129 approved by Inaam

    modified:
      storage/innobase/buf/buf0buf.c
      storage/innobase/buf/buf0lru.c
      storage/innobase/buf/buf0rea.c
      storage/innobase/include/buf0buf.h
=== modified file 'mysql-test/r/ctype_binary.result'
--- a/mysql-test/r/ctype_binary.result	2011-05-11 11:11:57 +0000
+++ b/mysql-test/r/ctype_binary.result	2012-06-29 10:12:21 +0000
@@ -2038,6 +2038,8 @@ hex(concat(a))	a
 30303030303030303030303030303031303030302E31	00000000000000010000.1
 drop table t1;
 create 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
 insert into t1 values (1);
 select hex(concat(a)) from t1;
 hex(concat(a))
@@ -2351,6 +2353,8 @@ hex(a)
 drop table t1;
 drop view v1;
 create 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
 insert into t1 values (1);
 create view v1(a) as select concat(a) from t1;
 show columns from v1;

=== modified file 'mysql-test/r/ctype_cp1251.result'
--- a/mysql-test/r/ctype_cp1251.result	2011-05-11 11:11:57 +0000
+++ b/mysql-test/r/ctype_cp1251.result	2012-06-29 10:12:21 +0000
@@ -2430,6 +2430,8 @@ hex(concat(a))	a
 30303030303030303030303030303031303030302E31	00000000000000010000.1
 drop table t1;
 create 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
 insert into t1 values (1);
 select hex(concat(a)) from t1;
 hex(concat(a))
@@ -2743,6 +2745,8 @@ hex(a)
 drop table t1;
 drop view v1;
 create 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
 insert into t1 values (1);
 create view v1(a) as select concat(a) from t1;
 show columns from v1;

=== modified file 'mysql-test/r/ctype_latin1.result'
--- a/mysql-test/r/ctype_latin1.result	2011-05-11 11:11:57 +0000
+++ b/mysql-test/r/ctype_latin1.result	2012-06-29 10:12:21 +0000
@@ -2457,6 +2457,8 @@ hex(concat(a))	a
 30303030303030303030303030303031303030302E31	00000000000000010000.1
 drop table t1;
 create 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
 insert into t1 values (1);
 select hex(concat(a)) from t1;
 hex(concat(a))
@@ -2770,6 +2772,8 @@ hex(a)
 drop table t1;
 drop view v1;
 create 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
 insert into t1 values (1);
 create view v1(a) as select concat(a) from t1;
 show columns from v1;

=== modified file 'mysql-test/r/ctype_ucs.result'
--- a/mysql-test/r/ctype_ucs.result	2012-03-20 05:16:51 +0000
+++ b/mysql-test/r/ctype_ucs.result	2012-06-29 10:12:21 +0000
@@ -3291,6 +3291,8 @@ hex(concat(a))	a
 00300030003000300030003000300030003000300030003000300030003000310030003000300030002E0031	00000000000000010000.1
 drop table t1;
 create 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
 insert into t1 values (1);
 select hex(concat(a)) from t1;
 hex(concat(a))
@@ -3604,6 +3606,8 @@ hex(a)
 drop table t1;
 drop view v1;
 create 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
 insert into t1 values (1);
 create view v1(a) as select concat(a) from t1;
 show columns from v1;

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2012-01-23 09:23:50 +0000
+++ b/mysql-test/r/ctype_utf8.result	2012-06-29 10:12:21 +0000
@@ -4193,6 +4193,8 @@ hex(concat(a))	a
 30303030303030303030303030303031303030302E31	00000000000000010000.1
 drop table t1;
 create 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
 insert into t1 values (1);
 select hex(concat(a)) from t1;
 hex(concat(a))
@@ -4506,6 +4508,8 @@ hex(a)
 drop table t1;
 drop view v1;
 create 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
 insert into t1 values (1);
 create view v1(a) as select concat(a) from t1;
 show columns from v1;

=== modified file 'mysql-test/r/func_group.result'
--- a/mysql-test/r/func_group.result	2011-04-12 10:13:15 +0000
+++ b/mysql-test/r/func_group.result	2012-06-29 10:12:21 +0000
@@ -1524,6 +1524,8 @@ DROP TABLE t1;
 # Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
 #
 create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime);
+Warnings:
+Note	1287	'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 insert into t1 values
 (98,1998,19980101,"1998-01-01 00:00:00"),
 (00,2000,20000101,"2000-01-01 00:00:01"),

=== modified file 'mysql-test/r/type_blob.result'
--- a/mysql-test/r/type_blob.result	2010-10-31 23:23:37 +0000
+++ b/mysql-test/r/type_blob.result	2012-06-29 10:12:21 +0000
@@ -878,6 +878,8 @@ ERROR 42000: Column length too big for c
 CREATE TABLE b15776 (a char(4294967296));
 ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
 CREATE TABLE b15776 (a year(4294967295));
+Warnings:
+Note	1287	'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 INSERT INTO b15776 VALUES (42);
 SELECT * FROM b15776;
 a
@@ -886,6 +888,8 @@ DROP TABLE b15776;
 CREATE TABLE b15776 (a year(4294967296));
 ERROR 42000: Display width out of range for column 'a' (max = 4294967295)
 CREATE TABLE b15776 (a year(0));
+Warnings:
+Note	1287	'YEAR(0)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 DROP TABLE b15776;
 CREATE TABLE b15776 (a year(-2));
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2))' at line 1

=== modified file 'mysql-test/r/type_year.result'
--- a/mysql-test/r/type_year.result	2011-03-08 17:39:25 +0000
+++ b/mysql-test/r/type_year.result	2012-06-29 10:12:21 +0000
@@ -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

=== modified file 'mysql-test/suite/engines/iuds/r/delete_year.result'
--- a/mysql-test/suite/engines/iuds/r/delete_year.result	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/iuds/r/delete_year.result	2012-06-29 08:55:45 +0000
@@ -2,7 +2,13 @@ DROP TABLE IF EXISTS t1,t2,t3,t4;
 CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
 CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
 CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
+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
 CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2));
+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
 INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
 INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
 INSERT INTO t3 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);

=== modified file 'mysql-test/suite/engines/iuds/r/insert_year.result'
--- a/mysql-test/suite/engines/iuds/r/insert_year.result	2011-03-01 16:03:00 +0000
+++ b/mysql-test/suite/engines/iuds/r/insert_year.result	2012-06-29 10:12:21 +0000
@@ -3235,9 +3235,21 @@ c1	c2	c3	c4
 1999	1999	1998-12-30	1998-12-30 11:30:45
 DROP TABLE t1,t2,t3,t4;
 CREATE TABLE t1(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
+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
 CREATE TABLE t2(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
+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
 CREATE TABLE t3(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
+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
 CREATE TABLE t4(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME);
+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
 INSERT INTO t1 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45');
 INSERT INTO t2 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45');
 INSERT INTO t3 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45');

=== modified file 'mysql-test/suite/engines/iuds/r/update_year.result'
--- a/mysql-test/suite/engines/iuds/r/update_year.result	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/iuds/r/update_year.result	2012-06-29 08:55:45 +0000
@@ -2,7 +2,13 @@ DROP TABLE IF EXISTS t1,t2,t3,t4;
 CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
 CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
 CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
+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
 CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2));
+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
 INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
 INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
 INSERT INTO t3 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);

=== modified file 'mysql-test/suite/funcs_1/r/innodb_views.result'
--- a/mysql-test/suite/funcs_1/r/innodb_views.result	2010-05-30 07:48:22 +0000
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result	2012-06-29 10:12:21 +0000
@@ -53,6 +53,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = innodb;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
 into table tb2;
 DROP DATABASE IF EXISTS test1;
@@ -112,6 +114,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = innodb;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
 into table tb2;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_innodb.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result	2010-07-16 15:04:39 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result	2012-06-29 10:12:21 +0000
@@ -132,6 +132,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = innodb;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
 into table tb2;
 drop table if exists tb3 ;
@@ -262,6 +264,8 @@ f239 varchar(20000) binary,
 f240 varchar(2000),
 f241 char(100)
 ) engine = innodb;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb4.txt'
 into table tb4;
 USE test1;
@@ -319,6 +323,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = innodb;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
 into table tb2;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_memory.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_memory.result	2010-07-16 15:04:39 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result	2012-06-29 10:12:21 +0000
@@ -128,6 +128,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = memory;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
 into table tb2 ;
 drop table if exists tb3;
@@ -251,6 +253,8 @@ f238 varchar(25000) binary,
 f239 varbinary(0),
 f240 varchar(1200)
 ) engine = memory;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb4.txt'
 into table tb4;
 USE test1;
@@ -308,6 +312,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = memory;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
 into table tb2 ;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_myisam.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result	2010-07-16 15:04:39 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result	2012-06-29 10:12:21 +0000
@@ -144,6 +144,8 @@ f115 VARBINARY(27) null ,
 f116 VARBINARY(64) null,
 f117 VARBINARY(192) null
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
 into table tb2;
 drop table if exists tb3 ;
@@ -283,6 +285,8 @@ f240 varchar(120),
 f241 char(100),
 f242 bit(30)
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
 into table tb4;
 USE test1;
@@ -348,6 +352,8 @@ f115 VARBINARY(27) null ,
 f116 VARBINARY(64) null,
 f117 VARBINARY(192) null
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
 into table tb2;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result	2011-03-18 11:14:42 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result	2012-06-29 10:12:21 +0000
@@ -144,6 +144,8 @@ f115 VARBINARY(27) null ,
 f116 VARBINARY(64) null,
 f117 VARBINARY(192) null
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
 into table tb2;
 drop table if exists tb3 ;
@@ -283,6 +285,8 @@ f240 varchar(120),
 f241 char(100),
 f242 bit(30)
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
 into table tb4;
 USE test1;
@@ -348,6 +352,8 @@ f115 VARBINARY(27) null ,
 f116 VARBINARY(64) null,
 f117 VARBINARY(192) null
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
 into table tb2;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/memory_views.result'
--- a/mysql-test/suite/funcs_1/r/memory_views.result	2010-05-30 07:48:22 +0000
+++ b/mysql-test/suite/funcs_1/r/memory_views.result	2012-06-29 10:12:21 +0000
@@ -54,6 +54,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = memory;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
 into table tb2 ;
 DROP DATABASE IF EXISTS test1;
@@ -113,6 +115,8 @@ f107 year(4) not null default 2000,
 f108 enum("1enum","2enum") not null default "1enum",
 f109 set("1set","2set") not null default "1set"
 ) engine = memory;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
 into table tb2 ;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/myisam_views-big.result'
--- a/mysql-test/suite/funcs_1/r/myisam_views-big.result	2010-12-31 11:14:48 +0000
+++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result	2012-06-29 10:12:21 +0000
@@ -62,6 +62,8 @@ f115 VARBINARY(27) null ,
 f116 VARBINARY(64) null,
 f117 VARBINARY(192) null
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
 into table tb2;
 DROP DATABASE IF EXISTS test1;
@@ -129,6 +131,8 @@ f115 VARBINARY(27) null ,
 f116 VARBINARY(64) null,
 f117 VARBINARY(192) null
 ) engine = myisam;
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
 into table tb2;
 USE test;

=== modified file 'mysql-test/suite/funcs_1/r/storedproc.result'
--- a/mysql-test/suite/funcs_1/r/storedproc.result	2010-08-16 06:46:21 +0000
+++ b/mysql-test/suite/funcs_1/r/storedproc.result	2012-06-29 10:12:21 +0000
@@ -7497,9 +7497,13 @@ BEGIN
 declare x, y, z year(3) default 2005;
 SELECT x, y, z;
 END//
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 CALL sp1();
 x	y	z
 2005	2005	2005
+Warnings:
+Note	1287	'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 DROP PROCEDURE IF EXISTS sp1;
 CREATE PROCEDURE sp1( )
 BEGIN

=== modified file 'mysql-test/suite/innodb/r/innodb_bug52745.result'
--- a/mysql-test/suite/innodb/r/innodb_bug52745.result	2011-10-05 13:14:14 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug52745.result	2012-06-29 10:12:21 +0000
@@ -58,6 +58,7 @@ col89 float unsigned zerofill DEFAULT NU
 col90 tinyblob
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
 Warnings:
+Note	1287	'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
 Note	1291	Column 'col82' has duplicated value '' in ENUM
 Note	1291	Column 'col82' has duplicated value '' in ENUM
 INSERT INTO bug52745 SET

=== modified file 'mysql-test/t/type_year.test'
--- a/mysql-test/t/type_year.test	2011-03-08 17:39:25 +0000
+++ b/mysql-test/t/type_year.test	2012-06-29 10:12:21 +0000
@@ -160,5 +160,13 @@ SELECT COUNT(*) AS total_rows, MIN(c1) A
 DROP TABLE t1;
 
 --echo #
+--echo # WL#6219: Deprecate and remove YEAR(2) type
+--echo #
+
+CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
+ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2);
+DROP TABLE t1;
+
+--echo #
 
 --echo End of 5.1 tests

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2012-05-07 20:20:42 +0000
+++ b/sql/field.cc	2012-06-29 10:12:21 +0000
@@ -9929,6 +9929,17 @@ Create_field::Create_field(Field *old_fi
     geom_type= ((Field_geom*)old_field)->geom_type;
     break;
 #endif
+  case MYSQL_TYPE_YEAR:
+    if (length != 4)
+    {
+      char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
+      snprintf(buff, sizeof(buff), "YEAR(%lu)", length);
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+                          ER_WARN_DEPRECATED_SYNTAX,
+                          ER(ER_WARN_DEPRECATED_SYNTAX),
+                          buff, "YEAR(4)");
+    }
+    break;
   default:
     break;
   }

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2012-01-09 10:33:26 +0000
+++ b/sql/sql_yacc.yy	2012-06-29 10:12:21 +0000
@@ -5465,7 +5465,23 @@ type:
             $$= MYSQL_TYPE_VARCHAR;
           }
         | YEAR_SYM opt_field_length field_options
-          { $$=MYSQL_TYPE_YEAR; }
+          {
+            if (Lex->length)
+            {
+              errno= 0;
+              ulong length= strtoul(Lex->length, NULL, 10);
+              if (errno == 0 && length <= MAX_FIELD_BLOBLENGTH && length != 4)
+              {
+                char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
+                snprintf(buff, sizeof(buff), "YEAR(%lu)", length);
+                push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_NOTE,
+                                    ER_WARN_DEPRECATED_SYNTAX,
+                                    ER(ER_WARN_DEPRECATED_SYNTAX),
+                                    buff, "YEAR(4)");
+              }
+            }
+            $$=MYSQL_TYPE_YEAR;
+          }
         | DATE_SYM
           { $$=MYSQL_TYPE_DATE; }
         | TIME_SYM

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (gleb.shchepa:3876 to 3877) Gleb Shchepa2 Jul