mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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;
|
set default_storage_engine= innodb;
|
||||||
connect con2, localhost, root,,;
|
connect con2, localhost, root,,;
|
||||||
connection default;
|
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;
|
alter table t1 add b int NULL, algorithm= copy, lock= none;
|
||||||
connection con2;
|
connection con2;
|
||||||
insert into t1 values (1),(2),(3),(4),(5),(6);
|
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;
|
select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@@ -496,6 +497,7 @@ a b UNIX_TIMESTAMP(row_start) UNIX_TIMESTAMP(row_end)
|
|||||||
6 77 1.000000 2147483647.999999
|
6 77 1.000000 2147483647.999999
|
||||||
alter table t1 drop system versioning, algorithm= copy, lock= none;
|
alter table t1 drop system versioning, algorithm= copy, lock= none;
|
||||||
ERROR 0A000: LOCK=NONE is not supported. Reason: DROP SYSTEM VERSIONING. Try LOCK=SHARED
|
ERROR 0A000: LOCK=NONE is not supported. Reason: DROP SYSTEM VERSIONING. Try LOCK=SHARED
|
||||||
|
drop table t1;
|
||||||
#
|
#
|
||||||
# Test ROLLBACK TO SAVEPOINT
|
# Test ROLLBACK TO SAVEPOINT
|
||||||
#
|
#
|
||||||
@@ -582,7 +584,7 @@ set debug_sync= 'reset';
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
drop table t3;
|
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);
|
insert t1 values ('abcde1',1),('abcde2',2);
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
connection con2;
|
connection con2;
|
||||||
@@ -838,7 +840,7 @@ a b
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
set debug_sync= 'reset';
|
set debug_sync= 'reset';
|
||||||
## CHECK, UPDATE
|
## CHECK, UPDATE
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int);
|
||||||
insert t1 values (1),(2),(3),(4);
|
insert t1 values (1),(2),(3),(4);
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
connection con2;
|
connection con2;
|
||||||
@@ -863,7 +865,7 @@ a
|
|||||||
14
|
14
|
||||||
drop table t1;
|
drop table t1;
|
||||||
## DEFAULT, UPDATE
|
## DEFAULT, UPDATE
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int);
|
||||||
insert t1 values (1),(2),(3),(4);
|
insert t1 values (1),(2),(3),(4);
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
connection con2;
|
connection con2;
|
||||||
@@ -892,7 +894,7 @@ a b
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
set debug_sync= 'reset';
|
set debug_sync= 'reset';
|
||||||
## VCOL + CHECK
|
## VCOL + CHECK
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int);
|
||||||
insert t1 values (1),(2),(3),(4);
|
insert t1 values (1),(2),(3),(4);
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
connection con2;
|
connection con2;
|
||||||
@@ -939,8 +941,8 @@ connection default;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
set debug_sync= reset;
|
set debug_sync= reset;
|
||||||
###
|
###
|
||||||
create table t1 (a text, unique(a)) engine=innodb;
|
create table t1 (a text, unique(a));
|
||||||
create table t2 (b text, unique(b)) engine=innodb;
|
create table t2 (b text, unique(b));
|
||||||
insert into t2 values (null),(null);
|
insert into t2 values (null),(null);
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
connection con2;
|
connection con2;
|
||||||
@@ -958,7 +960,7 @@ set debug_sync= reset;
|
|||||||
#
|
#
|
||||||
# MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
|
# 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);
|
insert into t values (1);
|
||||||
xa begin 'xid';
|
xa begin 'xid';
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
@@ -1303,7 +1305,7 @@ drop table t;
|
|||||||
# Test that correct fields are marked as explicit:
|
# Test that correct fields are marked as explicit:
|
||||||
# Drop a, reorder b, add new column with default.
|
# 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);
|
insert into t values (1, 1), (2, 2), (3, 3);
|
||||||
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
||||||
alter table t drop primary key, drop a,
|
alter table t drop primary key, drop a,
|
||||||
@@ -1334,7 +1336,7 @@ c x
|
|||||||
3 123456
|
3 123456
|
||||||
drop table t;
|
drop table t;
|
||||||
# Test that all the fields are unpacked.
|
# 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);
|
insert into t values (NULL, 123), (NULL, 456);
|
||||||
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
||||||
alter table t drop a, add primary key(b), algorithm=copy;
|
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"),
|
(1, "READ COMMITTED"),
|
||||||
(2, "REPEATABLE READ"),
|
(2, "REPEATABLE READ"),
|
||||||
(3, "SERIALIZABLE");
|
(3, "SERIALIZABLE");
|
||||||
create table t1 (a int, b int, key(b)) engine=innodb;
|
create table t1 (a int, b int, key(b));
|
||||||
connection con2;
|
connection con2;
|
||||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||||
connection default;
|
connection default;
|
||||||
@@ -1477,7 +1479,7 @@ delete from t1 where b is null;
|
|||||||
set debug_sync= "now signal goalters";
|
set debug_sync= "now signal goalters";
|
||||||
connection default;
|
connection default;
|
||||||
drop table t1;
|
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;
|
connection con2;
|
||||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||||
connection default;
|
connection default;
|
||||||
@@ -1490,7 +1492,7 @@ delete from t1 where b is null;
|
|||||||
set debug_sync= "now signal goalters";
|
set debug_sync= "now signal goalters";
|
||||||
connection default;
|
connection default;
|
||||||
drop table t1;
|
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;
|
connection con2;
|
||||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||||
connection default;
|
connection default;
|
||||||
@@ -1503,7 +1505,7 @@ delete from t1 where b is null;
|
|||||||
set debug_sync= "now signal goalters";
|
set debug_sync= "now signal goalters";
|
||||||
connection default;
|
connection default;
|
||||||
drop table t1;
|
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;
|
connection con2;
|
||||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
||||||
connection default;
|
connection default;
|
||||||
@@ -1520,8 +1522,8 @@ set debug_sync= reset;
|
|||||||
drop table iso_levels;
|
drop table iso_levels;
|
||||||
# MDEV-32126 Assertion fails upon online ALTER and binary log enabled
|
# MDEV-32126 Assertion fails upon online ALTER and binary log enabled
|
||||||
create temporary table tmp (id int, primary key(id)) engine=innodb;
|
create temporary table tmp (id int, primary key(id)) engine=innodb;
|
||||||
create table t1 (a int, b text) engine=innodb;
|
create table t1 (a int, b text);
|
||||||
create table t2 (a int, b int, c char(8), d text, unique(a)) engine=innodb;
|
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');
|
insert into t2 values (1,1,'f','e'),(1000,1000,'c','b');
|
||||||
connection default;
|
connection default;
|
||||||
set debug_sync= 'alter_table_online_before_lock signal go_trx wait_for go_alter';
|
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;
|
set @@binlog_format=mixed;
|
||||||
connection con2;
|
connection con2;
|
||||||
start transaction;
|
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));
|
insert into t1 values (1, repeat('x',8000)),(2, repeat('x',8000));
|
||||||
update t2 set b = null order by b limit 2;
|
update t2 set b = null order by b limit 2;
|
||||||
insert into t1 values (3, repeat('x',8000));
|
insert into t1 values (3, repeat('x',8000));
|
||||||
@@ -1564,7 +1566,7 @@ drop table t1, t2;
|
|||||||
set @@binlog_format=default;
|
set @@binlog_format=default;
|
||||||
set debug_sync= reset;
|
set debug_sync= reset;
|
||||||
# MDEV-32444 Data from orphaned XA transaction is lost after online alter
|
# 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);
|
insert into t values (1);
|
||||||
# XA commit
|
# XA commit
|
||||||
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for go';
|
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for go';
|
||||||
@@ -1673,6 +1675,7 @@ connect con1, localhost, root,,;
|
|||||||
connection default;
|
connection default;
|
||||||
drop table t;
|
drop table t;
|
||||||
set debug_sync= reset;
|
set debug_sync= reset;
|
||||||
|
set global default_storage_engine= MyISAM;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
disconnect con2;
|
disconnect con2;
|
||||||
#
|
#
|
||||||
|
@@ -4,8 +4,10 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_sequence.inc
|
--source include/have_sequence.inc
|
||||||
--source include/have_partition.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,,)
|
--connect (con2, localhost, root,,)
|
||||||
--connection default
|
--connection default
|
||||||
|
|
||||||
@@ -368,7 +370,7 @@ alter table t1 add b int NULL, algorithm= copy, lock= none;
|
|||||||
|
|
||||||
--connection con2
|
--connection con2
|
||||||
--reap
|
--reap
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY,ER_DUP_KEY
|
||||||
insert into t1 values (1),(2),(3),(4),(5),(6);
|
insert into t1 values (1),(2),(3),(4),(5),(6);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
set debug_sync= 'now SIGNAL end';
|
set debug_sync= 'now SIGNAL end';
|
||||||
@@ -629,6 +631,7 @@ alter table t1 drop system versioning, algorithm= copy, lock= none;
|
|||||||
#--reap
|
#--reap
|
||||||
#show create table t1;
|
#show create table t1;
|
||||||
#select * from t1;
|
#select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test ROLLBACK TO SAVEPOINT
|
--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
|
# 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);
|
insert t1 values ('abcde1',1),('abcde2',2);
|
||||||
--send set debug_sync= 'now wait_for downgraded'
|
--send set debug_sync= 'now wait_for downgraded'
|
||||||
--connection con2
|
--connection con2
|
||||||
@@ -1007,7 +1010,7 @@ drop table t1;
|
|||||||
set debug_sync= 'reset';
|
set debug_sync= 'reset';
|
||||||
|
|
||||||
--echo ## CHECK, UPDATE
|
--echo ## CHECK, UPDATE
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int);
|
||||||
insert t1 values (1),(2),(3),(4);
|
insert t1 values (1),(2),(3),(4);
|
||||||
--send set debug_sync= 'now wait_for downgraded'
|
--send set debug_sync= 'now wait_for downgraded'
|
||||||
--connection con2
|
--connection con2
|
||||||
@@ -1026,7 +1029,7 @@ select * from t1;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo ## DEFAULT, UPDATE
|
--echo ## DEFAULT, UPDATE
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int);
|
||||||
insert t1 values (1),(2),(3),(4);
|
insert t1 values (1),(2),(3),(4);
|
||||||
--send set debug_sync= 'now wait_for downgraded'
|
--send set debug_sync= 'now wait_for downgraded'
|
||||||
--connection con2
|
--connection con2
|
||||||
@@ -1048,7 +1051,7 @@ drop table t1;
|
|||||||
set debug_sync= 'reset';
|
set debug_sync= 'reset';
|
||||||
|
|
||||||
--echo ## VCOL + CHECK
|
--echo ## VCOL + CHECK
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int);
|
||||||
insert t1 values (1),(2),(3),(4);
|
insert t1 values (1),(2),(3),(4);
|
||||||
--send set debug_sync= 'now wait_for downgraded'
|
--send set debug_sync= 'now wait_for downgraded'
|
||||||
--connection con2
|
--connection con2
|
||||||
@@ -1097,8 +1100,8 @@ set debug_sync= reset;
|
|||||||
|
|
||||||
--echo ###
|
--echo ###
|
||||||
|
|
||||||
create table t1 (a text, unique(a)) engine=innodb;
|
create table t1 (a text, unique(a));
|
||||||
create table t2 (b text, unique(b)) engine=innodb;
|
create table t2 (b text, unique(b));
|
||||||
insert into t2 values (null),(null);
|
insert into t2 values (null),(null);
|
||||||
--send
|
--send
|
||||||
set debug_sync= 'now wait_for downgraded';
|
set debug_sync= 'now wait_for downgraded';
|
||||||
@@ -1126,7 +1129,7 @@ set debug_sync= reset;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
|
--echo # MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
|
||||||
--echo #
|
--echo #
|
||||||
create table t (a int) engine=innodb;
|
create table t (a int);
|
||||||
insert into t values (1);
|
insert into t values (1);
|
||||||
xa begin 'xid';
|
xa begin 'xid';
|
||||||
--send
|
--send
|
||||||
@@ -1513,7 +1516,7 @@ drop table t;
|
|||||||
--echo # Test that correct fields are marked as explicit:
|
--echo # Test that correct fields are marked as explicit:
|
||||||
--echo # Drop a, reorder b, add new column with default.
|
--echo # Drop a, reorder b, add new column with default.
|
||||||
--echo #
|
--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);
|
insert into t values (1, 1), (2, 2), (3, 3);
|
||||||
|
|
||||||
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
||||||
@@ -1539,7 +1542,7 @@ select * from t;
|
|||||||
drop table t;
|
drop table t;
|
||||||
|
|
||||||
--echo # Test that all the fields are unpacked.
|
--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);
|
insert into t values (NULL, 123), (NULL, 456);
|
||||||
|
|
||||||
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
set debug_sync= "alter_table_copy_end signal copy wait_for goon";
|
||||||
@@ -1711,7 +1714,7 @@ while($tx_iso_id) {
|
|||||||
dec $tx_iso_id;
|
dec $tx_iso_id;
|
||||||
let tx_iso= `select level from iso_levels where id = $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
|
--connection con2
|
||||||
insert into t1 values (1,1),(null,null),(3,3),(4,null),(null,5);
|
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
|
--echo # MDEV-32126 Assertion fails upon online ALTER and binary log enabled
|
||||||
create temporary table tmp (id int, primary key(id)) engine=innodb;
|
create temporary table tmp (id int, primary key(id)) engine=innodb;
|
||||||
create table t1 (a int, b text) engine=innodb;
|
create table t1 (a int, b text);
|
||||||
create table t2 (a int, b int, c char(8), d text, unique(a)) engine=innodb;
|
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');
|
insert into t2 values (1,1,'f','e'),(1000,1000,'c','b');
|
||||||
--connection default
|
--connection default
|
||||||
set debug_sync= 'alter_table_online_before_lock signal go_trx wait_for go_alter';
|
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;
|
set @@binlog_format=mixed;
|
||||||
--connection con2
|
--connection con2
|
||||||
start transaction;
|
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));
|
insert into t1 values (1, repeat('x',8000)),(2, repeat('x',8000));
|
||||||
update t2 set b = null order by b limit 2;
|
update t2 set b = null order by b limit 2;
|
||||||
insert into t1 values (3, repeat('x',8000));
|
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
|
--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);
|
insert into t values (1);
|
||||||
|
|
||||||
--echo # XA commit
|
--echo # XA commit
|
||||||
@@ -1919,6 +1922,7 @@ select * from t;
|
|||||||
--connection default
|
--connection default
|
||||||
drop table t;
|
drop table t;
|
||||||
set debug_sync= reset;
|
set debug_sync= reset;
|
||||||
|
eval set global default_storage_engine= $default_storage_engine;
|
||||||
|
|
||||||
--disconnect con1
|
--disconnect con1
|
||||||
--disconnect con2
|
--disconnect con2
|
||||||
|
Reference in New Issue
Block a user