Commit db06c5dd authored by Sergei Golubchik's avatar Sergei Golubchik

main.alter_table_online fails in --view

disable view protocol (DROP VIEW doesn't work very well with transactions)
and cosmetic cleanups
parent bf5da43e
...@@ -241,22 +241,17 @@ drop sequence s; ...@@ -241,22 +241,17 @@ drop sequence s;
# #
# MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable # MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable
# #
connect con2, localhost, root,,; connect con2, localhost, root;
create or replace table t1 (a int); create 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
insert t1 values (5); insert t1 values (5);
connection con2; start transaction;
begin;
select * from t1; select * from t1;
a a
5 5
connection default; connection default;
alter table t1 add b int NULL, algorithm= copy, lock= none; alter table t1 add b int NULL, algorithm= copy, lock= none;
connection con2; connection con2;
set @con= $con;
select stage, state, info from information_schema.processlist where id = @con; select stage, state, info from information_schema.processlist where id = @con;
stage 4 stage 4
state Waiting for table metadata lock state Waiting for table metadata lock
...@@ -265,6 +260,4 @@ rollback; ...@@ -265,6 +260,4 @@ rollback;
connection default; connection default;
drop table t1; drop table t1;
disconnect con2; disconnect con2;
#
# End of 11.2 tests # End of 11.2 tests
#
...@@ -250,25 +250,21 @@ drop sequence s; ...@@ -250,25 +250,21 @@ drop sequence s;
--echo # --echo #
--echo # MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable --echo # MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable
--echo # --echo #
--connect (con2, localhost, root,,) --disable_view_protocol
--connect con2, localhost, root
create or replace table t1 (a int); create table t1 (a int);
show create table t1;
insert t1 values (5); insert t1 values (5);
--connection con2 start transaction;
begin;
select * from t1; select * from t1;
--connection default --connection default
--let $con= `select connection_id()` --let $con= `select connection_id()`
send alter table t1 add b int NULL, algorithm= copy, lock= none; send alter table t1 add b int NULL, algorithm= copy, lock= none;
--connection con2 --connection con2
disable_query_log; evalp set @con= $con;
eval set @con= $con;
enable_query_log;
let $wait_condition= select stage = 4 and progress = 100 let $wait_condition= select stage = 4 and progress = 100
and state= "Waiting for table metadata lock" and state= "Waiting for table metadata lock"
...@@ -284,7 +280,6 @@ reap; ...@@ -284,7 +280,6 @@ reap;
drop table t1; drop table t1;
--disconnect con2 --disconnect con2
--enable_view_protocol
--echo #
--echo # End of 11.2 tests --echo # End of 11.2 tests
--echo #
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