mirror of
https://github.com/MariaDB/server.git
synced 2025-11-18 07:48:43 +03:00
Avoid spurious error when restoring INFORMATION_SCHEMA as the current
database after failing to execute a stored procedure in an inaccessible database. (Bug #12318)
This commit is contained in:
@@ -236,3 +236,16 @@ drop procedure bug7291_2;
|
||||
drop procedure bug7291_0;
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
|
||||
drop user user1@localhost;
|
||||
drop database if exists mysqltest_1;
|
||||
create database mysqltest_1;
|
||||
create procedure mysqltest_1.p1()
|
||||
begin
|
||||
select 1 from dual;
|
||||
end//
|
||||
grant usage on *.* to mysqltest_1@localhost;
|
||||
call mysqltest_1.p1();
|
||||
ERROR 42000: execute command denied to user 'mysqltest_1'@'localhost' for routine 'mysqltest_1.p1'
|
||||
drop procedure mysqltest_1.p1;
|
||||
drop database mysqltest_1;
|
||||
revoke usage on *.* from mysqltest_1@localhost;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
@@ -371,3 +371,39 @@ drop procedure bug7291_0;
|
||||
disconnect user1;
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
|
||||
drop user user1@localhost;
|
||||
|
||||
#
|
||||
# Bug #12318: Wrong error message when accessing an inaccessible stored
|
||||
# procedure in another database when the current database is
|
||||
# information_schema.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists mysqltest_1;
|
||||
--enable_warnings
|
||||
|
||||
create database mysqltest_1;
|
||||
delimiter //;
|
||||
create procedure mysqltest_1.p1()
|
||||
begin
|
||||
select 1 from dual;
|
||||
end//
|
||||
delimiter ;//
|
||||
|
||||
grant usage on *.* to mysqltest_1@localhost;
|
||||
|
||||
connect (n1,localhost,mysqltest_1,,information_schema,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
connection n1;
|
||||
--error 1370
|
||||
call mysqltest_1.p1();
|
||||
disconnect n1;
|
||||
|
||||
connection default;
|
||||
|
||||
drop procedure mysqltest_1.p1;
|
||||
drop database mysqltest_1;
|
||||
|
||||
revoke usage on *.* from mysqltest_1@localhost;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
# End of 5.0 bugs.
|
||||
|
||||
Reference in New Issue
Block a user