mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#1366: Use the schema (db) associated with an SP.
Phase 4 (final): Remove associated stored procedures when a database is dropped. mysql-test/r/sp-security.result: drop database now deletes associated SPs. mysql-test/r/sp.result: drop database now deletes associated SPs. mysql-test/t/sp-security.test: drop database now deletes associated SPs. mysql-test/t/sp.test: drop database now deletes associated SPs. sql/sp.cc: New function for deleting all SPs associated with a database. sql/sp.h: New function for deleting all SPs associated with a database. sql/sp_cache.cc: New function for just invalidating all SP caches (when dropping a database). sql/sp_cache.h: New function for just invalidating all SP caches (when dropping a database). sql/sql_db.cc: When dropping a database, also delete all associated SPs.
This commit is contained in:
@ -97,11 +97,15 @@ s1
|
||||
0
|
||||
2
|
||||
2
|
||||
drop procedure db1_secret.stamp;
|
||||
drop function db1_secret.db;
|
||||
drop procedure db2.p;
|
||||
drop procedure db2.q;
|
||||
use test;
|
||||
select type,db,name from mysql.proc;
|
||||
type db name
|
||||
FUNCTION db1_secret db
|
||||
PROCEDURE db1_secret stamp
|
||||
PROCEDURE db2 p
|
||||
PROCEDURE db2 q
|
||||
drop database db1_secret;
|
||||
drop database db2;
|
||||
select type,db,name from mysql.proc;
|
||||
type db name
|
||||
delete from mysql.user where user='user1' or user='user2';
|
||||
|
Reference in New Issue
Block a user