1# The include statement below is a temp one for tests that are yet to
2#be ported to run with InnoDB,
3#but needs to be kept for tests that would need MyISAM in future.
4--source include/force_myisam_default.inc
5
6-- source include/have_ndb.inc
7
8# Test will produce this error in server log file -> ignore
9call mtr.add_suppression("Could not acquire global schema lock");
10
11#
12# Run all the commands which should take the global schema lock
13# against a mysqld "connected" to stopped NDB nodes
14#
15
16# Restart NDB nodes into "no start"
17--source ndb_restart_nostart.inc
18
19# Database DDL, works but generate a warning
20# about failure to acquire global schema lock
21CREATE DATABASE test2;
22ALTER DATABASE test2 CHARACTER SET latin2;
23DROP DATABASE test2;
24
25# Table DDL, works since they don't work with NDB tables
26# but generate warnings about failure to acquire global schema lock
27# NOTE! The CREATE's all generate three warnings each, global
28# schema lock, ha_discover and ha_table_exists_in_engine
29# NOTE2! When using ps protocol a fourth warning pops up due to different
30# code path -> turn ps off
31#
32--disable_ps_protocol
33CREATE TABLE t1(a int not null primary key);
34RENAME TABLE t1 TO t2;
35CREATE TABLE t3 LIKE t2;
36ALTER TABLE t3 ADD COLUMN b int default NULL;
37INSERT INTO t2 VALUES(1);
38TRUNCATE TABLE t2;
39CREATE TABLE t4 AS SELECT * FROM t2;
40DROP TABLE t2;
41DROP TABLE t3, t4;
42--enable_ps_protocol
43
44
45# Start NDB nodes back up again
46--source ndb_restart_start.inc
47
48
49
50# NOTE! this is a workaround so that check-testcase after test
51# see the mysql.ndb_schema table(if not connected, 'find_files'
52# will hide the table)
53#
54# Wait until mysqld has connected properly to cluster
55--disable_result_log
56--disable_query_log
57source include/ndb_not_readonly.inc;
58--enable_query_log
59--enable_result_log
60