Debian Codegraph @

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

raw
1 CREATE DATABASE test2;
2 ndb_schema_locks_count
3 1
4 ALTER DATABASE test2 CHARACTER SET latin2;
5 ndb_schema_locks_count
6 1
7 DROP DATABASE test2;
8 ndb_schema_locks_count
9 1
10 CREATE TABLE t1(a int not null primary key) ENGINE ndb;
11 ndb_schema_locks_count
12 1
13 RENAME TABLE t1 TO t2;
14 ndb_schema_locks_count
15 1
16 CREATE TABLE t3 LIKE t2;
17 ndb_schema_locks_count
18 1
19 ALTER TABLE t3 ADD COLUMN b int default NULL;
20 Warnings:
21 Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable online ADD COLUMN
22 ndb_schema_locks_count
23 1
24 INSERT INTO t2 VALUES(1);
25 TRUNCATE TABLE t2;
26 ndb_schema_locks_count
27 1
28 CREATE TABLE t4 ENGINE=NDB AS SELECT * FROM t2;
29 ndb_schema_locks_count
30 1
31 DROP TABLE t2;
32 ndb_schema_locks_count
33 1
34 DROP TABLE t3, t4;
35 ndb_schema_locks_count
36 1
37 CREATE TABLE t10(a int primary key) ENGINE ndb;
38 LOCK TABLES t10 READ;
39 CREATE DATABASE test2;
40 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
41 ALTER DATABASE test2 CHARACTER SET latin2;
42 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
43 DROP DATABASE test2;
44 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
45 UNLOCK TABLES;
46 LOCK TABLES t10 WRITE;
47 CREATE DATABASE test2;
48 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
49 ALTER DATABASE test2 CHARACTER SET latin2;
50 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
51 DROP DATABASE test2;
52 ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
53 UNLOCK TABLES;
54 LOCK TABLES t10 READ;
55 CREATE TABLE t1(a int not null primary key);
56 ERROR HY000: Table 't1' was not locked with LOCK TABLES
57 RENAME TABLE t10 TO t2;
58 ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
59 CREATE TABLE t3 LIKE t10;
60 ERROR HY000: Table 't3' was not locked with LOCK TABLES
61 ALTER TABLE t10 ADD COLUMN b int default NULL;
62 ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
63 TRUNCATE TABLE t10;
64 ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
65 CREATE TABLE t4 AS SELECT * FROM t10;
66 ERROR HY000: Table 't4' was not locked with LOCK TABLES
67 DROP TABLE t10;
68 ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
69 UNLOCK TABLES;
70 LOCK TABLES t10 WRITE;
71 CREATE TABLE t1(a int not null primary key);
72 ERROR HY000: Table 't1' was not locked with LOCK TABLES
73 CREATE TABLE t3 LIKE t10;
74 ERROR HY000: Table 't3' was not locked with LOCK TABLES
75 ALTER TABLE t10 ADD COLUMN b int default NULL;
76 Warnings:
77 Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable online ADD COLUMN
78 ndb_schema_locks_count
79 1
80 TRUNCATE TABLE t10;
81 ndb_schema_locks_count
82 1
83 CREATE TABLE t4 AS SELECT * FROM t10;
84 ERROR HY000: Table 't4' was not locked with LOCK TABLES
85 RENAME TABLE t10 TO t110;
86 DROP TABLE t110;
87 UNLOCK TABLES;