summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2003-12-02 21:16:57 +0300
committerunknown <sergefp@mysql.com>2003-12-02 21:16:57 +0300
commit25be07f05125fed0326b3b36eb344cfe535f8e46 (patch)
tree808f1ce6e55311ca691a839b553e07984ea6a3ba /mysql-test
parent465881c21adc49f0818f26d90cb9ca7203250c1e (diff)
parent8be4234f6162da34e1ecd007b67b3ef0650b16d1 (diff)
downloadmariadb-git-25be07f05125fed0326b3b36eb344cfe535f8e46.tar.gz
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/multi_update.result26
-rw-r--r--mysql-test/t/multi_update.test46
2 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 350cea420b6..233c99fb22b 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -327,3 +327,29 @@ select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and
a b a b
2 2 NULL NULL
drop table t1,t2;
+set @ttype_save=@@table_type;
+set @@table_type=innodb;
+create table t1 ( c char(8) not null );
+insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
+insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
+alter table t1 add b char(8) not null;
+alter table t1 add a char(8) not null;
+alter table t1 add primary key (a,b,c);
+update t1 set a=c, b=c;
+create table t2 like t1;
+insert into t2 select * from t1;
+delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
+drop table t1,t2;
+set @@table_type=bdb;
+create table t1 ( c char(8) not null );
+insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
+insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
+alter table t1 add b char(8) not null;
+alter table t1 add a char(8) not null;
+alter table t1 add primary key (a,b,c);
+update t1 set a=c, b=c;
+create table t2 like t1;
+insert into t2 select * from t1;
+delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
+set @@table_type=@ttype_save;
+drop table t1,t2;
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 7aa4e74cec0..bf6c3db9306 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -267,3 +267,49 @@ 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 for bug #1980.
+#
+set @ttype_save=@@table_type;
+
+--disable_warnings
+set @@table_type=innodb;
+create table t1 ( c char(8) not null );
+--enable_warnings
+
+insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
+insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
+
+alter table t1 add b char(8) not null;
+alter table t1 add a char(8) not null;
+alter table t1 add primary key (a,b,c);
+update t1 set a=c, b=c;
+
+create table t2 like t1;
+insert into t2 select * from t1;
+
+delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
+
+drop table t1,t2;
+
+--disable_warnings
+set @@table_type=bdb;
+create table t1 ( c char(8) not null );
+--enable_warnings
+
+insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
+insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
+
+alter table t1 add b char(8) not null;
+alter table t1 add a char(8) not null;
+alter table t1 add primary key (a,b,c);
+update t1 set a=c, b=c;
+
+create table t2 like t1;
+insert into t2 select * from t1;
+
+delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
+
+set @@table_type=@ttype_save;
+drop table t1,t2;