From d4088df5e9a02e714d85f79bec3ea97cdd8128c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Nov 2005 17:09:26 +0100 Subject: Fixed BUG#14233: Crash after tampering with the mysql.proc table Post-review version. Some minor review fixes, but also changed the way some errors are handled: Don't return specific parse errors; instead always use the more general "table corrupt" error (amended accordingly). mysql-test/r/sp-destruct.result: Updated results. mysql-test/r/sp-error.result: Updated for fully qualified name in "no return" error message. mysql-test/t/sp-destruct.test: Adopted the more consistent error handling for a corrupted mysql.proc table. (No more "parse error" et al). sql/share/errmsg.txt: Changed ER_SP_PROC_TABLE_CORRUPT to be more explicit. sql/sp.cc: Review fixes. Changed the handling of parse errors, and added the routine name to the "table corrupt" error message. sql/sql_base.cc: Review changes: Change error tests and added comments. sql/sql_parse.cc: Mored ER_SP_NORETURN test of functions to sql_yacc.yy for more general error handling. sql/sql_yacc.yy: Mored ER_SP_NORETURN test of functions from sql_parse.cc for more general error handling. --- mysql-test/t/sp-destruct.test | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mysql-test/t/sp-destruct.test') diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test index 7b13d273bd1..a2a66090866 100644 --- a/mysql-test/t/sp-destruct.test +++ b/mysql-test/t/sp-destruct.test @@ -101,26 +101,24 @@ values 'root@localhost', NOW() , '0000-00-00 00:00:00', '', '' ); ---error ER_SP_NO_RETSET +--error ER_SP_PROC_TABLE_CORRUPT select bug14233_1(); ---error ER_SP_NO_RETSET +--error ER_SP_PROC_TABLE_CORRUPT create view v1 as select bug14233_1(); ---error ER_SP_NORETURNEND +--error ER_SP_PROC_TABLE_CORRUPT select bug14233_2(); +--error ER_SP_PROC_TABLE_CORRUPT create view v1 as select bug14233_2(); ---error ER_SP_NORETURNEND -select * from v1; ---error ER_PARSE_ERROR +--error ER_SP_PROC_TABLE_CORRUPT call bug14233_3(); drop trigger t1_ai; create trigger t1_ai after insert on t1 for each row call bug14233_3(); ---error ER_PARSE_ERROR +--error ER_SP_PROC_TABLE_CORRUPT insert into t1 values (0); # Clean-up delete from mysql.proc where name like 'bug14233%'; drop trigger t1_ai; drop table t1; -drop view v1; -- cgit v1.2.1