44 lines
1017 B
Plaintext
44 lines
1017 B
Plaintext
# use debug_sync
|
|
--source include/have_debug.inc
|
|
|
|
--source suite/xengine/include/have_xengine.inc
|
|
|
|
connect (con1,localhost,root,,);
|
|
connect (con2,localhost,root,,);
|
|
connection con1;
|
|
|
|
# prepare the data
|
|
|
|
create database tb;
|
|
create table t(id int primary key, c1 int, c2 int);
|
|
insert into t values(1,1,1),(2,1,2);
|
|
|
|
create table t1(id int primary key, c1 int, c2 int);
|
|
|
|
SET DEBUG_SYNC= 'RESET';
|
|
|
|
SET DEBUG_SYNC='before_commit_inplace_alter_table SIGNAL rollback WAIT_FOR commit';
|
|
|
|
--echo #sending
|
|
--send alter table t1 add index(c1);
|
|
|
|
connection con2;
|
|
|
|
SET DEBUG_SYNC='before_rollback_inplace_alter_table WAIT_FOR rollback';
|
|
|
|
SET DEBUG_SYNC='after_rollback_inplace_alter_table SIGNAL commit';
|
|
|
|
--error 1062
|
|
alter table t add unique index(c1);
|
|
|
|
--echo # restart the server.
|
|
--exec echo "restart:" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--enable_reconnect
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
#cleanup
|
|
drop table t;
|
|
drop table t1;
|
|
drop database tb;
|
|
--source suite/xengine/include/check_xengine_log_error.inc
|