mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
main.alter_table_online_debug: remove explicit innodb
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
set global default_storage_engine= innodb;
|
||||
set default_storage_engine= innodb;
|
||||
connect con2, localhost, root,,;
|
||||
connection default;
|
||||
@ -289,7 +290,7 @@ set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
|
||||
alter table t1 add b int NULL, algorithm= copy, lock= none;
|
||||
connection con2;
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6);
|
||||
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
|
||||
Got one of the listed errors
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
@ -496,6 +497,7 @@ a b UNIX_TIMESTAMP(row_start) UNIX_TIMESTAMP(row_end)
|
||||
6 77 1.000000 2147483647.999999
|
||||
alter table t1 drop system versioning, algorithm= copy, lock= none;
|
||||
ERROR 0A000: LOCK=NONE is not supported. Reason: DROP SYSTEM VERSIONING. Try LOCK=SHARED
|
||||
drop table t1;
|
||||
#
|
||||
# Test ROLLBACK TO SAVEPOINT
|
||||
#
|
||||
@ -582,7 +584,7 @@ set debug_sync= 'reset';
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
create table t1 (a char(6), b int) engine=innodb;
|
||||
create table t1 (a char(6), b int);
|
||||
insert t1 values ('abcde1',1),('abcde2',2);
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
connection con2;
|
||||
@ -838,7 +840,7 @@ a b
|
||||
drop table t1;
|
||||
set debug_sync= 'reset';
|
||||
## CHECK, UPDATE
|
||||
create table t1 (a int) engine=innodb;
|
||||
create table t1 (a int);
|
||||
insert t1 values (1),(2),(3),(4);
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
connection con2;
|
||||
@ -863,7 +865,7 @@ a
|
||||
14
|
||||
drop table t1;
|
||||
## DEFAULT, UPDATE
|
||||
create table t1 (a int) engine=innodb;
|
||||
create table t1 (a int);
|
||||
insert t1 values (1),(2),(3),(4);
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
connection con2;
|
||||
@ -892,7 +894,7 @@ a b
|
||||
drop table t1;
|
||||
set debug_sync= 'reset';
|
||||
## VCOL + CHECK
|
||||
create table t1 (a int) engine=innodb;
|
||||
create table t1 (a int);
|
||||
insert t1 values (1),(2),(3),(4);
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
connection con2;
|
||||
@ -939,8 +941,8 @@ connection default;
|
||||
drop table t1;
|
||||
set debug_sync= reset;
|
||||
###
|
||||
create table t1 (a text, unique(a)) engine=innodb;
|
||||
create table t2 (b text, unique(b)) engine=innodb;
|
||||
create table t1 (a text, unique(a));
|
||||
create table t2 (b text, unique(b));
|
||||
insert into t2 values (null),(null);
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
connection con2;
|
||||
@ -958,7 +960,7 @@ set debug_sync= reset;
|
||||
#
|
||||
# MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
|
||||
#
|
||||
create table t (a int) engine=innodb;
|
||||
create table t (a int);
|
||||
insert into t values (1);
|
||||
xa begin 'xid';
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
@ -1303,7 +1305,7 @@ drop table t;
|
||||
# Test that correct fields are marked as explicit:
|
||||
# Drop a, reorder b, add new column with default.
|
||||
#
|
||||
create table t (a int primary key, b int) engine=innodb;
|
||||
create table t (a int primary key, b int);
|
||||
insert into t values (1, 1), (2, 2), (3, 3);
|
||||
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
||||
alter table t drop primary key, drop a,
|
||||
@ -1334,7 +1336,7 @@ c x
|
||||
3 123456
|
||||
drop table t;
|
||||
# Test that all the fields are unpacked.
|
||||
create table t (a int, b int) engine=innodb;
|
||||
create table t (a int, b int);
|
||||
insert into t values (NULL, 123), (NULL, 456);
|
||||
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
||||
alter table t drop a, add primary key(b), algorithm=copy;
|
||||
@ -1464,7 +1466,7 @@ INSERT iso_levels VALUES (0, "READ UNCOMMITTED"),
|
||||
(1, "READ COMMITTED"),
|
||||
(2, "REPEATABLE READ"),
|
||||
(3, "SERIALIZABLE");
|
||||
create table t1 (a int, b int, key(b)) engine=innodb;
|
||||
create table t1 (a int, b int, key(b));
|
||||
connection con2;
|
||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||
connection default;
|
||||
@ -1477,7 +1479,7 @@ delete from t1 where b is null;
|
||||
set debug_sync= "now signal goalters";
|
||||
connection default;
|
||||
drop table t1;
|
||||
create table t1 (a int, b int, key(b)) engine=innodb;
|
||||
create table t1 (a int, b int, key(b));
|
||||
connection con2;
|
||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||
connection default;
|
||||
@ -1490,7 +1492,7 @@ delete from t1 where b is null;
|
||||
set debug_sync= "now signal goalters";
|
||||
connection default;
|
||||
drop table t1;
|
||||
create table t1 (a int, b int, key(b)) engine=innodb;
|
||||
create table t1 (a int, b int, key(b));
|
||||
connection con2;
|
||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||
connection default;
|
||||
@ -1503,7 +1505,7 @@ delete from t1 where b is null;
|
||||
set debug_sync= "now signal goalters";
|
||||
connection default;
|
||||
drop table t1;
|
||||
create table t1 (a int, b int, key(b)) engine=innodb;
|
||||
create table t1 (a int, b int, key(b));
|
||||
connection con2;
|
||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||
connection default;
|
||||
@ -1520,8 +1522,8 @@ set debug_sync= reset;
|
||||
drop table iso_levels;
|
||||
# MDEV-32126 Assertion fails upon online ALTER and binary log enabled
|
||||
create temporary table tmp (id int, primary key(id)) engine=innodb;
|
||||
create table t1 (a int, b text) engine=innodb;
|
||||
create table t2 (a int, b int, c char(8), d text, unique(a)) engine=innodb;
|
||||
create table t1 (a int, b text);
|
||||
create table t2 (a int, b int, c char(8), d text, unique(a));
|
||||
insert into t2 values (1,1,'f','e'),(1000,1000,'c','b');
|
||||
connection default;
|
||||
set debug_sync= 'alter_table_online_before_lock signal go_trx wait_for go_alter';
|
||||
@ -1540,7 +1542,7 @@ truncate t2;
|
||||
set @@binlog_format=mixed;
|
||||
connection con2;
|
||||
start transaction;
|
||||
create temporary table tmp (id int, primary key(id)) engine=innodb;
|
||||
create temporary table tmp (id int, primary key(id));
|
||||
insert into t1 values (1, repeat('x',8000)),(2, repeat('x',8000));
|
||||
update t2 set b = null order by b limit 2;
|
||||
insert into t1 values (3, repeat('x',8000));
|
||||
@ -1564,7 +1566,7 @@ drop table t1, t2;
|
||||
set @@binlog_format=default;
|
||||
set debug_sync= reset;
|
||||
# MDEV-32444 Data from orphaned XA transaction is lost after online alter
|
||||
create table t (a int primary key) engine=innodb;
|
||||
create table t (a int primary key);
|
||||
insert into t values (1);
|
||||
# XA commit
|
||||
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for go';
|
||||
@ -1673,6 +1675,7 @@ connect con1, localhost, root,,;
|
||||
connection default;
|
||||
drop table t;
|
||||
set debug_sync= reset;
|
||||
set global default_storage_engine= MyISAM;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
#
|
||||
|
Reference in New Issue
Block a user