Commit 75cf3b6a authored by Nikita Malyavin's avatar Nikita Malyavin

MDEV-30987 main.alter_table_online times out with view-protocol

disabie view-protocol for certain places:
1. While a transaction is in progress: a view gets locked for a
transaction duration, so DROP VIEW from a servicing conneciton
deadlocks. We can't just disable servicing connection, as
CREATE VIEW and DROP VIEW commit implicitly.
2. For querying Opened_table_definitions: the actual query executed
is `SELECT * FROM mysqltest_tmp_v`, then the view is dropped
parent 611bbcac
......@@ -61,9 +61,11 @@ set debug_sync= 'now SIGNAL end';
--connection con2
commit;
--connection default
--disable_view_protocol
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';
--enable_view_protocol
--echo # long transaction and add column
create or replace table t1 (a int);
......@@ -693,6 +695,7 @@ alter table t1 add b int NULL, algorithm= copy, lock= none;
--connection con2
--reap
update t1 set a= 222 where a = 2;
--disable_view_protocol
savepoint whoopsie;
update t1 set a= 123 where a = 1;
insert t3 values (2);
......@@ -702,6 +705,7 @@ rollback to savepoint whoopsie;
select * from t1;
select * from t3;
commit;
--enable_view_protocol
set debug_sync= 'now SIGNAL end';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment