--source connect.inc --echo # --echo # Bug#29871406 HANG IN ACQUIRE_LOCK WHEN ALTERING TABLESPACE --echo # Create table in tablespace with RANGE partition caused MDL lock --echo # on the tablespace to be left behind on the participant, thus --echo # preventing further use of the tablespace --echo # CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'lg1_undofile.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=NDB; CREATE TABLESPACE ts1 ADD DATAFILE 'ts1_datafile1.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 64M ENGINE NDB; set new=on; # Enable RANGE PARTITION CREATE TABLE t1 ( a INT NOT NULL, PRIMARY KEY (a) ) ENGINE=NDB PARTITION BY RANGE (a) PARTITIONS 1 (PARTITION P1 VALUES LESS THAN (2) TABLESPACE ts1); --echo # Workaround BUG#30248840 which describes problem with updating --echo # tablespace id on participant when altering tablespace where table --echo # has RANGE partitions DROP TABLE t1; CREATE TABLE t1 ( a INT NOT NULL, PRIMARY KEY (a) ) ENGINE=NDB; --echo # End Workaround --connection mysqld2 --echo # mysqld2> Check that tablespace can be altered on participant ALTER TABLESPACE ts1 ADD DATAFILE 'ts1_datafile2.dat'; ALTER TABLESPACE ts1 DROP DATAFILE 'ts1_datafile2.dat'; --echo # Cleanup DROP TABLE t1; ALTER TABLESPACE ts1 DROP DATAFILE 'ts1_datafile1.dat'; DROP TABLESPACE ts1; DROP LOGFILE GROUP lg1 ENGINE = NDB;