mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
committed by
Sergei Golubchik
parent
55d1645d5b
commit
d7b0c6d8a8
@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user