List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:June 1 2011 11:22am
Subject:bzr commit into mysql-5.5 branch (Dmitry.Shulga:3419) Bug#11763757
View as plain text  
#At file:///Users/shulga/projects/mysql/mysql-5.5/ based on revid:bjorn.munch@stripped

 3419 Dmitry Shulga	2011-06-01
      Added regression test for bug#11763757

    modified:
      mysql-test/r/sp_sync.result
      mysql-test/t/sp_sync.test
=== modified file 'mysql-test/r/sp_sync.result'
--- a/mysql-test/r/sp_sync.result	2010-06-07 07:06:55 +0000
+++ b/mysql-test/r/sp_sync.result	2011-06-01 11:22:21 +0000
@@ -93,3 +93,34 @@ DROP PROCEDURE p1;
 DROP FUNCTION f1;
 DROP TABLES t0, t1;
 SET DEBUG_SYNC= 'RESET';
+#
+# test for bug#11763757 (formerly known as bug#56510)
+#
+GRANT SHOW DATABASES ON *.* TO u1@localhost;
+GRANT ALL PRIVILEGES ON `my.db`.* TO u1@localhost;
+create database `my.db`;
+use `my.db`;
+CREATE FUNCTION f1(a int) RETURNS INT
+BEGIN
+RETURN a;
+END
+|
+connect as user `u1@localhost`
+use `my.db`;
+SELECT f1(1);
+f1(1)
+1
+SELECT `my.db`.f1(2);
+`my.db`.f1(2)
+2
+show create function f1;
+Function	sql_mode	Create Function	character_set_client	collation_connection	Database Collation
+f1		NULL	latin1	latin1_swedish_ci	latin1_swedish_ci
+SELECT f1(3);
+f1(3)
+3
+SELECT `my.db`.f1(4);
+`my.db`.f1(4)
+4
+DROP DATABASE `my.db`;
+DROP USER u1@localhost;

=== modified file 'mysql-test/t/sp_sync.test'
--- a/mysql-test/t/sp_sync.test	2010-08-06 11:29:37 +0000
+++ b/mysql-test/t/sp_sync.test	2011-06-01 11:22:21 +0000
@@ -151,6 +151,43 @@ DROP FUNCTION f1;
 DROP TABLES t0, t1;
 SET DEBUG_SYNC= 'RESET';
 
+--echo #
+--echo # test for bug#11763757 (formerly known as bug#56510)
+--echo #
+GRANT SHOW DATABASES ON *.* TO u1@localhost;
+GRANT ALL PRIVILEGES ON `my.db`.* TO u1@localhost;
+
+create database `my.db`;
+use `my.db`;
+
+delimiter |;
+
+CREATE FUNCTION f1(a int) RETURNS INT
+BEGIN
+RETURN a;
+END
+|
+
+delimiter ;|
+
+--echo connect as user `u1@localhost`
+connect (connu1, localhost, u1,,);
+connection connu1;
+
+use `my.db`;
+--disable_abort_on_error
+SELECT f1(1);
+SELECT `my.db`.f1(2);
+
+show create function f1;
+
+SELECT f1(3);
+SELECT `my.db`.f1(4);
+
+connection default;
+disconnect connu1;
+DROP DATABASE `my.db`;
+DROP USER u1@localhost;
 
 # Check that all connections opened by test cases in this file are really
 # gone so execution of other tests won't be affected by their presence.


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20110601112221-z7lcn8dxcd20l23c.bundle
Thread
bzr commit into mysql-5.5 branch (Dmitry.Shulga:3419) Bug#11763757Dmitry Shulga1 Jun