List:Commits« Previous MessageNext Message »
From:Praveenkumar Hulakund Date:March 28 2012 8:34am
Subject:bzr push into mysql-5.1 branch (praveenkumar.hulakund:3716 to 3717)
Bug#11763507
View as plain text  
 3717 Praveenkumar Hulakund	2012-03-28
      Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
      
      Analysis:
      -------------------------------
      According to the Manual
      (http://dev.mysql.com/doc/refman/5.1/en/identifier-case-sensitivity.html):
      "Column, index, stored routine, and event names are not case sensitive on any
      platform, nor are column aliases."
      
      In other words, 'lower_case_table_names' does not affect the behaviour of 
      those identifiers.
      
      On the other hand, trigger names are case sensitive on some platforms,
      and case insensitive on others. 'lower_case_table_names' does not affect
      the behaviour of trigger names either.
      
      The bug was that SHOW statements did case sensitive comparison
      for stored procedure / stored function / event names.
      
      Fix:
      Modified the code so that comparison in case insensitive for routines 
      and events for "SHOW" operation.
      
      As part of this commit, only fixing the test failures due to the actual code fix.

    modified:
      mysql-test/r/sp-bugs.result
      mysql-test/r/sp-code.result
      mysql-test/r/sp_notembedded.result
      mysql-test/t/sp-bugs.test
      mysql-test/t/sp-code.test
      mysql-test/t/sp_notembedded.test
 3716 Sunny Bains	2012-03-28 [merge]
      Merge from mysql-5.0

    modified:
      storage/innobase/include/trx0purge.h
      storage/innobase/trx/trx0purge.c
      storage/innodb_plugin/include/trx0purge.h
      storage/innodb_plugin/trx/trx0purge.c
=== modified file 'mysql-test/r/sp-bugs.result'
--- a/mysql-test/r/sp-bugs.result	2012-03-27 07:12:11 +0000
+++ b/mysql-test/r/sp-bugs.result	2012-03-28 06:35:31 +0000
@@ -145,8 +145,6 @@ BEGIN
 SELECT "PROCEDURE testp_bug11763507";
 END
 $
-CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR 
-DO SELECT 1 $
 SELECT testf_bug11763507();
 testf_bug11763507()
 0
@@ -177,12 +175,6 @@ testf_bug11763507		CREATE DEFINER=`root`
 BEGIN
 RETURN 0;
 END	latin1	latin1_swedish_ci	latin1_swedish_ci
-SHOW FUNCTION CODE testf_bug11763507;
-Pos	Instruction
-0	freturn 3 0
-SHOW FUNCTION CODE TESTF_bug11763507;
-Pos	Instruction
-0	freturn 3 0
 CALL testp_bug11763507();
 PROCEDURE testp_bug11763507
 PROCEDURE testp_bug11763507
@@ -213,24 +205,6 @@ testp_bug11763507		CREATE DEFINER=`root`
 BEGIN
 SELECT "PROCEDURE testp_bug11763507";
 END	latin1	latin1_swedish_ci	latin1_swedish_ci
-SHOW PROCEDURE CODE testp_bug11763507;
-Pos	Instruction
-0	stmt 0 "SELECT "PROCEDURE testp_bug11763507""
-SHOW PROCEDURE CODE TESTP_bug11763507;
-Pos	Instruction
-0	stmt 0 "SELECT "PROCEDURE testp_bug11763507""
-SHOW EVENTS LIKE 'teste_bug11763507';
-Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
-test	teste_bug11763507	root@localhost	SYSTEM	ONE TIME	#	#	#	#	NULL	ENABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
-SHOW EVENTS LIKE 'TESTE_bug11763507';
-Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
-test	teste_bug11763507	root@localhost	SYSTEM	ONE TIME	#	#	#	#	NULL	ENABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
-SHOW CREATE EVENT teste_bug11763507;
-Event	sql_mode	time_zone	Create Event	character_set_client	collation_connection	Database Collation
-teste_bug11763507		SYSTEM	#	latin1	latin1_swedish_ci	latin1_swedish_ci
-SHOW CREATE EVENT TESTE_bug11763507;
-Event	sql_mode	time_zone	Create Event	character_set_client	collation_connection	Database Collation
-teste_bug11763507		SYSTEM	#	latin1	latin1_swedish_ci	latin1_swedish_ci
 SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name LIKE 'testf_bug11763507';
 specific_name
 testf_bug11763507
@@ -243,7 +217,6 @@ testf_bug11763507
 SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name='TESTF_bug11763507';
 specific_name
 testf_bug11763507
-DROP EVENT teste_bug11763507;
 DROP PROCEDURE testp_bug11763507;
 DROP FUNCTION testf_bug11763507;
 #END OF BUG#11763507 test.

=== modified file 'mysql-test/r/sp-code.result'
--- a/mysql-test/r/sp-code.result	2008-03-25 23:48:05 +0000
+++ b/mysql-test/r/sp-code.result	2012-03-28 06:35:31 +0000
@@ -888,3 +888,32 @@ Pos	Instruction
 4	jump 6
 5	error 1339
 DROP PROCEDURE p1;
+#
+# Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
+#
+SET @@SQL_MODE = '';
+CREATE FUNCTION testf_bug11763507() RETURNS INT
+BEGIN
+RETURN 0;
+END
+$
+CREATE PROCEDURE testp_bug11763507()
+BEGIN
+SELECT "PROCEDURE testp_bug11763507";
+END
+$
+SHOW FUNCTION CODE testf_bug11763507;
+Pos	Instruction
+0	freturn 3 0
+SHOW FUNCTION CODE TESTF_bug11763507;
+Pos	Instruction
+0	freturn 3 0
+SHOW PROCEDURE CODE testp_bug11763507;
+Pos	Instruction
+0	stmt 0 "SELECT "PROCEDURE testp_bug11763507""
+SHOW PROCEDURE CODE TESTP_bug11763507;
+Pos	Instruction
+0	stmt 0 "SELECT "PROCEDURE testp_bug11763507""
+DROP PROCEDURE testp_bug11763507;
+DROP FUNCTION testf_bug11763507;
+#END OF BUG#11763507 test.

=== modified file 'mysql-test/r/sp_notembedded.result'
--- a/mysql-test/r/sp_notembedded.result	2010-02-05 09:39:46 +0000
+++ b/mysql-test/r/sp_notembedded.result	2012-03-28 06:35:31 +0000
@@ -279,6 +279,26 @@ ERROR 70100: Query execution was interru
 DROP VIEW v1;
 DROP TABLE t1;
 DROP FUNCTION f1;
+#
+# Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
+#
+SET @@SQL_MODE = '';
+CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR 
+DO SELECT 1 $
+SHOW EVENTS LIKE 'teste_bug11763507';
+Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
+test	teste_bug11763507	root@localhost	SYSTEM	ONE TIME	#	#	#	#	NULL	ENABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
+SHOW EVENTS LIKE 'TESTE_bug11763507';
+Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
+test	teste_bug11763507	root@localhost	SYSTEM	ONE TIME	#	#	#	#	NULL	ENABLED	1	latin1	latin1_swedish_ci	latin1_swedish_ci
+SHOW CREATE EVENT teste_bug11763507;
+Event	sql_mode	time_zone	Create Event	character_set_client	collation_connection	Database Collation
+teste_bug11763507		SYSTEM	#	latin1	latin1_swedish_ci	latin1_swedish_ci
+SHOW CREATE EVENT TESTE_bug11763507;
+Event	sql_mode	time_zone	Create Event	character_set_client	collation_connection	Database Collation
+teste_bug11763507		SYSTEM	#	latin1	latin1_swedish_ci	latin1_swedish_ci
+DROP EVENT teste_bug11763507;
+#END OF BUG#11763507 test.
 # ------------------------------------------------------------------
 # -- End of 5.1 tests
 # ------------------------------------------------------------------

=== modified file 'mysql-test/t/sp-bugs.test'
--- a/mysql-test/t/sp-bugs.test	2012-03-27 07:12:11 +0000
+++ b/mysql-test/t/sp-bugs.test	2012-03-28 06:35:31 +0000
@@ -183,9 +183,6 @@ BEGIN
 END
 $
 
-CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR 
-DO SELECT 1 $
-
 DELIMITER ;$
 
 # STORED FUNCTIONS
@@ -204,9 +201,6 @@ SHOW FUNCTION STATUS WHERE NAME='TESTF_b
 SHOW CREATE FUNCTION testf_bug11763507;
 SHOW CREATE FUNCTION TESTF_bug11763507;
 
-SHOW FUNCTION CODE testf_bug11763507;
-SHOW FUNCTION CODE TESTF_bug11763507;
-
 # STORED PROCEDURE
 CALL testp_bug11763507();
 CALL TESTP_bug11763507();
@@ -223,20 +217,6 @@ SHOW PROCEDURE STATUS WHERE NAME='TESTP_
 SHOW CREATE PROCEDURE testp_bug11763507;
 SHOW CREATE PROCEDURE TESTP_bug11763507;
 
-SHOW PROCEDURE CODE testp_bug11763507;
-SHOW PROCEDURE CODE TESTP_bug11763507;
-
-# EVENTS
---replace_column 6 # 7 # 8 # 9 #
-SHOW EVENTS LIKE 'teste_bug11763507';
---replace_column 6 # 7 # 8 # 9 #
-SHOW EVENTS LIKE 'TESTE_bug11763507';
-
---replace_column 4 # 
-SHOW CREATE EVENT teste_bug11763507;
---replace_column 4 # 
-SHOW CREATE EVENT TESTE_bug11763507;
-
 # INFORMATION SCHEMA 
 SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name LIKE 'testf_bug11763507';
 SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name LIKE 'TESTF_bug11763507';
@@ -244,7 +224,6 @@ SELECT specific_name FROM INFORMATION_SC
 SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name='testf_bug11763507';
 SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name='TESTF_bug11763507';
 
-DROP EVENT teste_bug11763507;
 DROP PROCEDURE testp_bug11763507;
 DROP FUNCTION testf_bug11763507;
 

=== modified file 'mysql-test/t/sp-code.test'
--- a/mysql-test/t/sp-code.test	2008-03-25 23:35:34 +0000
+++ b/mysql-test/t/sp-code.test	2012-03-28 06:35:31 +0000
@@ -649,3 +649,35 @@ END//
 DELIMITER ;//
 SHOW PROCEDURE CODE p1;
 DROP PROCEDURE p1;
+
+--echo #
+--echo # Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
+--echo #
+SET @@SQL_MODE = '';
+DELIMITER $;
+CREATE FUNCTION testf_bug11763507() RETURNS INT
+BEGIN
+    RETURN 0;
+END
+$
+
+CREATE PROCEDURE testp_bug11763507()
+BEGIN
+    SELECT "PROCEDURE testp_bug11763507";
+END
+$
+
+DELIMITER ;$
+
+# STORED FUNCTIONS
+SHOW FUNCTION CODE testf_bug11763507;
+SHOW FUNCTION CODE TESTF_bug11763507;
+
+# STORED PROCEDURE
+SHOW PROCEDURE CODE testp_bug11763507;
+SHOW PROCEDURE CODE TESTP_bug11763507;
+
+DROP PROCEDURE testp_bug11763507;
+DROP FUNCTION testf_bug11763507;
+
+--echo #END OF BUG#11763507 test.

=== modified file 'mysql-test/t/sp_notembedded.test'
--- a/mysql-test/t/sp_notembedded.test	2010-02-05 09:39:46 +0000
+++ b/mysql-test/t/sp_notembedded.test	2012-03-28 06:35:31 +0000
@@ -449,6 +449,29 @@ DROP FUNCTION f1;
 --disconnect con1
 --disconnect con2
 
+--echo #
+--echo # Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
+--echo #
+SET @@SQL_MODE = '';
+DELIMITER $;
+
+CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR 
+DO SELECT 1 $
+
+DELIMITER ;$
+# EVENTS
+--replace_column 6 # 7 # 8 # 9 #
+SHOW EVENTS LIKE 'teste_bug11763507';
+--replace_column 6 # 7 # 8 # 9 #
+SHOW EVENTS LIKE 'TESTE_bug11763507';
+
+--replace_column 4 # 
+SHOW CREATE EVENT teste_bug11763507;
+--replace_column 4 # 
+SHOW CREATE EVENT TESTE_bug11763507;
+
+DROP EVENT teste_bug11763507;
+--echo #END OF BUG#11763507 test.
 
 --echo # ------------------------------------------------------------------
 --echo # -- End of 5.1 tests

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (praveenkumar.hulakund:3716 to 3717)Bug#11763507Praveenkumar Hulakund28 Mar