1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

main.alter_table_online_debug: remove explicit innodb

This commit is contained in:
Nikita Malyavin
2023-10-20 17:06:22 +04:00
parent 23f9e34256
commit f7646d890b
2 changed files with 41 additions and 34 deletions

View File

@ -4,8 +4,10 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
--source include/have_partition.inc
set default_storage_engine= innodb;
let $default_storage_engine= `select @@global.default_storage_engine`;
set global default_storage_engine= innodb;
set default_storage_engine= innodb;
--connect (con2, localhost, root,,)
--connection default
@ -368,7 +370,7 @@ alter table t1 add b int NULL, algorithm= copy, lock= none;
--connection con2
--reap
--error ER_DUP_ENTRY
--error ER_DUP_ENTRY,ER_DUP_KEY
insert into t1 values (1),(2),(3),(4),(5),(6);
select * from t1;
set debug_sync= 'now SIGNAL end';
@ -629,6 +631,7 @@ alter table t1 drop system versioning, algorithm= copy, lock= none;
#--reap
#show create table t1;
#select * from t1;
drop table t1;
--echo #
--echo # Test ROLLBACK TO SAVEPOINT
@ -730,7 +733,7 @@ drop table t3;
#
# Lossy alter, Update_row_log_event cannot find 'abcde2' in the new table
#
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);
--send set debug_sync= 'now wait_for downgraded'
--connection con2
@ -1007,7 +1010,7 @@ drop table t1;
set debug_sync= 'reset';
--echo ## CHECK, UPDATE
create table t1 (a int) engine=innodb;
create table t1 (a int);
insert t1 values (1),(2),(3),(4);
--send set debug_sync= 'now wait_for downgraded'
--connection con2
@ -1026,7 +1029,7 @@ select * from t1;
drop table t1;
--echo ## DEFAULT, UPDATE
create table t1 (a int) engine=innodb;
create table t1 (a int);
insert t1 values (1),(2),(3),(4);
--send set debug_sync= 'now wait_for downgraded'
--connection con2
@ -1048,7 +1051,7 @@ drop table t1;
set debug_sync= 'reset';
--echo ## VCOL + CHECK
create table t1 (a int) engine=innodb;
create table t1 (a int);
insert t1 values (1),(2),(3),(4);
--send set debug_sync= 'now wait_for downgraded'
--connection con2
@ -1097,8 +1100,8 @@ set debug_sync= reset;
--echo ###
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);
--send
set debug_sync= 'now wait_for downgraded';
@ -1126,7 +1129,7 @@ set debug_sync= reset;
--echo #
--echo # MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
--echo #
create table t (a int) engine=innodb;
create table t (a int);
insert into t values (1);
xa begin 'xid';
--send
@ -1513,7 +1516,7 @@ drop table t;
--echo # Test that correct fields are marked as explicit:
--echo # Drop a, reorder b, add new column with default.
--echo #
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";
@ -1539,7 +1542,7 @@ select * from t;
drop table t;
--echo # 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";
@ -1711,7 +1714,7 @@ while($tx_iso_id) {
dec $tx_iso_id;
let tx_iso= `select level from iso_levels where id = $tx_iso_id`;
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);
@ -1738,8 +1741,8 @@ drop table iso_levels;
--echo # 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';
@ -1760,7 +1763,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));
@ -1793,7 +1796,7 @@ set debug_sync= reset;
--echo # 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);
--echo # XA commit
@ -1919,6 +1922,7 @@ select * from t;
--connection default
drop table t;
set debug_sync= reset;
eval set global default_storage_engine= $default_storage_engine;
--disconnect con1
--disconnect con2