mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug #1980
This commit is contained in:
@ -363,3 +363,30 @@ t2 rows after big delete 1900001
|
||||
select 't1 rows after big delete', count(*) from t1;
|
||||
t1 rows after big delete count(*)
|
||||
t1 rows after big delete 1900001
|
||||
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;
|
||||
|
@ -309,4 +309,50 @@ delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 100*1000;
|
||||
select 't2 rows after big delete', count(*) from t2;
|
||||
select 't1 rows after big delete', count(*) from t1;
|
||||
|
||||
#drop table t1,t2;
|
||||
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;
|
||||
|
Reference in New Issue
Block a user