Commit 36f34c1c authored by unknown's avatar unknown

Added test for bug #5893 "Triggers with dropped functions cause crashes"

(The bug itself was fixed earlier by the patch that fixed bug #5860
 "Multi-table UPDATE does not activate update triggers" and several
 other bugs). 


mysql-test/r/trigger.result:
  Added test for bug #5893 "Triggers with dropped functions cause crashes"
mysql-test/t/trigger.test:
  Added test for bug #5893 "Triggers with dropped functions cause crashes"
parent 10986dba
......@@ -482,3 +482,12 @@ i k ts
1 1 0000-00-00 00:00:00
2 2 0000-00-00 00:00:00
drop table t1, t2;
drop function if exists bug5893;
create table t1 (col1 int, col2 int);
insert into t1 values (1, 2);
create function bug5893 () returns int return 5;
create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
drop function bug5893;
update t1 set col2 = 4;
ERROR 42000: FUNCTION test.bug5893 does not exist
drop table t1;
......@@ -494,3 +494,17 @@ replace into t1 (i, k) values (2, 11);
select * from t1;
# Also drops all triggers
drop table t1, t2;
# Test for bug #5893 "Triggers with dropped functions cause crashes"
# Appropriate error should be reported instead of crash.
--disable_warnings
drop function if exists bug5893;
--enable_warnings
create table t1 (col1 int, col2 int);
insert into t1 values (1, 2);
create function bug5893 () returns int return 5;
create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
drop function bug5893;
--error 1305
update t1 set col2 = 4;
drop table t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment