1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
|
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
**** Test Setup Section ****
CREATE LOGFILE GROUP lg
ADD UNDOFILE './lg_group/undofile.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;
CREATE TABLESPACE ts
ADD DATAFILE './table_space/datafile.dat'
USE LOGFILE GROUP lg
INITIAL_SIZE 12M
ENGINE NDB;
CREATE TABLE test.t1 (
a1 smallint NOT NULL,
a2 int NOT NULL,
a3 bigint NOT NULL,
a4 char(10),
a5 decimal(5,1),
a6 time,
a7 date,
a8 datetime,
a9 VARCHAR(255),
a10 blob,
PRIMARY KEY(a1)
) ENGINE=InnoDB;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM test.t1 ORDER BY a1;
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Int NOT NULL AT=FIXED ST=DISK
a3 Bigint NOT NULL AT=FIXED ST=DISK
a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a5 Decimal(5,1) NULL AT=FIXED ST=DISK
a6 Time NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Datetime NULL AT=FIXED ST=DISK
a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
SELECT * FROM test.t1 ORDER BY a1;
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
DROP TABLE test.t1;
CREATE TABLE test.t1 (
a1 smallint NOT NULL,
a2 int NOT NULL,
a3 bigint NOT NULL,
a4 char(10),
a5 decimal(5,1),
a6 time,
a7 date,
a8 datetime,
a9 VARCHAR(255),
a10 blob,
PRIMARY KEY(a1)
) ENGINE=MyISAM;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM test.t1 ORDER BY a1;
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Int NOT NULL AT=FIXED ST=DISK
a3 Bigint NOT NULL AT=FIXED ST=DISK
a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a5 Decimal(5,1) NULL AT=FIXED ST=DISK
a6 Time NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Datetime NULL AT=FIXED ST=DISK
a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
SELECT * FROM test.t1 ORDER BY a1;
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
ALTER TABLE test.t1 ENGINE=InnoDB;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM test.t1 ORDER BY a1;
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Int NOT NULL AT=FIXED ST=DISK
a3 Bigint NOT NULL AT=FIXED ST=DISK
a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a5 Decimal(5,1) NULL AT=FIXED ST=DISK
a6 Time NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Datetime NULL AT=FIXED ST=DISK
a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
ALTER TABLE test.t1 ENGINE=MyISAM;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE test.t1;
CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB;
SELECT * FROM test.t1 ORDER BY a1;
a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
NULL test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts
ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE;
SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
NULL test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts
SELECT * FROM test.t1 ORDER BY a1;
a1 a2 a3
1 2.2345 20000001
2 3.2345 20000002
3 4.2345 20000003
4 5.2345 20000004
5 6.2345 20000005
6 7.2345 20000006
7 8.2345 20000007
8 9.2345 20000008
9 10.2345 20000009
10 11.2345 20000010
11 12.2345 20000011
12 13.2345 20000012
13 14.2345 20000013
14 15.2345 20000014
15 16.2345 20000015
16 17.2345 20000016
17 18.2345 20000017
18 19.2345 20000018
19 20.2345 20000019
20 21.2345 20000020
ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME;
SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1;
a1 a2 a3 hex(a4) a5 a6 a7 a8
1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00
2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00
3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00
4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00
5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00
6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00
7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00
8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00
9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00
10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00
11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00
12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00
13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00
14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00
15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00
16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00
17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00
18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00
19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00
20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00
ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` int(11) NOT NULL,
`a2` float DEFAULT NULL,
`a3` double DEFAULT NULL,
`a4` bit(1) DEFAULT NULL,
`a5` tinyint(4) DEFAULT NULL,
`a6` bigint(20) DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` time DEFAULT NULL,
`a9` datetime DEFAULT NULL,
`a10` tinytext,
`a11` mediumtext,
`a12` longtext,
`a13` text,
`a14` blob,
PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=DISK
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1;
a1 a2 a3 hex(a4) a5 a6 a7 a8 a9 a10 a11 a12 a13
1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field
ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3);
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` int(11) NOT NULL,
`a2` float DEFAULT NULL,
`a3` double DEFAULT NULL,
`a4` bit(1) DEFAULT NULL,
`a5` tinyint(4) DEFAULT NULL,
`a6` bigint(20) DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` time DEFAULT NULL,
`a9` datetime DEFAULT NULL,
`a10` tinytext,
`a11` mediumtext,
`a12` longtext,
`a13` text,
`a14` blob,
PRIMARY KEY (`a1`),
KEY `a2_i` (`a2`),
KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=MEMORY
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
ALTER TABLE test.t1 DROP INDEX a2_i;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` int(11) NOT NULL,
`a2` float DEFAULT NULL,
`a3` double DEFAULT NULL,
`a4` bit(1) DEFAULT NULL,
`a5` tinyint(4) DEFAULT NULL,
`a6` bigint(20) DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` time DEFAULT NULL,
`a9` datetime DEFAULT NULL,
`a10` tinytext,
`a11` mediumtext,
`a12` longtext,
`a13` text,
`a14` blob,
PRIMARY KEY (`a1`),
KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
TRUNCATE TABLE test.t1;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` int(11) NOT NULL,
`a2` float DEFAULT NULL,
`a3` double DEFAULT NULL,
`a4` bit(1) DEFAULT NULL,
`a5` tinyint(4) DEFAULT NULL,
`a6` bigint(20) DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` time DEFAULT NULL,
`a9` datetime DEFAULT NULL,
`a10` tinytext,
`a11` mediumtext,
`a12` longtext,
`a13` text,
`a14` blob,
PRIMARY KEY (`a1`),
KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
ALTER TABLE test.t1 DROP a14;
ALTER TABLE test.t1 DROP a13;
ALTER TABLE test.t1 DROP a12;
ALTER TABLE test.t1 DROP a11;
ALTER TABLE test.t1 DROP a10;
ALTER TABLE test.t1 DROP a9;
ALTER TABLE test.t1 DROP a8;
ALTER TABLE test.t1 DROP a7;
ALTER TABLE test.t1 DROP a6;
ALTER TABLE test.t1 DROP PRIMARY KEY;
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` int(11) NOT NULL,
`a2` float DEFAULT NULL,
`a3` double DEFAULT NULL,
`a4` bit(1) DEFAULT NULL,
`a5` tinyint(4) DEFAULT NULL,
KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int NOT NULL AT=FIXED ST=DISK
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
DROP TABLE test.t1;
ALTER TABLESPACE ts
DROP DATAFILE './table_space/datafile.dat'
ENGINE NDB;
DROP TABLESPACE ts ENGINE NDB;
DROP LOGFILE GROUP lg ENGINE=NDB;
|