1drop table if exists t1,t2;
2create table t1 (a int key, b int unique, c int) engine ndb;
3ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
4CREATE LOGFILE GROUP lg1
5ADD UNDOFILE 'undofile.dat'
6INITIAL_SIZE 16M
7UNDO_BUFFER_SIZE = 1M
8ENGINE=NDB;
9ERROR HY000: Failed to create LOGFILE GROUP
10show warnings;
11Level	Code	Message
12Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
13Error	1528	Failed to create LOGFILE GROUP
14create table t1 (a int key, b int unique, c int) engine ndb;
15CREATE LOGFILE GROUP lg1
16ADD UNDOFILE 'undofile.dat'
17INITIAL_SIZE 16M
18UNDO_BUFFER_SIZE = 1M
19ENGINE=NDB;
20CREATE TABLESPACE ts1
21ADD DATAFILE 'datafile.dat'
22USE LOGFILE GROUP lg1
23INITIAL_SIZE 12M
24ENGINE NDB;
25ERROR HY000: Failed to create TABLESPACE
26show warnings;
27Level	Code	Message
28Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
29Error	1528	Failed to create TABLESPACE
30DROP LOGFILE GROUP lg1
31ENGINE =NDB;
32ERROR HY000: Failed to drop LOGFILE GROUP
33show warnings;
34Level	Code	Message
35Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
36Error	1529	Failed to drop LOGFILE GROUP
37CREATE TABLESPACE ts1
38ADD DATAFILE 'datafile.dat'
39USE LOGFILE GROUP lg1
40INITIAL_SIZE 12M
41ENGINE NDB;
42ALTER TABLESPACE ts1
43DROP DATAFILE 'datafile.dat'
44ENGINE NDB;
45ERROR HY000: Failed to alter:  DROP DATAFILE
46show warnings;
47Level	Code	Message
48Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
49Error	1533	Failed to alter:  DROP DATAFILE
50ALTER TABLESPACE ts1
51DROP DATAFILE 'datafile.dat'
52ENGINE NDB;
53DROP TABLESPACE ts1
54ENGINE NDB;
55ERROR HY000: Failed to drop TABLESPACE
56show warnings;
57Level	Code	Message
58Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
59Error	1529	Failed to drop TABLESPACE
60DROP TABLESPACE ts1
61ENGINE NDB;
62DROP LOGFILE GROUP lg1
63ENGINE =NDB;
64insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0);
65create table t2 as select * from t1;
66select * from t1 where a = 1;
67a	b	c
681	1	0
69select * from t1 where b = 4;
70a	b	c
714	4	0
72select * from t1 where a > 4 order by a;
73a	b	c
745	5	0
756	6	0
767	7	0
778	8	0
789	9	0
7910	10	0
80update t1 set b=102 where a = 2;
81update t1 set b=103 where b = 3;
82update t1 set b=b+100;
83update t1 set b=b+100 where a > 7;
84delete from t1;
85insert into t1 select * from t2;
86create unique index new_index on t1 (b,c);
87drop table t2;
88drop table t1;
89ERROR 42S02: Unknown table 'test.t1'
90create index new_index_fail on t1 (c);
91ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
92insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0);
93ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
94select * from t1 where a = 1;
95ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
96select * from t1 where b = 4;
97ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
98update t1 set b=102 where a = 2;
99ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
100update t1 set b=103 where b = 3;
101ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
102update t1 set b=b+100;
103ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
104update t1 set b=b+100 where a > 7;
105ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
106BEGIN;
107update t1 set b=b+100 where a=1;
108BEGIN;
109update t1 set b=b+100 where a=2;
110update t1 set b=b+100 where a=3;
111COMMIT;
112update t1 set b=b+100 where a=4;
113ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER
114ROLLBACK;
115create table t2 (a int) engine myisam;
116alter table t2 add column (b int);
117drop table t2;
118drop table t1;
119