mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Revised BUG#5000: SPs can be created with no default database.
Now simply give an error if no database. (The "global SP feature" will be done using PATH instead.) mysql-test/r/sp-error.result: Removed test cases for undone "feature". mysql-test/t/sp-error.test: Removed test cases for undone "feature". sql/sql_parse.cc: Check if created procedure/function has a database; give error if not. sql/sql_yacc.yy: Undid the "global SP feature".
This commit is contained in:
@@ -5,29 +5,6 @@
|
||||
# Make sure we don't have any procedures left.
|
||||
delete from mysql.proc;
|
||||
|
||||
# A test of "global" procedures, i.e. not belonging to any database.
|
||||
create function .f1() returns int return 1;
|
||||
create procedure .p1() select 1, database();
|
||||
create procedure p1() select 2, database();
|
||||
|
||||
alter procedure .p1 sql security invoker;
|
||||
|
||||
# This is ok:
|
||||
select .f1();
|
||||
call .p1();
|
||||
call p1();
|
||||
|
||||
# This is not ok:
|
||||
--error 1305
|
||||
select f1();
|
||||
|
||||
select db,name,type,security_type from mysql.proc;
|
||||
|
||||
drop function .f1;
|
||||
drop procedure .p1;
|
||||
drop procedure p1;
|
||||
|
||||
|
||||
delimiter |;
|
||||
|
||||
# This should give three syntax errors (sometimes crashed; bug #643)
|
||||
|
||||
Reference in New Issue
Block a user