summaryrefslogtreecommitdiff
path: root/mysql-test/t/multi_update.test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2003-12-11 14:55:48 -0800
committerunknown <igor@rurik.mysql.com>2003-12-11 14:55:48 -0800
commit9570d010d571d62a9cbdc9674606b1f154b4dead (patch)
tree27bbc53533e288c5402000d6358fe6b91ed1eb32 /mysql-test/t/multi_update.test
parent28b1f63aa7f6ed40d68c932cfe33420c12c7347d (diff)
downloadmariadb-git-9570d010d571d62a9cbdc9674606b1f154b4dead.tar.gz
Many files:
Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). sql/sql_class.h: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). sql/sql_delete.cc: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). sql/sql_update.cc: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). mysql-test/t/multi_update.test: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). mysql-test/r/multi_update.result: Fixed a bug causing a crash for multi-update/multi-delete with impossible where (bug #1860). BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysql-test/t/multi_update.test')
-rw-r--r--mysql-test/t/multi_update.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 7aa4e74cec0..61a284a7aec 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -267,3 +267,29 @@ insert into t2 values (1,1), (3,1);
update t1 left join t2 on t1.a=t2.a set t1.b=2, t2.b=2 where t1.b=1 and t2.b=1 or t2.a is NULL;
select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and t2.b=1 or t2.a is NULL;
drop table t1,t2;
+
+# Test multi-update and multi-delete with impossible where
+
+drop table if exists t1, t2;
+create table t1(id1 smallint(5), field char(5));
+create table t2(id2 smallint(5), field char(5));
+
+insert into t1 values (1, 'a'), (2, 'aa');
+insert into t2 values (1, 'b'), (2, 'bb');
+
+select * from t1;
+select * from t2;
+
+update t2 inner join t1 on t1.id1=t2.id2
+ set t2.field=t1.field
+ where 0=1;
+update t2, t1 set t2.field=t1.field
+ where t1.id1=t2.id2 and 0=1;
+
+delete t1, t2 from t2 inner join t1 on t1.id1=t2.id2
+ where 0=1;
+delete t1, t2 from t2,t1
+ where t1.id1=t2.id2 and 0=1;
+
+drop table t1,t2;
+