summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <dlenev@mysql.com>2006-01-31 15:51:55 +0300
committerunknown <dlenev@mysql.com>2006-01-31 15:51:55 +0300
commit852a5405e6180571106daac3d9c5c33564aa4dfa (patch)
tree9aa1d38d87ac204c6ef4b51ea5d3292f8bf594e0 /mysql-test
parent5dda41a7170b3d46a8059d006333b44152b55de8 (diff)
parent4675b563e29feba00e73adedfc285c6d19998401 (diff)
downloadmariadb-git-852a5405e6180571106daac3d9c5c33564aa4dfa.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg16829 sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/trigger.result5
-rw-r--r--mysql-test/t/trigger.test9
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index d125f4451d8..62c0d01327d 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -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;
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index 492e37d9543..c3cc8e3f8e8 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -958,3 +958,12 @@ create trigger test.t1_bi before insert on t1 for each row set @a:=0;
--error ER_NO_DB_ERROR
drop trigger t1_bi;
connection default;
+
+# Test for bug #16829 "Firing trigger with RETURN crashes the server"
+# RETURN is not supposed to be used anywhere except functions, so error
+# should be returned when one attempts to create trigger with RETURN.
+create table t1 (i int);
+--error ER_SP_BADRETURN
+create trigger t1_bi before insert on t1 for each row return 0;
+insert into t1 values (1);
+drop table t1;