mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
main.alter_table_online fails in --view
disable view protocol (DROP VIEW doesn't work very well with transactions) and cosmetic cleanups
This commit is contained in:
parent
bf5da43e50
commit
db06c5dd07
2 changed files with 11 additions and 23 deletions
|
@ -241,22 +241,17 @@ drop sequence s;
|
|||
#
|
||||
# MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable
|
||||
#
|
||||
connect con2, localhost, root,,;
|
||||
create or replace table t1 (a int);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
connect con2, localhost, root;
|
||||
create table t1 (a int);
|
||||
insert t1 values (5);
|
||||
connection con2;
|
||||
begin;
|
||||
start transaction;
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
connection default;
|
||||
alter table t1 add b int NULL, algorithm= copy, lock= none;
|
||||
connection con2;
|
||||
set @con= $con;
|
||||
select stage, state, info from information_schema.processlist where id = @con;
|
||||
stage 4
|
||||
state Waiting for table metadata lock
|
||||
|
@ -265,6 +260,4 @@ rollback;
|
|||
connection default;
|
||||
drop table t1;
|
||||
disconnect con2;
|
||||
#
|
||||
# End of 11.2 tests
|
||||
#
|
||||
|
|
|
@ -250,25 +250,21 @@ drop sequence s;
|
|||
--echo #
|
||||
--echo # MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable
|
||||
--echo #
|
||||
--connect (con2, localhost, root,,)
|
||||
--disable_view_protocol
|
||||
--connect con2, localhost, root
|
||||
|
||||
create or replace table t1 (a int);
|
||||
show create table t1;
|
||||
create table t1 (a int);
|
||||
insert t1 values (5);
|
||||
|
||||
--connection con2
|
||||
begin;
|
||||
start transaction;
|
||||
select * from t1;
|
||||
|
||||
--connection default
|
||||
--let $con= `select connection_id()`
|
||||
send alter table t1 add b int NULL, algorithm= copy, lock= none;
|
||||
|
||||
|
||||
--connection con2
|
||||
disable_query_log;
|
||||
eval set @con= $con;
|
||||
enable_query_log;
|
||||
|
||||
evalp set @con= $con;
|
||||
|
||||
let $wait_condition= select stage = 4 and progress = 100
|
||||
and state= "Waiting for table metadata lock"
|
||||
|
@ -284,7 +280,6 @@ reap;
|
|||
|
||||
drop table t1;
|
||||
--disconnect con2
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # End of 11.2 tests
|
||||
--echo #
|
||||
|
|
Loading…
Reference in a new issue