diff options
author | unknown <sanja@askmonty.org> | 2014-05-07 09:28:12 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2014-05-07 09:28:12 +0300 |
commit | 3f80740aa8fb24a0f9798e7239f0adb9f910e0a6 (patch) | |
tree | 85fc1ae8cb23e103f2a3af5c44d3a2c1546f1c9c /mysql-test | |
parent | 554fd30ba3f118d1ec2b89c0437bfd7f3cab9995 (diff) | |
parent | 285160dee270abbbfef9b7c1fb72ec4040c42262 (diff) | |
download | mariadb-git-3f80740aa8fb24a0f9798e7239f0adb9f910e0a6.tar.gz |
merge 5.5->5.3
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/view.result | 18 | ||||
-rw-r--r-- | mysql-test/t/view.test | 19 |
2 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 64aee1fd078..5656f66a935 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -5036,6 +5036,24 @@ id test 1 0 drop view v1; drop table t1; +# +# MDEV-5981: name resolution issues with views and multi-update +# in ps-protocol +# +create table t1 (id1 int primary key, val1 varchar(20)); +insert into t1 values (1, 'test1'); +create table t2 (id2 int primary key, val2 varchar(20)); +insert into t2 values (1, 'test2'); +create algorithm=merge view v1 as select id1 as id1v1, val1 as val1v1 from t1; +create algorithm=merge view v2 as +select t2.id2 as id2v2, t2.val2 as val2v2 +from t2, v1 +where t2.id2 = v1.id1v1; +prepare stmt1 from "update v2 set val2v2 = 'test19' where 1 = id2v2"; +execute stmt1; +deallocate prepare stmt1; +drop view v1,v2; +drop table t1,t2; # ----------------------------------------------------------------- # -- End of 5.3 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index a814132e165..13fdb8283fa 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -4952,6 +4952,25 @@ select * from v1; drop view v1; drop table t1; +--echo # +--echo # MDEV-5981: name resolution issues with views and multi-update +--echo # in ps-protocol +--echo # + +create table t1 (id1 int primary key, val1 varchar(20)); +insert into t1 values (1, 'test1'); +create table t2 (id2 int primary key, val2 varchar(20)); +insert into t2 values (1, 'test2'); +create algorithm=merge view v1 as select id1 as id1v1, val1 as val1v1 from t1; +create algorithm=merge view v2 as +select t2.id2 as id2v2, t2.val2 as val2v2 +from t2, v1 +where t2.id2 = v1.id1v1; +prepare stmt1 from "update v2 set val2v2 = 'test19' where 1 = id2v2"; +execute stmt1; +deallocate prepare stmt1; +drop view v1,v2; +drop table t1,t2; --echo # ----------------------------------------------------------------- --echo # -- End of 5.3 tests. --echo # ----------------------------------------------------------------- |