summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/alter_table_online_debug.result8
-rw-r--r--mysql-test/main/alter_table_online_debug.test12
2 files changed, 6 insertions, 14 deletions
diff --git a/mysql-test/main/alter_table_online_debug.result b/mysql-test/main/alter_table_online_debug.result
index d341d3bab7e..e9b6199ba5f 100644
--- a/mysql-test/main/alter_table_online_debug.result
+++ b/mysql-test/main/alter_table_online_debug.result
@@ -28,9 +28,8 @@ insert t1 values (5), (5);
connection con2;
set debug_sync= 'now WAIT_FOR ended';
connection default;
-set session lock_wait_timeout=1;
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
-alter table t1 add unique (a), algorithm= copy, lock= none;
+alter table t1 nowait add unique (a), algorithm= copy, lock= none;
connection con2;
start transaction;
insert into t1 values (123), (456), (789);
@@ -51,7 +50,6 @@ a
select variable_value-@otd from information_schema.session_status where variable_name='Opened_table_definitions';
variable_value-@otd
1
-set session lock_wait_timeout=default;
# long transaction and add column
create or replace table t1 (a int);
insert t1 values (5);
@@ -59,8 +57,7 @@ connection con2;
set debug_sync= 'now WAIT_FOR ended';
connection default;
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
-set session lock_wait_timeout=1;
-alter table t1 add b int NULL, algorithm= copy, lock= none;
+alter table t1 nowait add b int NULL, algorithm= copy, lock= none;
connection con2;
start transaction;
insert into t1 values (123), (456), (789);
@@ -70,7 +67,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
a
5
-set session lock_wait_timeout=default;
connection con2;
rollback;
connection default;
diff --git a/mysql-test/main/alter_table_online_debug.test b/mysql-test/main/alter_table_online_debug.test
index 5b4fe1f3724..7ab4031f77c 100644
--- a/mysql-test/main/alter_table_online_debug.test
+++ b/mysql-test/main/alter_table_online_debug.test
@@ -43,11 +43,10 @@ insert t1 values (5), (5);
set debug_sync= 'now WAIT_FOR ended';
--connection default
-set session lock_wait_timeout=1;
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
--send
-alter table t1 add unique (a), algorithm= copy, lock= none;
+alter table t1 nowait add unique (a), algorithm= copy, lock= none;
--connection con2
--reap
@@ -64,7 +63,6 @@ commit;
select variable_value into @otd from information_schema.session_status where variable_name='Opened_table_definitions';
select * from t1;
select variable_value-@otd from information_schema.session_status where variable_name='Opened_table_definitions';
-set session lock_wait_timeout=default;
--echo # long transaction and add column
create or replace table t1 (a int);
@@ -76,9 +74,8 @@ set debug_sync= 'now WAIT_FOR ended';
--connection default
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
-set session lock_wait_timeout=1;
--send
-alter table t1 add b int NULL, algorithm= copy, lock= none;
+alter table t1 nowait add b int NULL, algorithm= copy, lock= none;
--connection con2
--reap
@@ -90,7 +87,6 @@ set debug_sync= 'now SIGNAL end';
--error ER_LOCK_WAIT_TIMEOUT
--reap
select * from t1;
-set session lock_wait_timeout=default;
--connection con2
rollback;
--connection default
@@ -732,12 +728,12 @@ insert into t1 values (1),(2),(3);
set sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
--send alter table t1 modify a int not null, algorithm=copy, lock=none
-
+
--connection default
--reap
insert into t1 values (null),(null);
set debug_sync= 'now signal goforit';
-
+
--connection con2
--error WARN_DATA_TRUNCATED
--reap