summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-destruct.result
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2006-01-26 13:29:46 +0100
committerunknown <pem@mysql.com>2006-01-26 13:29:46 +0100
commitcce719fba8e143c6a94f5c4048e1b72d005b1dd2 (patch)
tree42db978805a90eab556fb5ed7c87e15209b14d6b /mysql-test/r/sp-destruct.result
parente43170419c97f5432e90016bc89e0910f39f1487 (diff)
downloadmariadb-git-cce719fba8e143c6a94f5c4048e1b72d005b1dd2.tar.gz
Fixed BUG#16303: erroneus stored procedures and functions should be droppable
Use a special lookup function for DROP, which doesn't attempt to parse the definition. mysql-test/r/sp-destruct.result: Updated test result for BUG#16303. mysql-test/t/sp-destruct.test: Added test case for BUG#16303. sql/sp.cc: New function sp_routine_exists_in_table() for DROP PROCEDURE/FUNCTION; which doesn't want to parse the definition, only know if it exists. Renamed sp_exists_routine to sp_exist_routines and added comment, and changed the misnamed parameter/variable 'tables'/'table' to 'routines'/'routine'. sql/sp.h: New function sp_routine_exists_in_table() for DROP PROCEDURE/FUNCTION. Renamed sp_exists_routine to sp_exist_routines, and changed the misnamed parameter 'tables' to 'routines'. sql/sql_acl.cc: Call to sp_exists_routine() renamed to sp_exist_routines(). sql/sql_parse.cc: Use the new sp_routine_exists_in_table() instead of sp_find_routine(), since we don't want the routine definition parsed when doing DROP PROCEDURE/FUNCTION.
Diffstat (limited to 'mysql-test/r/sp-destruct.result')
-rw-r--r--mysql-test/r/sp-destruct.result8
1 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/r/sp-destruct.result b/mysql-test/r/sp-destruct.result
index 1b720be9403..4df8086c84e 100644
--- a/mysql-test/r/sp-destruct.result
+++ b/mysql-test/r/sp-destruct.result
@@ -72,6 +72,12 @@ drop trigger t1_ai;
create trigger t1_ai after insert on t1 for each row call bug14233_3();
insert into t1 values (0);
ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
-delete from mysql.proc where name like 'bug14233%';
drop trigger t1_ai;
drop table t1;
+drop function bug14233_1;
+drop function bug14233_2;
+drop procedure bug14233_3;
+show procedure status;
+Db Name Type Definer Modified Created Security_type Comment
+show function status;
+Db Name Type Definer Modified Created Security_type Comment