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

114 lines
6.3 KiB
Plaintext

CREATE DATABASE test2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
ALTER DATABASE test2 CHARACTER SET latin2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
DROP DATABASE test2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
CREATE TABLE t1(a int not null primary key) ENGINE ndb;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
RENAME TABLE t1 TO t2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
CREATE TABLE t3 LIKE t2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
ALTER TABLE t3 ADD COLUMN b int default NULL;
Warnings:
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable online ADD COLUMN
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
INSERT INTO t2 VALUES(1);
TRUNCATE TABLE t2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
CREATE TABLE t4 ENGINE=NDB AS SELECT * FROM t2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
DROP TABLE t2;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
DROP TABLE t3, t4;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
CREATE TABLE t10(a int primary key) ENGINE ndb;
LOCK TABLES t10 READ;
CREATE DATABASE test2;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
ALTER DATABASE test2 CHARACTER SET latin2;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
DROP DATABASE test2;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
UNLOCK TABLES;
LOCK TABLES t10 WRITE;
CREATE DATABASE test2;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
ALTER DATABASE test2 CHARACTER SET latin2;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
DROP DATABASE test2;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
UNLOCK TABLES;
LOCK TABLES t10 READ;
CREATE TABLE t1(a int not null primary key);
ERROR HY000: Table 't1' was not locked with LOCK TABLES
RENAME TABLE t10 TO t2;
ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
CREATE TABLE t3 LIKE t10;
ERROR HY000: Table 't3' was not locked with LOCK TABLES
ALTER TABLE t10 ADD COLUMN b int default NULL;
ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
TRUNCATE TABLE t10;
ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
CREATE TABLE t4 AS SELECT * FROM t10;
ERROR HY000: Table 't4' was not locked with LOCK TABLES
DROP TABLE t10;
ERROR HY000: Table 't10' was locked with a READ lock and can't be updated
UNLOCK TABLES;
LOCK TABLES t10 WRITE;
CREATE TABLE t1(a int not null primary key);
ERROR HY000: Table 't1' was not locked with LOCK TABLES
CREATE TABLE t3 LIKE t10;
ERROR HY000: Table 't3' was not locked with LOCK TABLES
ALTER TABLE t10 ADD COLUMN b int default NULL;
Warnings:
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable online ADD COLUMN
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
TRUNCATE TABLE t10;
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
1
Warnings:
Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
CREATE TABLE t4 AS SELECT * FROM t10;
ERROR HY000: Table 't4' was not locked with LOCK TABLES
RENAME TABLE t10 TO t110;
DROP TABLE t110;
UNLOCK TABLES;