summaryrefslogtreecommitdiff
path: root/mysql-test/t/update.test
diff options
context:
space:
mode:
authorMartin Hansson <martin.hansson@sun.com>2010-03-10 17:10:05 +0100
committerMartin Hansson <martin.hansson@sun.com>2010-03-10 17:10:05 +0100
commitdcc5b43b35ace09f8a1ba6d0300f5dd17847b6d2 (patch)
tree34fe672ce298418ee7d8b172386c82fc67d5135c /mysql-test/t/update.test
parent6b69a14543fdcfa5992b886bfddf62fd92b10a89 (diff)
downloadmariadb-git-dcc5b43b35ace09f8a1ba6d0300f5dd17847b6d2.tar.gz
Bug#50545: Single table UPDATE IGNORE crashes on
join view in sql_safe_updates mode. This bug was unexpectedly fixed along with bug number 49534. This patch contains only the test case.
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r--mysql-test/t/update.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index 02e8763a630..f6708828a6b 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -467,3 +467,19 @@ UPDATE t2, t1 SET t2.f1 = 2, t1.f1 = 9;
ALTER TABLE t2 COMMENT = 'DEF';
DROP TABLE t1, t2;
+
+--echo #
+--echo # Bug#50545: Single table UPDATE IGNORE crashes on join view in
+--echo # sql_safe_updates mode.
+--echo #
+CREATE TABLE t1 ( a INT, KEY( a ) );
+INSERT INTO t1 VALUES (0), (1);
+CREATE VIEW v1 AS SELECT t11.a, t12.a AS b FROM t1 t11, t1 t12;
+SET SESSION sql_safe_updates = 1;
+
+--error ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE
+UPDATE IGNORE v1 SET a = 1;
+
+SET SESSION sql_safe_updates = DEFAULT;
+DROP TABLE t1;
+DROP VIEW v1;