diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-06-14 22:10:50 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-06-14 22:10:50 +0200 |
commit | f66d1850ac30922eaa49c0131d89efc8357155ff (patch) | |
tree | cb69c43694146bb7993078e76e203ded4ca48a5e /mysql-test/main/multi_update.result | |
parent | 772c5f3c78fcdaea2169ba435bac8d851c7945c7 (diff) | |
parent | 1135244a647e423f6a7b2122ad9c305253039399 (diff) | |
download | mariadb-git-f66d1850ac30922eaa49c0131d89efc8357155ff.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/main/multi_update.result')
-rw-r--r-- | mysql-test/main/multi_update.result | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result index 4a16a7af3f6..4ba5c360538 100644 --- a/mysql-test/main/multi_update.result +++ b/mysql-test/main/multi_update.result @@ -412,7 +412,6 @@ c2_id c2_p_id c2_note c2_active 1 1 A Note 1 drop table t1, t2; connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; -connection root; create database mysqltest; create table mysqltest.t1 (a int, b int, primary key (a)); create table mysqltest.t2 (a int, b int, primary key (a)); @@ -421,7 +420,6 @@ create user mysqltest_1@localhost; grant select on mysqltest.* to mysqltest_1@localhost; grant update on mysqltest.t1 to mysqltest_1@localhost; connect user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK; -connection user1; update t1, t2 set t1.b=1 where t1.a=t2.a; update t1, t2 set t1.b=(select t3.b from t3 where t1.a=t3.a) where t1.a=t2.a; connection root; @@ -456,13 +454,10 @@ create table t2 (a int); insert into t2 values (10), (20), (30); create view v1 as select a as b, a/10 as a from t2; connect locker,localhost,root,,test; -connection locker; lock table t1 write; connect changer,localhost,root,,test; -connection changer; alter table t1 add column c int default 100 after a; connect updater,localhost,root,,test; -connection updater; update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a; connection locker; unlock tables; @@ -963,7 +958,30 @@ triggered triggered drop table t1,t2, t3; drop user foo; -end of 5.5 tests +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); +connect con1, localhost, root; +lock table t0 write; +connection default; +update t1 join t2 on (a=c+4) set b=d; +disconnect con1; +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 +# create table t1 (c1 int, c3 int); insert t1(c3) values (1), (2), (3), (4), (5), (6), (7), (8); create table t2 select * from t1; |