diff options
Diffstat (limited to 'mysql-test/t/multi_update.test')
-rw-r--r-- | mysql-test/t/multi_update.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 0a7e6b221eb..bd5d7a9768c 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -901,3 +901,17 @@ deallocate prepare stmt1; drop view v3,v2,v1; drop table t1,t2,t3; --echo end of 5.5 tests + +# +# MDEV-13911 Support ORDER BY and LIMIT in multi-table update +# + +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; +update t1, t2 set t1.c1=t2.c3 where t1.c3=t2.c3 order by t1.c3 limit 3; +select * from t1; +update t1 set c1=NULL; +update t1, t2 set t1.c1=t2.c3 where t1.c3=t2.c3 order by t1.c3 desc limit 2; +select * from t1; +drop table t1, t2; |