summaryrefslogtreecommitdiff
path: root/mysql-test/t/multi_update.test
diff options
context:
space:
mode:
authorMartin Hansson <martin.hansson@oracle.com>2010-09-07 10:00:52 +0200
committerMartin Hansson <martin.hansson@oracle.com>2010-09-07 10:00:52 +0200
commit5c5cd5764964def5ef85e9504a53f465c1ad6ec9 (patch)
tree9f7e4eb9b1cbd07f92d0278414b67f7473532f06 /mysql-test/t/multi_update.test
parent000c50afe6c2918d48384b691fbab1d865fee77a (diff)
parent446cc653c0ab13a6fec8ab54de9f5596389b08bc (diff)
downloadmariadb-git-5c5cd5764964def5ef85e9504a53f465c1ad6ec9.tar.gz
Merge of fix for Bug#54543. Test case only (bug is not present in this tree).
Diffstat (limited to 'mysql-test/t/multi_update.test')
-rw-r--r--mysql-test/t/multi_update.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 166d36856a6..8ed0ed45b82 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -650,5 +650,26 @@ SET SESSION sql_safe_updates = 1;
UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1;
DROP TABLE t1;
+--echo #
+--echo # Bug#54543: update ignore with incorrect subquery leads to assertion
+--echo # failure: inited==INDEX
+--echo #
+SET SESSION sql_safe_updates = 0;
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (1), (2);
+
+CREATE TABLE t2 ( a INT );
+INSERT INTO t2 VALUES (1), (2);
+
+CREATE TABLE t3 ( a INT );
+INSERT INTO t3 VALUES (1), (2);
+
+--echo # Should not crash
+UPDATE IGNORE
+ ( SELECT ( SELECT COUNT(*) FROM t1 GROUP BY a, @v ) a FROM t2 ) x, t3
+SET t3.a = 0;
+
+DROP TABLE t1, t2, t3;
+SET SESSION sql_safe_updates = DEFAULT;
--echo end of tests