Skip to content

Commit db06c5d

Browse files
committed
main.alter_table_online fails in --view
disable view protocol (DROP VIEW doesn't work very well with transactions) and cosmetic cleanups
1 parent bf5da43 commit db06c5d

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

mysql-test/main/alter_table_online.result

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,22 +241,17 @@ drop sequence s;
241241
#
242242
# MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable
243243
#
244-
connect con2, localhost, root,,;
245-
create or replace table t1 (a int);
246-
show create table t1;
247-
Table Create Table
248-
t1 CREATE TABLE `t1` (
249-
`a` int(11) DEFAULT NULL
250-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
244+
connect con2, localhost, root;
245+
create table t1 (a int);
251246
insert t1 values (5);
252-
connection con2;
253-
begin;
247+
start transaction;
254248
select * from t1;
255249
a
256250
5
257251
connection default;
258252
alter table t1 add b int NULL, algorithm= copy, lock= none;
259253
connection con2;
254+
set @con= $con;
260255
select stage, state, info from information_schema.processlist where id = @con;
261256
stage 4
262257
state Waiting for table metadata lock
@@ -265,6 +260,4 @@ rollback;
265260
connection default;
266261
drop table t1;
267262
disconnect con2;
268-
#
269263
# End of 11.2 tests
270-
#

mysql-test/main/alter_table_online.test

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,25 +250,21 @@ drop sequence s;
250250
--echo #
251251
--echo # MDEV-33348 ALTER TABLE lock waiting stages are indistinguishable
252252
--echo #
253-
--connect (con2, localhost, root,,)
253+
--disable_view_protocol
254+
--connect con2, localhost, root
254255

255-
create or replace table t1 (a int);
256-
show create table t1;
256+
create table t1 (a int);
257257
insert t1 values (5);
258258

259-
--connection con2
260-
begin;
259+
start transaction;
261260
select * from t1;
261+
262262
--connection default
263263
--let $con= `select connection_id()`
264264
send alter table t1 add b int NULL, algorithm= copy, lock= none;
265265

266-
267266
--connection con2
268-
disable_query_log;
269-
eval set @con= $con;
270-
enable_query_log;
271-
267+
evalp set @con= $con;
272268

273269
let $wait_condition= select stage = 4 and progress = 100
274270
and state= "Waiting for table metadata lock"
@@ -284,7 +280,6 @@ reap;
284280

285281
drop table t1;
286282
--disconnect con2
283+
--enable_view_protocol
287284

288-
--echo #
289285
--echo # End of 11.2 tests
290-
--echo #

0 commit comments

Comments
 (0)