diff options
Diffstat (limited to 'mysql-test/r/multi_update.result')
-rw-r--r-- | mysql-test/r/multi_update.result | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 5991a5fd25a..ec8ba1c53d3 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -1018,7 +1018,48 @@ execute stmt1; deallocate prepare stmt1; drop view v3,v2,v1; drop table t1,t2,t3; -end of 5.5 tests +create table t1 (id int not null, v1 varchar(10) not null); +insert into t1 values (1,1),(2,2); +create table t2 (log varchar(10) not null); +create trigger t1_after_update after update on t1 +for each row insert into t2 values ('triggered'); +create user foo; +grant select, insert, update, delete, create, drop, reload, index, alter, show databases, create temporary tables, lock tables, execute, create view, show view, create routine, alter routine, trigger on *.* to 'foo'@'%'; +set global read_only=1; +create temporary table temp_t1 (id int not null, update_me varchar(10)); +insert into temp_t1 values (1,1),(2,2),(3,3); +update temp_t1 left join t1 on temp_t1.id = t1.id set temp_t1.update_me = 'hello'; +set global read_only = 0; +create table t3 (id int not null); +insert t3 values (2); +update t1 left join t3 on t1.id = t3.id set t1.v1 = 'hello'; +select * from t2; +log +triggered +triggered +drop table t1,t2, t3; +drop user foo; +create table t1 (a int, b int); +create table t2 (c int, d int); +insert t1 values (1,2),(3,4); +insert t2 values (5,6),(7,8); +create table t0 (x int); +insert t0 values (11), (22); +create trigger tr1 before update on t2 for each row insert t0 values (new.c); +lock table t0 write; +update t1 join t2 on (a=c+4) set b=d; +drop table t1, t2, t0; +create table t1 (a int, b varchar(50), c varchar(50)); +insert t1 (a,b) values (1,'1'), (2,'2'), (3,'3'); +create function f1() returns varchar(50) return 'result'; +create trigger tr before update on t1 for each row set new.c = (select f1()); +create table t2 select a, b from t1; +update t1 join t2 using (a) set t1.b = t2.b; +drop table t1, t2; +drop function f1; +# +# end of 5.5 tests +# # Bug mdev-5970 # Bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD |