1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fix for bug #16829 "Firing trigger with RETURN crashes the server"

We should disallow usage of RETURN statement in triggers and emit
error at parsing time (instead of crashing when trigger is fired).


mysql-test/r/trigger.result:
  Added test for bug #16829 "Firing trigger with RETURN crashes the server".
mysql-test/t/trigger.test:
  Added test for bug #16829 "Firing trigger with RETURN crashes the server".
sql/sql_yacc.yy:
  We should disallow usage of RETURN statement in triggers and emit
  error at parsing time (instead of crashing when trigger is fired).
This commit is contained in:
unknown
2006-01-28 12:50:16 +03:00
parent ae951e0f72
commit a1b67ce2a2
3 changed files with 15 additions and 1 deletions

View File

@ -785,3 +785,8 @@ create trigger test.t1_bi before insert on t1 for each row set @a:=0;
ERROR 3D000: No database selected
drop trigger t1_bi;
ERROR 3D000: No database selected
create table t1 (i int);
create trigger t1_bi before insert on t1 for each row return 0;
ERROR 42000: RETURN is only allowed in a FUNCTION
insert into t1 values (1);
drop table t1;