-
unknown authored
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.
5dd21704