Debian Codegraph @

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

raw
1 flush status;
2 flush status;
3 create table t1 (a int) engine=ndbcluster;
4 create table t2 (a int) engine=ndbcluster;
5 insert into t1 value (2);
6 insert into t2 value (3);
7 select * from t1;
8 a
9 2
10 select * from t2;
11 a
12 3
13 show status like 'handler_discover%';
14 Variable_name Value
15 Handler_discover 0
16 select * from t1;
17 a
18 2
19 drop table t1;
20 create table t1 (a int) engine=ndbcluster;
21 insert into t1 value (2);
22 select * from t1;
23 a
24 2
25 show status like 'handler_discover%';
26 Variable_name Value
27 Handler_discover 0
28 drop table t1;
29 create table t1 (a int) engine=ndbcluster;
30 insert into t1 value (2);
31 select * from t1;
32 a
33 2
34 select * from t1;
35 a
36 2
37 flush status;
38 select * from t1;
39 a
40 2
41 update t1 set a=3 where a=2;
42 show status like 'handler_discover%';
43 Variable_name Value
44 Handler_discover 0
45 create table t3 (a int not null primary key, b varchar(22),
46 c int, last_col text) engine=ndb;
47 insert into t3 values(1, 'Hi!', 89, 'Longtext column');
48 create table t4 (pk int primary key, b int) engine=ndb;
49 select * from t1;
50 a
51 3
52 select * from t3;
53 a b c last_col
54 1 Hi! 89 Longtext column
55 show tables like 't4';
56 Tables_in_test (t4)
57 t4
58 show tables;
59 Tables_in_test
60 t1
61 t2
62 t3
63 t4
64 drop table t1, t2, t3, t4;
65 create table t1(c1 int key) ENGINE=InnoDB;
66 insert into t1 values(1),(3),(5);
67 select * from t1 order by c1;
68 c1
69 1
70 3
71 5
72 show tables;
73 Tables_in_test
74 create table t1(c1 int key) ENGINE=InnoDB;
75 insert into t1 values(100),(344),(533);
76 select * from t1 order by c1;
77 c1
78 100
79 344
80 533
81 alter table t1 engine=ndb;
82 Warnings:
83 Warning 1296 Node <nodeid> 'Distribution of ALTER TABLE 't1' failed'
84 show tables;
85 Tables_in_test
86 t1
87 select * from t1 order by c1;
88 c1
89 100
90 344
91 533
92 drop table t1 /* engine = InnoDB */;
93 select * from t1 order by c1;
94 c1
95 1
96 3
97 5
98 drop table t1 /* engine = NDB */;
99 create database db;
100 use db;
101 create table t1(x int) engine=ndb;
102 use db;
103 show tables;
104 Tables_in_db
105 t1
106 drop database db;
107 show tables;
108 ERROR 42000: Unknown database 'db'
109 create database db;
110 use db;
111 create table t1(x int) engine=ndb;
112 use db;
113 create table t2(x int) engine=innodb;
114 show tables;
115 Tables_in_db
116 t1
117 t2
118 drop database db;
119 Warnings:
120 Warning 1296 Node <nodeid> 'Distribution of DROP DATABASE 'db' failed'
121 show tables;
122 Tables_in_db
123 t2
124 drop database db;
125 use test;
126 create table `test`.`t1$EX`
127 (server_id int unsigned,
128 master_server_id int unsigned,
129 master_epoch bigint unsigned,
130 count int unsigned,
131 primary key(server_id, master_server_id,
132 master_epoch, count))
133 engine ndb;
134 show tables like '%$%';
135 Tables_in_test (%$%)
136 t1$ex
137 use test;
138 show tables like '%$%';
139 Tables_in_test (%$%)
140 t1$ex
141 drop table `test`.`t1$EX`;
142 show tables like '%$%';
143 Tables_in_test (%$%)
144 show tables like '%$%';
145 Tables_in_test (%$%)
146 create table t1(s char(1)) engine = innodb;
147 insert into t1 values ("a"),("b"),("c");
148 create table t1(s char(1)) engine = ndb;
149 Warnings:
150 Warning 1296 Node <nodeid> 'Distribution of CREATE TABLE 't1' failed'
151 insert into t1 values ("d"),("e"),("f");
152 Restarting mysqld
153 # restart
154 use test;
155 select * from t1 order by s;
156 s
157 a
158 b
159 c
160 select * from t1 order by s;
161 s
162 d
163 e
164 f
165 drop table t1;
166 Warnings:
167 Warning 1296 Node <nodeid> 'Distribution of DROP TABLE 't1' failed'
168 select * from t1 order by s;
169 s
170 a
171 b
172 c
173 create table t1(s char(1)) engine = ndb;
174 Warnings:
175 Warning 1296 Node <nodeid> 'Distribution of CREATE TABLE 't1' failed'
176 insert into t1 values ("g"),("h"),("i");
177 show tables;
178 Tables_in_test
179 t1
180 select * from t1 order by s;
181 s
182 a
183 b
184 c
185 drop table t1;
186 drop table t1;
187 Bug 11894966 - second mysqld does not have table after non
188 distributed table alter to ndb
189 create table t1(a int) engine innodb;
190 insert into t1 values(37);
191 alter table t1 engine ndb;
192 truncate t1;
193 drop table t1;
194 create table mysql.dummy(a int primary key, b int) engine=innodb;
195 create table mysql.dummy(a int primary key, b int) engine=innodb;
196 drop table mysql.dummy;
197 show create table mysql.dummy;
198 Table Create Table
199 dummy CREATE TABLE `dummy` (
200 `a` int NOT NULL,
201 `b` int DEFAULT NULL,
202 PRIMARY KEY (`a`)
203 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
204 drop table mysql.dummy;
205 CREATE DATABASE tmp_db;
206 Let server2 create the table tmp_db.t1 in the background.
207 CREATE TABLE tmp_db.t1 (k int primary key) ENGINE NDB;
208 Attempt to recreate 'tmp_db', expect 'EXISTS' failure - Not MDL deadlocks
209 CREATE DATABASE IF NOT EXISTS tmp_db;
210 Warnings:
211 Note 1007 Can't create database 'tmp_db'; database exists
212 Wait for server2 table creation to complete.
213 Select count(*) from tmp_db.t1;
214 count(*)
215 0
216 DROP TABLE tmp_db.t1;
217 DROP DATABASE tmp_db;