From: Gopal Shankar Date: February 13 2012 9:50am Subject: bzr push into mysql-trunk branch (gopal.shankar:3885 to 3886) Bug#13586314 List-Archive: http://lists.mysql.com/commits/142841 X-Bug: 13586314 Message-Id: <201202130950.q1D9oews022768@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3886 Gopal Shankar 2012-02-13 Bug#13586314 - RUNTIME - HIBISCUS: ISSUE DEPRECATION WARNING FOR LOW_PRIORITY MODIFIER As of 5.5.3, the LOW_PRIORITY modifier for 'LOCK TABLES tbl_name LOW_PRIORITY WRITE' command has no effect. This patch adds deprecation warning for above command, based on a decision made as part of WL#6101. modified: mysql-test/r/lock.result mysql-test/t/lock.test sql/sql_yacc.yy 3885 Rohit Kalhans 2012-02-13 [merge] merge from mysql 5.5->mysql-trunk modified: mysql-test/r/multi_update.result mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result mysql-test/suite/rpl/r/rpl_known_bugs_detection.result mysql-test/t/multi_update.test sql/sql_base.cc === modified file 'mysql-test/r/lock.result' --- a/mysql-test/r/lock.result 2011-01-26 22:06:30 +0000 +++ b/mysql-test/r/lock.result 2012-02-13 09:45:43 +0000 @@ -457,5 +457,18 @@ UNLOCK TABLES; UNLOCK TABLES; DROP TABLE t1, t2; # +# Bug#13586314 - RUNTIME - HIBISCUS: ISSUE DEPRECATION +# WARNING FOR LOW_PRIORITY MODIFIER +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT); +# Below statement should return a deprecation warning +LOCK TABLES t1 LOW_PRIORITY WRITE; +Warnings: +Warning 1287 'LOW_PRIORITY WRITE' is deprecated and will be removed in a future release. Please use WRITE instead +UNLOCK TABLES; +DROP TABLE t1; +# End of Bug#13586314 +# # End of 6.0 tests. # === modified file 'mysql-test/t/lock.test' --- a/mysql-test/t/lock.test 2011-10-19 10:15:25 +0000 +++ b/mysql-test/t/lock.test 2012-02-13 09:45:43 +0000 @@ -550,6 +550,23 @@ UNLOCK TABLES; DROP TABLE t1, t2; disconnect con2; +--echo # +--echo # Bug#13586314 - RUNTIME - HIBISCUS: ISSUE DEPRECATION +--echo # WARNING FOR LOW_PRIORITY MODIFIER +--echo # + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT); +--echo # Below statement should return a deprecation warning +LOCK TABLES t1 LOW_PRIORITY WRITE; +UNLOCK TABLES; +DROP TABLE t1; + +--echo # End of Bug#13586314 + --echo # --echo # End of 6.0 tests. === modified file 'sql/sql_yacc.yy' --- a/sql/sql_yacc.yy 2012-02-03 18:09:00 +0000 +++ b/sql/sql_yacc.yy 2012-02-13 09:45:43 +0000 @@ -13815,7 +13815,11 @@ table_lock: lock_option: READ_SYM { $$= TL_READ_NO_INSERT; } | WRITE_SYM { $$= TL_WRITE_DEFAULT; } - | LOW_PRIORITY WRITE_SYM { $$= TL_WRITE_LOW_PRIORITY; } + | LOW_PRIORITY WRITE_SYM + { + $$= TL_WRITE_LOW_PRIORITY; + WARN_DEPRECATED(YYTHD, "LOW_PRIORITY WRITE", "WRITE"); + } | READ_SYM LOCAL_SYM { $$= TL_READ; } ; No bundle (reason: useless for push emails).