mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fixed BUG#3339: Stored procedures in nonexistent schemas are uncallable.
Also added some related security tests and corrected related error messages. mysql-test/r/sp-error.result: New test case for BUG#3339, and updated results for other modified error messages. mysql-test/r/sp-security.result: Added tests for creating procedures in another database with and wihout access rights. mysql-test/t/sp-error.test: New test case for BUG#3339. mysql-test/t/sp-security.test: Added tests for creating procedures in another database with and wihout access rights. sql/sp.cc: Check existance (and access rights) for database when creating a stored routine. sql/sp.h: New error return value for sp_create_* functions, for non existing database. sql/sql_parse.cc: Check error return for create stored routine (non existing database), and corrected the error output for some other commands. (Use qualified name, not just name.)
This commit is contained in:
@ -33,15 +33,15 @@ ERROR 42000: FUNCTION func1 already exists
|
||||
drop procedure proc1|
|
||||
drop function func1|
|
||||
alter procedure foo|
|
||||
ERROR 42000: PROCEDURE foo does not exist
|
||||
ERROR 42000: PROCEDURE test.foo does not exist
|
||||
alter function foo|
|
||||
ERROR 42000: FUNCTION foo does not exist
|
||||
ERROR 42000: FUNCTION test.foo does not exist
|
||||
drop procedure foo|
|
||||
ERROR 42000: PROCEDURE foo does not exist
|
||||
ERROR 42000: PROCEDURE test.foo does not exist
|
||||
drop function foo|
|
||||
ERROR 42000: FUNCTION foo does not exist
|
||||
ERROR 42000: FUNCTION test.foo does not exist
|
||||
call foo()|
|
||||
ERROR 42000: PROCEDURE foo does not exist
|
||||
ERROR 42000: PROCEDURE test.foo does not exist
|
||||
drop procedure if exists foo|
|
||||
Warnings:
|
||||
Warning 1298 PROCEDURE foo does not exist
|
||||
@ -193,7 +193,7 @@ call p()|
|
||||
ERROR 24000: Cursor is not open
|
||||
drop procedure p|
|
||||
alter procedure bar3 sql security invoker|
|
||||
ERROR 42000: PROCEDURE bar3 does not exist
|
||||
ERROR 42000: PROCEDURE test.bar3 does not exist
|
||||
alter procedure bar3 name
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|
|
||||
ERROR 42000: Identifier name 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' is too long
|
||||
@ -395,4 +395,6 @@ select @x|
|
||||
0
|
||||
drop procedure bug3279|
|
||||
drop table t3|
|
||||
create procedure nodb.bug3339() begin end|
|
||||
ERROR 42000: Unknown database 'nodb'
|
||||
drop table t1|
|
||||
|
Reference in New Issue
Block a user