mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Added new test case for BUG#14533: 'desc tbl' in stored procedure causes error 1142
which is no longer repeatable. (Unclear when this was fixed.)
This commit is contained in:
@@ -487,4 +487,42 @@ drop user user2_bug14834@localhost;
|
||||
drop user user3_bug14834@localhost;
|
||||
drop database db_bug14834;
|
||||
|
||||
|
||||
#
|
||||
# BUG#14533: 'desc tbl' in stored procedure causes error 1142
|
||||
#
|
||||
create database db_bug14533;
|
||||
use db_bug14533;
|
||||
create table t1 (id int);
|
||||
create user user_bug14533@localhost identified by '';
|
||||
|
||||
create procedure bug14533_1()
|
||||
sql security definer
|
||||
desc db_bug14533.t1;
|
||||
|
||||
create procedure bug14533_2()
|
||||
sql security definer
|
||||
select * from db_bug14533.t1;
|
||||
|
||||
grant execute on procedure db_bug14533.bug14533_1 to user_bug14533@localhost;
|
||||
grant execute on procedure db_bug14533.bug14533_2 to user_bug14533@localhost;
|
||||
|
||||
connect (user_bug14533,localhost,user_bug14533,,test);
|
||||
|
||||
# These should work
|
||||
call db_bug14533.bug14533_1();
|
||||
call db_bug14533.bug14533_2();
|
||||
|
||||
# For reference, these should not work
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
desc db_bug14533.t1;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
select * from db_bug14533.t1;
|
||||
|
||||
# Cleanup
|
||||
connection default;
|
||||
disconnect user_bug14533;
|
||||
drop user user_bug14533@localhost;
|
||||
drop database db_bug14533;
|
||||
|
||||
# End of 5.0 bugs.
|
||||
|
||||
Reference in New Issue
Block a user