summaryrefslogtreecommitdiff
path: root/mysql-test/main/multi_update.result
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-06-14 07:36:47 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-06-14 07:36:47 +0200
commit4a3d51c76c131e7b5348d7c714a619f82de32d39 (patch)
tree4fb180861c733e364af930529565a7b799c4833a /mysql-test/main/multi_update.result
parentd9fe615ef6862c85c5aada96d4f5b62b7093177c (diff)
parent50653e021f1678c3c28c6b5886fadb9fcf8d87ff (diff)
downloadmariadb-git-4a3d51c76c131e7b5348d7c714a619f82de32d39.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/main/multi_update.result')
-rw-r--r--mysql-test/main/multi_update.result30
1 files changed, 24 insertions, 6 deletions
diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result
index 2cc85039e3a..9d59244dd8b 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;