Debian Codegraph @

mysql-test/suite/ndb/r/ndb_dd_restore_check_tablespace_mdl.result

raw
1 # Bug#21376265 - ENHANCEMENT: ACQUIRE MDL LOCKS ON ALL TABLESPACE
2 # REFERRED BY A STATEMENT
3 set new=on;
4 Warnings:
5 Warning 1287 '@@new' is deprecated and will be removed in a future release.
6 CREATE LOGFILE GROUP lg1
7 ADD UNDOFILE 'undofile.dat'
8 INITIAL_SIZE 16M
9 UNDO_BUFFER_SIZE = 1M ENGINE=NDB;
10 CREATE TABLESPACE ts1
11 ADD DATAFILE 'datafile1.dat'
12 USE LOGFILE GROUP lg1
13 INITIAL_SIZE 64M
14 ENGINE NDB;
15 CREATE TABLE t1 (
16 a INT NOT NULL,
17 PRIMARY KEY (a)
18 )
19 ENGINE=NDB
20 PARTITION BY RANGE (a)
21 PARTITIONS 1
22 (PARTITION P1 VALUES LESS THAN (2) TABLESPACE ts1);
23 set new=on;
24 Warnings:
25 Warning 1287 '@@new' is deprecated and will be removed in a future release.
26 #############################################
27 # Case1: Checking ALTER TABLE
28 # Sending 'ALTER TABLE t1 ADD COLUMN f int;'
29 SET DEBUG_SYNC= 'after_wait_locked_tablespace_name_for_table
30 SIGNAL got_lock
31 WAIT_FOR cont';
32 ALTER TABLE t1 ADD COLUMN f int;;
33 # Verify that the tablespace name is locked.
34 SET DEBUG_SYNC= 'now WAIT_FOR got_lock';
35 SET DEBUG_SYNC= 'now SIGNAL cont';
36 # Reaping 'ALTER TABLE t1 ADD COLUMN f int;'
37 #############################################
38 # Case2: Checking TRUNCATE TABLE
39 # Sending 'TRUNCATE TABLE t1;'
40 SET DEBUG_SYNC= 'RESET';
41 SET DEBUG_SYNC= 'after_wait_locked_tablespace_name_for_table
42 SIGNAL got_lock
43 WAIT_FOR cont';
44 TRUNCATE TABLE t1;;
45 # Verify that the tablespace name is locked.
46 SET DEBUG_SYNC= 'now WAIT_FOR got_lock';
47 SET DEBUG_SYNC= 'now SIGNAL cont';
48 # Reaping 'TRUNCATE TABLE t1'
49 #############################################
50 # Case4: Checking CREATE TABLE
51 SET DEBUG_SYNC= 'RESET';
52 SET DEBUG_SYNC= 'after_wait_locked_tablespace_name_for_table
53 SIGNAL got_lock
54 WAIT_FOR cont';
55 CREATE TABLE t3 (a INT NOT NULL, PRIMARY KEY (a)) ENGINE=NDB PARTITION BY RANGE (a) PARTITIONS 1 (PARTITION P1 VALUES LESS THAN (2) TABLESPACE ts1);;
56 # Verify that the tablespace name is locked.
57 SET DEBUG_SYNC= 'now WAIT_FOR got_lock';
58 SET DEBUG_SYNC= 'now SIGNAL cont';
59 # Reaping 'CREATE TABLE'
60 #############################################
61 # Case5: Checking CREATE TABLE LIKE
62 SET DEBUG_SYNC= 'RESET';
63 SET DEBUG_SYNC= 'after_wait_locked_tablespace_name_for_table
64 SIGNAL got_lock
65 WAIT_FOR cont';
66 CREATE TABLE t4 LIKE t3;;
67 # Verify that the tablespace name is locked.
68 SET DEBUG_SYNC= 'now WAIT_FOR got_lock';
69 SET DEBUG_SYNC= 'now SIGNAL cont';
70 # Reaping 'CREATE TABLE LIKE'
71 #############################################
72 # Case6: Checking ALTER TABLE ... PARTITION
73 CREATE TABLESPACE ts2
74 ADD DATAFILE 'datafile2.dat'
75 USE LOGFILE GROUP lg1
76 INITIAL_SIZE 64M
77 ENGINE NDB;
78 SET DEBUG_SYNC= 'RESET';
79 SET DEBUG_SYNC= 'after_wait_locked_tablespace_name_for_table
80 SIGNAL got_lock
81 WAIT_FOR cont';
82 ALTER TABLE t3 ADD PARTITION (PARTITION p2 VALUES LESS THAN (4) TABLESPACE ts2);;
83 # Verify that the tablespace name is locked.
84 SET DEBUG_SYNC= 'now WAIT_FOR got_lock';
85 SET DEBUG_SYNC= 'now SIGNAL cont';
86 # Reaping 'ALTER TABLE'
87 #############################################
88 # Case7: Checking LOCK TABLE t2 WRITE
89 SET DEBUG_SYNC= 'RESET';
90 SET DEBUG_SYNC= 'after_wait_locked_tablespace_name_for_table
91 SIGNAL got_lock
92 WAIT_FOR cont';
93 LOCK TABLE t3 WRITE;
94 # Verify that the tablespace name is locked.
95 SET DEBUG_SYNC= 'now WAIT_FOR got_lock';
96 SET DEBUG_SYNC= 'now SIGNAL cont';
97 # Reaping 'LOCK TABLE'
98 UNLOCK TABLES;
99 # Cleanup
100 set new=off;
101 Warnings:
102 Warning 1287 '@@new' is deprecated and will be removed in a future release.
103 SET DEBUG_SYNC= 'RESET';
104 DROP TABLE t1;
105 DROP TABLE t3;
106 DROP TABLE t4;
107 ALTER TABLESPACE ts1 DROP DATAFILE 'datafile1.dat';
108 ALTER TABLESPACE ts2 DROP DATAFILE 'datafile2.dat';
109 DROP TABLESPACE ts1;
110 DROP TABLESPACE ts2;
111 DROP LOGFILE GROUP lg1 ENGINE NDB;