diff options
author | Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com> | 2012-03-27 12:42:11 +0530 |
---|---|---|
committer | Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com> | 2012-03-27 12:42:11 +0530 |
commit | 56d4eb21db828bbf1725b7523d8e3a4809e058c5 (patch) | |
tree | 2dcfff9869b2e2c5927815f6c1f27145341d965b /mysql-test/r/sp-bugs.result | |
parent | e0581c7d743af9fd94d7677b4d58b667f759e3c3 (diff) | |
download | mariadb-git-56d4eb21db828bbf1725b7523d8e3a4809e058c5.tar.gz |
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.
Diffstat (limited to 'mysql-test/r/sp-bugs.result')
-rw-r--r-- | mysql-test/r/sp-bugs.result | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result index 59588768d14..d003fc9798a 100644 --- a/mysql-test/r/sp-bugs.result +++ b/mysql-test/r/sp-bugs.result @@ -109,6 +109,7 @@ DROP FUNCTION db1.f1; DROP TABLE db1.t1; DROP DATABASE db1; DROP DATABASE db2; +USE test; # # Bug#13105873:valgrind warning:possible crash in foreign # key handling on subsequent create table if not exists @@ -128,4 +129,121 @@ CALL p1(); Warnings: Note 1050 Table 't2' already exists DROP DATABASE testdb; +USE test; End of 5.1 tests +# +# 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 +$ +CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR +DO SELECT 1 $ +SELECT testf_bug11763507(); +testf_bug11763507() +0 +SELECT TESTF_bug11763507(); +TESTF_bug11763507() +0 +SHOW FUNCTION STATUS LIKE 'testf_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testf_bug11763507 FUNCTION root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW FUNCTION STATUS WHERE NAME='testf_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testf_bug11763507 FUNCTION root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW FUNCTION STATUS LIKE 'TESTF_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testf_bug11763507 FUNCTION root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW FUNCTION STATUS WHERE NAME='TESTF_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testf_bug11763507 FUNCTION root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW CREATE FUNCTION testf_bug11763507; +Function sql_mode Create Function character_set_client collation_connection Database Collation +testf_bug11763507 CREATE DEFINER=`root`@`localhost` FUNCTION `testf_bug11763507`() RETURNS int(11) +BEGIN +RETURN 0; +END latin1 latin1_swedish_ci latin1_swedish_ci +SHOW CREATE FUNCTION TESTF_bug11763507; +Function sql_mode Create Function character_set_client collation_connection Database Collation +testf_bug11763507 CREATE DEFINER=`root`@`localhost` FUNCTION `testf_bug11763507`() RETURNS int(11) +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 +CALL TESTP_bug11763507(); +PROCEDURE testp_bug11763507 +PROCEDURE testp_bug11763507 +SHOW PROCEDURE STATUS LIKE 'testp_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testp_bug11763507 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW PROCEDURE STATUS WHERE NAME='testp_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testp_bug11763507 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW PROCEDURE STATUS LIKE 'TESTP_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testp_bug11763507 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW PROCEDURE STATUS WHERE NAME='TESTP_bug11763507'; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test testp_bug11763507 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +SHOW CREATE PROCEDURE testp_bug11763507; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +testp_bug11763507 CREATE DEFINER=`root`@`localhost` PROCEDURE `testp_bug11763507`() +BEGIN +SELECT "PROCEDURE testp_bug11763507"; +END latin1 latin1_swedish_ci latin1_swedish_ci +SHOW CREATE PROCEDURE TESTP_bug11763507; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +testp_bug11763507 CREATE DEFINER=`root`@`localhost` PROCEDURE `testp_bug11763507`() +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 +SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name LIKE 'TESTF_bug11763507'; +specific_name +testf_bug11763507 +SELECT specific_name FROM INFORMATION_SCHEMA.ROUTINES WHERE specific_name='testf_bug11763507'; +specific_name +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. |