summaryrefslogtreecommitdiff
path: root/mysql-test/r/trigger.result
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-10-23 12:35:56 +0400
committerunknown <kostja@bodhi.local>2006-10-23 12:35:56 +0400
commit20899cc9956caaa73d314a16c3b56b8ebd4a4f53 (patch)
tree55d8dd8c7c418b931fb38f3ee01b272e6327b15d /mysql-test/r/trigger.result
parent9bd73c11b86a168d08abe6f8a63b3d82809af876 (diff)
parente0a59773d08260b1c43e168fa2c8eae60ba69c4f (diff)
downloadmariadb-git-20899cc9956caaa73d314a16c3b56b8ebd4a4f53.tar.gz
Merge bodhi.local:/opt/local/work/mysql-5.0-runtime
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge mysql-test/r/im_daemon_life_cycle.result: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/rpl_insert_id.result: Auto merged mysql-test/r/sp-vars.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/func_gconcat.test: Auto merged mysql-test/t/im_daemon_life_cycle.imtest: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/rpl_insert_id.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/trigger.test: Auto merged server-tools/instance-manager/guardian.cc: Auto merged server-tools/instance-manager/guardian.h: Auto merged server-tools/instance-manager/instance_map.cc: Auto merged server-tools/instance-manager/listener.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_view.cc: Auto merged sql/sql_yacc.yy: Auto merged tests/mysql_client_test.c: Auto merged mysql-test/r/sp-error.result: Use local mysql-test/r/sp.result: Use local (will overwrite) mysql-test/t/view.test: Use local. mysql-test/mysql-test-run.pl: Manual merge. mysql-test/t/sp-error.test: Manual merge. server-tools/instance-manager/instance.cc: Manual merge. server-tools/instance-manager/manager.cc: Manual merge. server-tools/instance-manager/options.cc: Manual merge. server-tools/instance-manager/options.h: Manual merge. sql/log_event.cc: Manual merge. sql/set_var.cc: Manual merge. sql/sql_class.h: Manual merge. sql/sql_insert.cc: Manual merge. sql/sql_load.cc: Manual merge. sql/sql_select.cc: Manual merge. sql/sql_update.cc: Manual merge.
Diffstat (limited to 'mysql-test/r/trigger.result')
-rw-r--r--mysql-test/r/trigger.result64
1 files changed, 60 insertions, 4 deletions
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 5f027195e2e..52123885772 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -1073,10 +1073,11 @@ SELECT @x;
NULL
SET @x=2;
UPDATE t1 SET i1 = @x;
-ERROR 22012: Division by 0
+Warnings:
+Error 1365 Division by 0
SELECT @x;
@x
-2
+NULL
SET SQL_MODE='';
SET @x=3;
INSERT INTO t1 VALUES (@x);
@@ -1085,10 +1086,12 @@ SELECT @x;
NULL
SET @x=4;
UPDATE t1 SET i1 = @x;
-ERROR 22012: Division by 0
+Warnings:
+Error 1365 Division by 0
+Error 1365 Division by 0
SELECT @x;
@x
-4
+NULL
SET @@sql_mode=@save_sql_mode;
DROP TRIGGER t1_ai;
DROP TRIGGER t1_au;
@@ -1174,6 +1177,59 @@ ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghi
DROP TABLE t1;
DROP TABLE t2;
drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+drop table if exists t4;
+SET @save_sql_mode=@@sql_mode;
+SET sql_mode='TRADITIONAL'|
+create table t1 (id int(10) not null primary key, v int(10) )|
+create table t2 (id int(10) not null primary key, v int(10) )|
+create table t3 (id int(10) not null primary key, v int(10) )|
+create table t4 (c int)|
+create trigger t4_bi before insert on t4 for each row set @t4_bi_called:=1|
+create trigger t4_bu before update on t4 for each row set @t4_bu_called:=1|
+insert into t1 values(10, 10)|
+set @a:=1/0|
+Warnings:
+Error 1365 Division by 0
+select 1/0 from t1|
+1/0
+NULL
+Warnings:
+Error 1365 Division by 0
+create trigger t1_bi before insert on t1 for each row set @a:=1/0|
+insert into t1 values(20, 20)|
+Warnings:
+Error 1365 Division by 0
+drop trigger t1_bi|
+create trigger t1_bi before insert on t1 for each row
+begin
+insert into t2 values (new.id, new.v);
+update t2 set v=v+1 where id= new.id;
+replace t3 values (new.id, 0);
+update t2, t3 set t2.v=new.v, t3.v=new.v where t2.id=t3.id;
+create temporary table t5 select * from t1;
+delete from t5;
+insert into t5 select * from t1;
+insert into t4 values (0);
+set @check= (select count(*) from t5);
+update t4 set c= @check;
+drop temporary table t5;
+set @a:=1/0;
+end|
+set @check=0, @t4_bi_called=0, @t4_bu_called=0|
+insert into t1 values(30, 30)|
+Warnings:
+Error 1365 Division by 0
+select @check, @t4_bi_called, @t4_bu_called|
+@check @t4_bi_called @t4_bu_called
+2 1 1
+SET @@sql_mode=@save_sql_mode;
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+drop table if exists t1;
create table t1 (i int, j int key);
insert into t1 values (1,1), (2,2), (3,3);
create trigger t1_bu before update on t1 for each row