You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mysql-test/suite/ndb/r/ndbinfo.result
+116-8Lines changed: 116 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,7 @@ Variable_name Value
136
136
ndbinfo_database ndbinfo
137
137
ndbinfo_max_bytes 0
138
138
ndbinfo_max_rows 10
139
+
ndbinfo_offline OFF
139
140
ndbinfo_show_hidden OFF
140
141
ndbinfo_table_prefix ndb$
141
142
ndbinfo_version NDB_VERSION_D
@@ -179,20 +180,55 @@ node_id != 0
179
180
1
180
181
Warnings:
181
182
Note 40001 Table 'ndb$test' is defined differently in NDB, there are more columns available. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
182
-
183
-
## 2) Column does not exist in NDB -> error, with warning
184
183
DROP TABLE ndb$test;
184
+
185
+
## 2) Column does not exist in NDB -> allowed, with warning, non existing
ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
188
-
SHOW WARNINGS;
189
-
Level Code Message
189
+
SELECT DISTINCT node_id, non_existing FROM ndb$test;
190
+
node_id non_existing
191
+
1 NULL
192
+
2 NULL
193
+
Warnings:
190
194
Warning 40001 Table 'ndb$test' is defined differently in NDB, column 'non_existing' does not exist. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
191
-
Error 1296 Got error 40001 'Incompatible table definitions' from NDBINFO
195
+
Note 40001 Table 'ndb$test' is defined differently in NDB, there are more columns available. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
196
+
DROP TABLE ndb$test;
197
+
198
+
## 2b) Extra column(s) in middle
199
+
CREATE TABLE ndb$test (
200
+
node_id int unsigned,
201
+
non_existing int unsigned,
202
+
block_number int unsigned,
203
+
block_instance int unsigned,
204
+
counter int unsigned,
205
+
counter2 bigint unsigned
206
+
) ENGINE = ndbinfo;
207
+
SELECT DISTINCT node_id, non_existing, block_number FROM ndb$test;
208
+
node_id non_existing block_number
209
+
1 NULL 249
210
+
2 NULL 249
211
+
Warnings:
212
+
Warning 40001 Table 'ndb$test' is defined differently in NDB, column 'non_existing' does not exist. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
SELECT DISTINCT node_id, non_existing FROM ndb$test;
218
+
node_id non_existing
219
+
1 NULL
220
+
2 NULL
221
+
Warnings:
222
+
Warning 40001 Table 'ndb$test' is defined differently in NDB, column 'non_existing' does not exist. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
223
+
Note 40001 Table 'ndb$test' is defined differently in NDB, there are more columns available. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
224
+
SELECT DISTINCT non_existing, node_id FROM ndb$test;
225
+
non_existing node_id
226
+
NULL 1
227
+
NULL 2
228
+
DROP TABLE ndb$test;
192
229
193
230
## 3) Incompatible column type -> error, with warning
ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
@@ -219,6 +255,26 @@ Level Code Message
219
255
Warning 40001 Table 'ndb$test' is defined differently in NDB, column 'node_id' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
220
256
Error 1296 Got error 40001 'Incompatible table definitions' from NDBINFO
221
257
DROP TABLE ndb$test;
258
+
## 3d) column which is NOT NULL
259
+
CREATE TABLE ndb$test (node_id int unsigned NOT NULL) ENGINE = ndbinfo;
260
+
SELECT * FROM ndb$test;
261
+
ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
262
+
SHOW WARNINGS;
263
+
Level Code Message
264
+
Warning 40001 Table 'ndb$test' is defined differently in NDB, column 'node_id' is NOT NULL. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
265
+
Error 1296 Got error 40001 'Incompatible table definitions' from NDBINFO
266
+
DROP TABLE ndb$test;
267
+
## 3e) non existing column which is NOT NULL
268
+
CREATE TABLE ndb$test (
269
+
block_number int unsigned,
270
+
non_existing int NOT NULL) ENGINE = ndbinfo;
271
+
SELECT * FROM ndb$test;
272
+
ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
273
+
SHOW WARNINGS;
274
+
Level Code Message
275
+
Warning 40001 Table 'ndb$test' is defined differently in NDB, column 'non_existing' is NOT NULL. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
276
+
Error 1296 Got error 40001 'Incompatible table definitions' from NDBINFO
277
+
DROP TABLE ndb$test;
222
278
223
279
## 4) Table with primary key/indexes not supported
SELECT * FROM view_on_table_which_does_not_exist_in_ndb;
327
+
node_id message
328
+
Warnings:
329
+
Note 1 'NDBINFO' has been started in offline mode since the 'NDBCLUSTER' engine is disabled or @@global.ndbinfo_offline is turned on - no rows can be returned
330
+
SELECT * FROM ndb$does_not_exist_in_ndb;
331
+
node_id message
332
+
Warnings:
333
+
Note 1 'NDBINFO' has been started in offline mode since the 'NDBCLUSTER' engine is disabled or @@global.ndbinfo_offline is turned on - no rows can be returned
334
+
SELECT DISTINCT(node_id) FROM ndbinfo.counters ORDER BY node_id;
335
+
node_id
336
+
Warnings:
337
+
Note 1 'NDBINFO' has been started in offline mode since the 'NDBCLUSTER' engine is disabled or @@global.ndbinfo_offline is turned on - no rows can be returned
338
+
339
+
DROP VIEW view_on_table_which_does_not_exist_in_ndb;
340
+
DROP TABLE ndb$does_not_exist_in_ndb;
341
+
342
+
set @@global.ndbinfo_offline = FALSE;
343
+
344
+
SELECT DISTINCT(node_id) FROM ndbinfo.counters ORDER BY node_id;
0 commit comments