List:Commits« Previous MessageNext Message »
From:Praveenkumar Hulakund Date:February 29 2012 2:05pm
Subject:bzr push into mysql-trunk branch (praveenkumar.hulakund:3701 to 3702)
Bug#12601974
View as plain text  
 3702 Praveenkumar Hulakund	2012-02-29
      Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES IGNORED AND BREAKS REPLICATION
      
      Moving test cases not applicable to embedded server to "not_embedded_server.test" 
      from "sql_mode.test"

    modified:
      mysql-test/r/not_embedded_server.result
      mysql-test/r/sql_mode.result
      mysql-test/t/not_embedded_server.test
      mysql-test/t/sql_mode.test
 3701 Gleb Shchepa	2012-02-29
      WL#5855: Print EXPLAIN in JSON format
      
      Minor fix to make GCC compiler happy with strict flags.

    modified:
      sql/opt_explain_json.cc
=== modified file 'mysql-test/r/not_embedded_server.result'
--- a/mysql-test/r/not_embedded_server.result	2011-02-04 04:59:55 +0000
+++ b/mysql-test/r/not_embedded_server.result	2012-02-29 14:04:30 +0000
@@ -47,3 +47,88 @@ DROP USER nopriv_user@localhost;
 #
 # End Bug#54812
 #
+
+#
+# Test for Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES
+# IGNORED AND BREAKS REPLICATION
+#
+SET @org_mode=@@sql_mode;
+SET @@sql_mode='';
+# USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
+CREATE USER 'user\'s_12601974'@'localhost';
+CREATE USER 'user\'s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\'s_12601974'@'localhost'
+DROP USER 'user\'s_12601974'@'localhost';
+CREATE USER 'user\"s_12601974'@'localhost';
+CREATE USER 'user\"s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost'
+DROP USER 'user\"s_12601974'@'localhost';
+CREATE USER 'user\bs_12601974'@'localhost';
+CREATE USER 'user\bs_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'users_12601974'@'localhost'
+DROP USER 'user\bs_12601974'@'localhost';
+CREATE USER 'user\ns_12601974'@'localhost';
+CREATE USER 'user\ns_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\ns_12601974'@'localhost'
+DROP USER 'user\ns_12601974'@'localhost';
+CREATE USER 'user\rs_12601974'@'localhost';
+CREATE USER 'user\rs_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\rs_12601974'@'localhost'
+DROP USER 'user\rs_12601974'@'localhost';
+CREATE USER 'user\ts_12601974'@'localhost';
+CREATE USER 'user\ts_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user	s_12601974'@'localhost'
+DROP USER 'user\ts_12601974'@'localhost';
+CREATE USER 'user\\s_12601974'@'localhost';
+CREATE USER 'user\\s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\\s_12601974'@'localhost'
+DROP USER 'user\\s_12601974'@'localhost';
+CREATE USER 'user\%s_12601974'@'localhost';
+CREATE USER 'user\%s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\\%s_12601974'@'localhost'
+DROP USER 'user\%s_12601974'@'localhost';
+CREATE USER 'user\_s_12601974'@'localhost';
+CREATE USER 'user\_s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\\_s_12601974'@'localhost'
+DROP USER 'user\_s_12601974'@'localhost';
+
+# END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
+SET @@sql_mode='NO_BACKSLASH_ESCAPES';
+# USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION
+CREATE USER 'user\"s_12601974'@'localhost';
+CREATE USER 'user\"s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost'
+DROP USER 'user\"s_12601974'@'localhost';
+CREATE USER 'user\bs_12601974'@'localhost';
+CREATE USER 'user\bs_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\bs_12601974'@'localhost'
+DROP USER 'user\bs_12601974'@'localhost';
+CREATE USER 'user\ns_12601974'@'localhost';
+CREATE USER 'user\ns_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\ns_12601974'@'localhost'
+DROP USER 'user\ns_12601974'@'localhost';
+CREATE USER 'user\rs_12601974'@'localhost';
+CREATE USER 'user\rs_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\rs_12601974'@'localhost'
+DROP USER 'user\rs_12601974'@'localhost';
+CREATE USER 'user\ts_12601974'@'localhost';
+CREATE USER 'user\ts_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\ts_12601974'@'localhost'
+DROP USER 'user\ts_12601974'@'localhost';
+CREATE USER 'user\\s_12601974'@'localhost';
+CREATE USER 'user\\s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\\s_12601974'@'localhost'
+DROP USER 'user\\s_12601974'@'localhost';
+CREATE USER 'user\%s_12601974'@'localhost';
+CREATE USER 'user\%s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\%s_12601974'@'localhost'
+DROP USER 'user\%s_12601974'@'localhost';
+CREATE USER 'user\_s_12601974'@'localhost';
+CREATE USER 'user\_s_12601974'@'localhost';
+ERROR HY000: Operation CREATE USER failed for 'user\_s_12601974'@'localhost'
+DROP USER 'user\_s_12601974'@'localhost';
+
+# END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
+SET @@sql_mode= @org_mode;
+
+#End of Test for Bug#12601974 

=== modified file 'mysql-test/r/sql_mode.result'
--- a/mysql-test/r/sql_mode.result	2012-02-28 10:57:17 +0000
+++ b/mysql-test/r/sql_mode.result	2012-02-29 14:04:30 +0000
@@ -570,45 +570,6 @@ SET @to_var6='wxyz\tef';
 SET @to_var7='wxyz\\ef';
 SET @to_var8='wxyz\%ef';
 SET @to_var9='wxyz\_ef';
-# USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
-CREATE USER 'user\'s_12601974'@'localhost';
-CREATE USER 'user\'s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\'s_12601974'@'localhost'
-DROP USER 'user\'s_12601974'@'localhost';
-CREATE USER 'user\"s_12601974'@'localhost';
-CREATE USER 'user\"s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost'
-DROP USER 'user\"s_12601974'@'localhost';
-CREATE USER 'user\bs_12601974'@'localhost';
-CREATE USER 'user\bs_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'users_12601974'@'localhost'
-DROP USER 'user\bs_12601974'@'localhost';
-CREATE USER 'user\ns_12601974'@'localhost';
-CREATE USER 'user\ns_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\ns_12601974'@'localhost'
-DROP USER 'user\ns_12601974'@'localhost';
-CREATE USER 'user\rs_12601974'@'localhost';
-CREATE USER 'user\rs_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\rs_12601974'@'localhost'
-DROP USER 'user\rs_12601974'@'localhost';
-CREATE USER 'user\ts_12601974'@'localhost';
-CREATE USER 'user\ts_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user	s_12601974'@'localhost'
-DROP USER 'user\ts_12601974'@'localhost';
-CREATE USER 'user\\s_12601974'@'localhost';
-CREATE USER 'user\\s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\\s_12601974'@'localhost'
-DROP USER 'user\\s_12601974'@'localhost';
-CREATE USER 'user\%s_12601974'@'localhost';
-CREATE USER 'user\%s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\\%s_12601974'@'localhost'
-DROP USER 'user\%s_12601974'@'localhost';
-CREATE USER 'user\_s_12601974'@'localhost';
-CREATE USER 'user\_s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\\_s_12601974'@'localhost'
-DROP USER 'user\_s_12601974'@'localhost';
-
-# END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
 # STRING LILTERAL WITH BACKSLASH IN PREPARE STATEMENT
 EXECUTE insert_stmt USING @var1;
 EXECUTE insert_stmt USING @var2;
@@ -695,41 +656,6 @@ SELECT c1 INTO char_val FROM test_table
 RETURN char_val;
 END
 $
-# USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION
-CREATE USER 'user\"s_12601974'@'localhost';
-CREATE USER 'user\"s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost'
-DROP USER 'user\"s_12601974'@'localhost';
-CREATE USER 'user\bs_12601974'@'localhost';
-CREATE USER 'user\bs_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\bs_12601974'@'localhost'
-DROP USER 'user\bs_12601974'@'localhost';
-CREATE USER 'user\ns_12601974'@'localhost';
-CREATE USER 'user\ns_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\ns_12601974'@'localhost'
-DROP USER 'user\ns_12601974'@'localhost';
-CREATE USER 'user\rs_12601974'@'localhost';
-CREATE USER 'user\rs_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\rs_12601974'@'localhost'
-DROP USER 'user\rs_12601974'@'localhost';
-CREATE USER 'user\ts_12601974'@'localhost';
-CREATE USER 'user\ts_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\ts_12601974'@'localhost'
-DROP USER 'user\ts_12601974'@'localhost';
-CREATE USER 'user\\s_12601974'@'localhost';
-CREATE USER 'user\\s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\\s_12601974'@'localhost'
-DROP USER 'user\\s_12601974'@'localhost';
-CREATE USER 'user\%s_12601974'@'localhost';
-CREATE USER 'user\%s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\%s_12601974'@'localhost'
-DROP USER 'user\%s_12601974'@'localhost';
-CREATE USER 'user\_s_12601974'@'localhost';
-CREATE USER 'user\_s_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'user\_s_12601974'@'localhost'
-DROP USER 'user\_s_12601974'@'localhost';
-
-# END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
 # STRING LILTERAL WITH BACKSLASH IN PREPARE STATEMENT
 EXECUTE insert_stmt USING @var1;
 EXECUTE insert_stmt USING @var2;

=== modified file 'mysql-test/t/not_embedded_server.test'
--- a/mysql-test/t/not_embedded_server.test	2011-02-04 04:59:55 +0000
+++ b/mysql-test/t/not_embedded_server.test	2012-02-29 14:04:30 +0000
@@ -104,3 +104,110 @@ DROP USER nopriv_user@localhost;
 --echo #
 --echo # End Bug#54812
 --echo #
+
+
+--echo 
+--echo #
+--echo # Test for Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES
+--echo # IGNORED AND BREAKS REPLICATION
+--echo #
+
+SET @org_mode=@@sql_mode;
+
+SET @@sql_mode='';
+
+--echo # USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
+CREATE USER 'user\'s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\'s_12601974'@'localhost';
+DROP USER 'user\'s_12601974'@'localhost';
+
+CREATE USER 'user\"s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\"s_12601974'@'localhost';
+DROP USER 'user\"s_12601974'@'localhost';
+
+CREATE USER 'user\bs_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\bs_12601974'@'localhost';
+DROP USER 'user\bs_12601974'@'localhost';
+
+CREATE USER 'user\ns_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\ns_12601974'@'localhost';
+DROP USER 'user\ns_12601974'@'localhost';
+
+CREATE USER 'user\rs_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\rs_12601974'@'localhost';
+DROP USER 'user\rs_12601974'@'localhost';
+
+CREATE USER 'user\ts_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\ts_12601974'@'localhost';
+DROP USER 'user\ts_12601974'@'localhost';
+
+CREATE USER 'user\\s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\\s_12601974'@'localhost';
+DROP USER 'user\\s_12601974'@'localhost';
+
+CREATE USER 'user\%s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\%s_12601974'@'localhost';
+DROP USER 'user\%s_12601974'@'localhost';
+
+CREATE USER 'user\_s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\_s_12601974'@'localhost';
+DROP USER 'user\_s_12601974'@'localhost';
+--echo 
+--echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
+
+SET @@sql_mode='NO_BACKSLASH_ESCAPES';
+--echo # USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION
+CREATE USER 'user\"s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\"s_12601974'@'localhost';
+DROP USER 'user\"s_12601974'@'localhost';
+
+CREATE USER 'user\bs_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\bs_12601974'@'localhost';
+DROP USER 'user\bs_12601974'@'localhost';
+
+CREATE USER 'user\ns_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\ns_12601974'@'localhost';
+DROP USER 'user\ns_12601974'@'localhost';
+
+CREATE USER 'user\rs_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\rs_12601974'@'localhost';
+DROP USER 'user\rs_12601974'@'localhost';
+
+CREATE USER 'user\ts_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\ts_12601974'@'localhost';
+DROP USER 'user\ts_12601974'@'localhost';
+
+CREATE USER 'user\\s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\\s_12601974'@'localhost';
+DROP USER 'user\\s_12601974'@'localhost';
+
+CREATE USER 'user\%s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\%s_12601974'@'localhost';
+DROP USER 'user\%s_12601974'@'localhost';
+
+CREATE USER 'user\_s_12601974'@'localhost';
+--error ER_CANNOT_USER
+CREATE USER 'user\_s_12601974'@'localhost';
+DROP USER 'user\_s_12601974'@'localhost';
+--echo 
+--echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
+SET @@sql_mode= @org_mode;
+
+--echo 
+--echo #End of Test for Bug#12601974 

=== modified file 'mysql-test/t/sql_mode.test'
--- a/mysql-test/t/sql_mode.test	2012-02-28 10:57:17 +0000
+++ b/mysql-test/t/sql_mode.test	2012-02-29 14:04:30 +0000
@@ -410,54 +410,6 @@ SET @to_var7='wxyz\\ef';
 SET @to_var8='wxyz\%ef';
 SET @to_var9='wxyz\_ef';
 
---echo # USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
-CREATE USER 'user\'s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\'s_12601974'@'localhost';
-DROP USER 'user\'s_12601974'@'localhost';
-
-CREATE USER 'user\"s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\"s_12601974'@'localhost';
-DROP USER 'user\"s_12601974'@'localhost';
-
-CREATE USER 'user\bs_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\bs_12601974'@'localhost';
-DROP USER 'user\bs_12601974'@'localhost';
-
-CREATE USER 'user\ns_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\ns_12601974'@'localhost';
-DROP USER 'user\ns_12601974'@'localhost';
-
-CREATE USER 'user\rs_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\rs_12601974'@'localhost';
-DROP USER 'user\rs_12601974'@'localhost';
-
-CREATE USER 'user\ts_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\ts_12601974'@'localhost';
-DROP USER 'user\ts_12601974'@'localhost';
-
-CREATE USER 'user\\s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\\s_12601974'@'localhost';
-DROP USER 'user\\s_12601974'@'localhost';
-
-CREATE USER 'user\%s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\%s_12601974'@'localhost';
-DROP USER 'user\%s_12601974'@'localhost';
-
-CREATE USER 'user\_s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\_s_12601974'@'localhost';
-DROP USER 'user\_s_12601974'@'localhost';
---echo 
---echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
-
 --echo # STRING LILTERAL WITH BACKSLASH IN PREPARE STATEMENT
 EXECUTE insert_stmt USING @var1;
 EXECUTE insert_stmt USING @var2;
@@ -513,49 +465,6 @@ END
 $
 DELIMITER ;$
 
---echo # USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION
-CREATE USER 'user\"s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\"s_12601974'@'localhost';
-DROP USER 'user\"s_12601974'@'localhost';
-
-CREATE USER 'user\bs_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\bs_12601974'@'localhost';
-DROP USER 'user\bs_12601974'@'localhost';
-
-CREATE USER 'user\ns_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\ns_12601974'@'localhost';
-DROP USER 'user\ns_12601974'@'localhost';
-
-CREATE USER 'user\rs_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\rs_12601974'@'localhost';
-DROP USER 'user\rs_12601974'@'localhost';
-
-CREATE USER 'user\ts_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\ts_12601974'@'localhost';
-DROP USER 'user\ts_12601974'@'localhost';
-
-CREATE USER 'user\\s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\\s_12601974'@'localhost';
-DROP USER 'user\\s_12601974'@'localhost';
-
-CREATE USER 'user\%s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\%s_12601974'@'localhost';
-DROP USER 'user\%s_12601974'@'localhost';
-
-CREATE USER 'user\_s_12601974'@'localhost';
---error ER_CANNOT_USER
-CREATE USER 'user\_s_12601974'@'localhost';
-DROP USER 'user\_s_12601974'@'localhost';
---echo 
---echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
-
 --echo # STRING LILTERAL WITH BACKSLASH IN PREPARE STATEMENT
 EXECUTE insert_stmt USING @var1;
 EXECUTE insert_stmt USING @var2;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (praveenkumar.hulakund:3701 to 3702)Bug#12601974Praveenkumar Hulakund5 Mar