383
383
insert into t3 values (1,1),(2,2);
384
384
show table status;
385
385
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
386
t1 MEMORY 0 Fixed 2 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
387
t2 MEMORY 0 Fixed 2 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
388
t3 MEMORY 0 Fixed 2 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
389
386
insert into t1 values (3),(4);
390
387
insert into t2 values (3),(4);
391
388
insert into t3 values (3,3),(4,4);
392
389
show table status;
393
390
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
394
t1 MEMORY 0 Fixed 4 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
395
t2 MEMORY 0 Fixed 4 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
396
t3 MEMORY 0 Fixed 4 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
397
391
insert into t1 values (5);
398
392
insert into t2 values (5);
399
393
insert into t3 values (5,5);
400
394
show table status;
401
395
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
402
t1 MEMORY 0 Fixed 5 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
403
t2 MEMORY 0 Fixed 5 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
404
t3 MEMORY 0 Fixed 5 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
405
396
delete from t1 where a=3;
406
397
delete from t2 where b=3;
407
398
delete from t3 where a=3;
408
399
show table status;
409
400
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
410
t1 MEMORY 0 Fixed 4 # # # # # NULL NULL NULL NULL utf8_general_ci NULL
411
t2 MEMORY 0 Fixed 4 # # # # # NULL NULL NULL NULL utf8_general_ci NULL
412
t3 MEMORY 0 Fixed 4 # # # # # NULL NULL NULL NULL utf8_general_ci NULL
413
401
truncate table t1;
414
402
truncate table t2;
415
403
truncate table t3;
416
404
show table status;
417
405
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
418
t1 MEMORY 0 Fixed 0 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
419
t2 MEMORY 0 Fixed 0 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
420
t3 MEMORY 0 Fixed 0 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
421
406
insert into t1 values (5);
422
407
insert into t2 values (5);
423
408
insert into t3 values (5,5);
424
409
show table status;
425
410
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
426
t1 MEMORY 0 Fixed 1 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
427
t2 MEMORY 0 Fixed 1 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
428
t3 MEMORY 0 Fixed 1 # # # # 0 NULL NULL NULL NULL utf8_general_ci NULL
429
411
delete from t1 where a=5;
430
412
delete from t2 where b=5;
431
413
delete from t3 where a=5;
432
414
show table status;
433
415
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
434
t1 MEMORY 0 Fixed 0 # # # # # NULL NULL NULL NULL utf8_general_ci NULL
435
t2 MEMORY 0 Fixed 0 # # # # # NULL NULL NULL NULL utf8_general_ci NULL
436
t3 MEMORY 0 Fixed 0 # # # # # NULL NULL NULL NULL utf8_general_ci NULL
437
416
drop table t1, t2, t3;
438
CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
417
CREATE TEMPORARY TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
439
418
SHOW CREATE TABLE t1;
440
419
Table Create Table
441
t1 CREATE TABLE `t1` (
420
t1 CREATE TEMPORARY TABLE `t1` (
442
421
`i` int DEFAULT NULL,
446
CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY;
425
CREATE TEMPORARY TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY;
447
426
SHOW CREATE TABLE t1;
448
427
Table Create Table
449
t1 CREATE TABLE `t1` (
428
t1 CREATE TEMPORARY TABLE `t1` (
450
429
`i` int DEFAULT NULL,
451
430
KEY `i` (`i`) USING HASH
454
CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
433
CREATE TEMPORARY TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
455
434
SHOW CREATE TABLE t1;
456
435
Table Create Table
457
t1 CREATE TABLE `t1` (
436
t1 CREATE TEMPORARY TABLE `t1` (
458
437
`i` int DEFAULT NULL,
459
438
KEY `i` (`i`) USING BTREE