23
23
Table Op Msg_type Msg_text
24
24
test.t1 check status OK
26
create TEMPORARY table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)) ENGINE=MYISAM;
26
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
27
27
insert into t1 (b) values (1),(2),(2),(2),(2);
28
alter table t1 engine=MYISAM;
30
Table Unique Key_name Seq_in_index Column_name
33
alter table t1 engine=MyISAM;
35
Table Unique Key_name Seq_in_index Column_name
29
Table Op Msg_type Msg_text
30
test.t1 optimize status OK
32
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
33
t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
34
t1 1 b 1 b A 5 NULL NULL BTREE
36
Table Op Msg_type Msg_text
37
test.t1 optimize status OK
39
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
40
t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
41
t1 1 b 1 b A 5 NULL NULL BTREE
39
43
create temporary table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=myisam;
40
44
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
93
99
insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'),
94
100
('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'),
95
101
('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47');
96
alter table t1 ENGINE=myisam;
103
Table Op Msg_type Msg_text
104
test.t1 optimize status OK
98
106
Table Op Msg_type Msg_text
99
107
test.t1 check status OK
305
313
CREATE TEMPORARY TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) ENGINE=MyISAM;
306
314
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
307
create temporary table t2 (a int not null, b int, c int, key(b), key(c), key(a)) engine=myisam;
315
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
308
316
INSERT into t2 values (1,1,1), (2,2,2);
309
alter table t1 ENGINE=MYISAM;
318
Table Op Msg_type Msg_text
319
test.t1 optimize status OK
310
320
show index from t1;
311
Table Unique Key_name Seq_in_index Column_name
321
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
322
t1 1 b 1 b A 5 NULL NULL YES BTREE
323
t1 1 c 1 c A 5 NULL NULL YES BTREE
324
t1 1 a 1 a A 1 NULL NULL BTREE
325
t1 1 a 2 b A 5 NULL NULL YES BTREE
326
t1 1 c_2 1 c A 5 NULL NULL YES BTREE
327
t1 1 c_2 2 a A 5 NULL NULL BTREE
318
328
explain select * from t1,t2 where t1.a=t2.a;
319
329
id select_type table type possible_keys key key_len ref rows Extra
320
330
1 SIMPLE t2 ALL a NULL NULL NULL 2
321
1 SIMPLE t1 ref a a 4 test.t2.a 1
331
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer
322
332
explain select * from t1,t2 force index(a) where t1.a=t2.a;
323
333
id select_type table type possible_keys key key_len ref rows Extra
324
334
1 SIMPLE t2 ALL a NULL NULL NULL 2
325
1 SIMPLE t1 ref a a 4 test.t2.a 1
335
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer
326
336
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
327
337
id select_type table type possible_keys key key_len ref rows Extra
328
338
1 SIMPLE t2 ALL a NULL NULL NULL 2
329
1 SIMPLE t1 ref a a 4 test.t2.a 1
339
1 SIMPLE t1 ref a a 4 test.t2.a 3
330
340
explain select * from t1,t2 where t1.b=t2.b;
331
341
id select_type table type possible_keys key key_len ref rows Extra
332
342
1 SIMPLE t2 ALL b NULL NULL NULL 2
333
1 SIMPLE t1 ALL b NULL NULL NULL 5 Using where; Using join buffer
343
1 SIMPLE t1 ref b b 5 test.t2.b 1
334
344
explain select * from t1,t2 force index(c) where t1.a=t2.a;
335
345
id select_type table type possible_keys key key_len ref rows Extra
336
346
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
337
1 SIMPLE t1 ref a a 4 test.t2.a 1
347
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer
338
348
explain select * from t1 where a=0 or a=2;
339
349
id select_type table type possible_keys key key_len ref rows Extra
340
350
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
343
353
1 SIMPLE t1 range a a 4 NULL 4 Using where
344
354
explain select * from t1 where c=1;
345
355
id select_type table type possible_keys key key_len ref rows Extra
346
1 SIMPLE t1 ref c,c_2 c 5 const 1 Using where
356
1 SIMPLE t1 ref c,c_2 c 5 const 1
347
357
explain select * from t1 use index() where c=1;
348
358
id select_type table type possible_keys key key_len ref rows Extra
349
359
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
350
360
drop table t1,t2;
351
create temporary table t1 (a int not null auto_increment primary key, b varchar(255)) engine=myisam;
361
create table t1 (a int not null auto_increment primary key, b varchar(255));
352
362
insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100));
353
363
update t1 set b=repeat(left(b,1),200) where a=1;
354
364
delete from t1 where (a mod 2) = 0;
487
create temporary table t1 (a int, b varchar(200), c text not null) engine=myisam;
488
create temporary table t2 (a int, b varchar(200), c text not null) engine=myisam;
497
create table t1 (a int, b varchar(200), c text not null);
498
create table t2 (a int, b varchar(200), c text not null);
489
499
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
490
500
insert t2 select * from t1;
492
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
493
# test t1 TEMPORARY MyISAM # # # # #
494
# test t2 TEMPORARY MyISAM # # # # #
501
checksum table t1, t2, t3 quick;
507
Error 1146 Table 'test.t3' doesn't exist
508
checksum table t1, t2, t3;
514
Error 1146 Table 'test.t3' doesn't exist
515
checksum table t1, t2, t3 extended;
521
Error 1146 Table 'test.t3' doesn't exist
495
522
drop table t1,t2;
496
create temporary table t1 ( a tinytext, b char(1), index idx (a(1),b) ) engine=myisam;
523
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
497
524
insert into t1 values (null,''), (null,'');
498
525
explain select count(*) from t1 where a is null;
499
526
id select_type table type possible_keys key key_len ref rows Extra
505
create temporary table t1 (c1 int, c2 varchar(4) not null default '',
506
key(c2(3))) engine=myisam;
532
create table t1 (c1 int, c2 varchar(4) not null default '',
507
534
insert into t1 values (1,'A'), (2, 'B'), (3, 'A');
508
535
update t1 set c2='A B' where c1=2;
510
537
Table Op Msg_type Msg_text
511
538
test.t1 check status OK
513
create temporary table t1(
540
create table t1 (c1 int);
541
insert into t1 values (1),(2),(3),(4);
545
delete from t1 where c1 = 1;
546
create table t2 as select * from t1;
514
555
cip INT NOT NULL,
515
556
score INT NOT NULL DEFAULT 0,
518
559
insert into t1 (cip) VALUES (1), (2), (3);
519
560
insert into t1 (cip, bob) VALUES (4, 'a' ), (5, 'b'),
598
643
DELETE FROM t1 WHERE _id < 8;
599
show table status LIKE 't1';
600
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
601
# test t1 TEMPORARY MyISAM # # # # #
603
Table Op Msg_type Msg_text
604
test.t1 check status OK
605
ALTER TABLE t1 ENGINE=MYISAM;
607
Table Op Msg_type Msg_text
608
test.t1 check status OK
609
show table status LIKE 't1';
610
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
611
# test t1 TEMPORARY MyISAM # # # # #
644
SHOW TABLE STATUS LIKE 't1';
645
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
646
CHECK TABLE t1 EXTENDED;
647
Table Op Msg_type Msg_text
648
test.t1 check status OK
650
Table Op Msg_type Msg_text
651
test.t1 optimize status OK
652
CHECK TABLE t1 EXTENDED;
653
Table Op Msg_type Msg_text
654
test.t1 check status OK
655
SHOW TABLE STATUS LIKE 't1';
656
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
612
657
SELECT _id FROM t1;
662
SET GLOBAL myisam_repair_threads=1;
663
SHOW VARIABLES LIKE 'myisam_repair%';
665
myisam_repair_threads 1
617
666
CREATE TEMPORARY TABLE t1 (c1 TEXT) ENGINE=MyISAM;
618
show table status like 't1';
619
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
620
# test t1 TEMPORARY MyISAM # # # # #
667
SHOW TABLE STATUS LIKE 't1';
668
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
622
670
CREATE TEMPORARY TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
623
671
INSERT INTO t1 VALUES
778
826
insert into t1 values('+ ', '+ ', '+ ');
779
827
set @a=repeat(' ',20);
780
828
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
781
ERROR 22001: Data too long for column 'v' at row 1
782
set @a=repeat(' ',10);
783
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
784
ERROR 22001: Data too long for column 'v' at row 1
785
set @a=repeat(' ',9);
786
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
830
Note 1265 Data truncated for column 'v' at row 1
831
Note 1265 Data truncated for column 'c' at row 1
787
832
select concat('*',v,'*',c,'*',t,'*') from t1;
788
833
concat('*',v,'*',c,'*',t,'*')
791
836
show create table t1;
792
837
Table Create Table
793
838
t1 CREATE TEMPORARY TABLE `t1` (
794
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
795
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
796
`t` TEXT COLLATE utf8_general_ci
797
) ENGINE=MyISAM COLLATE = utf8_general_ci
839
`v` varchar(10) DEFAULT NULL,
840
`c` varchar(10) DEFAULT NULL,
798
843
create TEMPORARY table t2 like t1;
799
844
show create table t2;
800
845
Table Create Table
801
846
t2 CREATE TEMPORARY TABLE `t2` (
802
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
803
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
804
`t` TEXT COLLATE utf8_general_ci
805
) ENGINE=MyISAM COLLATE = utf8_general_ci
847
`v` varchar(10) DEFAULT NULL,
848
`c` varchar(10) DEFAULT NULL,
806
851
create TEMPORARY table t3 select * from t1;
807
852
show create table t3;
808
853
Table Create Table
809
854
t3 CREATE TEMPORARY TABLE `t3` (
810
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
811
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
812
`t` TEXT COLLATE utf8_general_ci
813
) ENGINE=MyISAM COLLATE = utf8_general_ci
855
`v` varchar(10) DEFAULT NULL,
856
`c` varchar(10) DEFAULT NULL,
814
859
alter table t1 modify c varchar(10);
815
860
show create table t1;
816
861
Table Create Table
817
862
t1 CREATE TEMPORARY TABLE `t1` (
818
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
819
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
820
`t` TEXT COLLATE utf8_general_ci
821
) ENGINE=MyISAM COLLATE = utf8_general_ci
863
`v` varchar(10) DEFAULT NULL,
864
`c` varchar(10) DEFAULT NULL,
822
867
alter table t1 modify v char(10);
823
868
show create table t1;
824
869
Table Create Table
825
870
t1 CREATE TEMPORARY TABLE `t1` (
826
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
827
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
828
`t` TEXT COLLATE utf8_general_ci
829
) ENGINE=MyISAM COLLATE = utf8_general_ci
871
`v` varchar(10) DEFAULT NULL,
872
`c` varchar(10) DEFAULT NULL,
830
875
alter table t1 modify t varchar(10);
877
Note 1265 Data truncated for column 't' at row 2
831
878
show create table t1;
832
879
Table Create Table
833
880
t1 CREATE TEMPORARY TABLE `t1` (
834
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
835
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
836
`t` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
837
) ENGINE=MyISAM COLLATE = utf8_general_ci
881
`v` varchar(10) DEFAULT NULL,
882
`c` varchar(10) DEFAULT NULL,
883
`t` varchar(10) DEFAULT NULL
838
885
select concat('*',v,'*',c,'*',t,'*') from t1;
839
886
concat('*',v,'*',c,'*',t,'*')
1303
1350
show create table t1;
1304
1351
Table Create Table
1305
1352
t1 CREATE TEMPORARY TABLE `t1` (
1306
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1307
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1308
`t` TEXT COLLATE utf8_general_ci,
1353
`v` varchar(10) DEFAULT NULL,
1354
`c` varchar(10) DEFAULT NULL,
1309
1356
KEY `v` (`v`(5)),
1310
1357
KEY `c` (`c`(5)),
1311
1358
KEY `t` (`t`(5))
1312
) ENGINE=MyISAM COLLATE = utf8_general_ci
1314
1361
create TEMPORARY table t1 (v char(10));
1315
1362
show create table t1;
1316
1363
Table Create Table
1317
1364
t1 CREATE TEMPORARY TABLE `t1` (
1318
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
1319
) ENGINE=MyISAM COLLATE = utf8_general_ci
1365
`v` varchar(10) DEFAULT NULL
1321
create TEMPORARY table t1 (v varchar(10), c char(10));
1368
create TEMPORARY table t1 (v varchar(10), c char(10)) row_format=fixed;
1322
1369
show create table t1;
1323
1370
Table Create Table
1324
1371
t1 CREATE TEMPORARY TABLE `t1` (
1325
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1326
`c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
1327
) ENGINE=MyISAM COLLATE = utf8_general_ci
1372
`v` varchar(10) DEFAULT NULL,
1373
`c` varchar(10) DEFAULT NULL
1374
) ENGINE=MyISAM ROW_FORMAT=FIXED
1328
1375
insert into t1 values('a','a'),('a ','a ');
1329
1376
select concat('*',v,'*',c,'*') from t1;
1330
1377
concat('*',v,'*',c,'*')
1349
1396
create temporary table t1 (v varchar(65535));
1350
1397
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1351
1398
set storage_engine=InnoDB;
1352
create temporary table t1 (a int, key(a)) engine=myisam;
1399
create table t1 (a int, key(a));
1353
1400
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
1354
1401
analyze table t1;
1355
1402
Table Op Msg_type Msg_text
1356
test.t1 analyze note The storage engine for the table doesn't support analyze
1403
test.t1 analyze status OK
1357
1404
show keys from t1;
1358
Table Unique Key_name Seq_in_index Column_name
1405
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
1406
t1 1 a 1 a A 8 NULL NULL YES BTREE
1360
1407
alter table t1 disable keys;
1409
Note 1031 Table storage engine for 't1' doesn't have this option
1361
1410
alter table t1 enable keys;
1412
Note 1031 Table storage engine for 't1' doesn't have this option
1362
1413
show keys from t1;
1363
Table Unique Key_name Seq_in_index Column_name
1414
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
1415
t1 1 a 1 a A 8 NULL NULL YES BTREE
1366
1417
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1367
1418
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
1392
1443
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
1393
show table status like 't1';
1394
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
1395
# test t1 TEMPORARY MyISAM # # # # #
1444
SHOW TABLE STATUS LIKE 't1';
1445
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
1396
1446
INSERT INTO t1 VALUES (1,1);
1397
show table status like 't1';
1398
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
1399
# test t1 TEMPORARY MyISAM # # # # #
1400
ALTER TABLE t1 DISABLE KEYS;
1401
show table status like 't1';
1402
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
1403
# test t1 TEMPORARY MyISAM # # # # #
1404
ALTER TABLE t1 ENABLE KEYS;
1405
show table status like 't1';
1406
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
1407
# test t1 TEMPORARY MyISAM # # # # #
1408
ALTER TABLE t1 DISABLE KEYS;
1409
show table status like 't1';
1410
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
1411
# test t1 TEMPORARY MyISAM # # # # #
1412
ALTER TABLE t1 ENABLE KEYS;
1413
show table status like 't1';
1414
Session Schema Name Type Engine Version Rows Avg_row_length Table_size Auto_increment
1415
# test t1 TEMPORARY MyISAM # # # # #
1447
SHOW TABLE STATUS LIKE 't1';
1448
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
1449
ALTER TABLE t1 DISABLE KEYS;
1450
SHOW TABLE STATUS LIKE 't1';
1451
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
1452
ALTER TABLE t1 ENABLE KEYS;
1453
SHOW TABLE STATUS LIKE 't1';
1454
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
1455
ALTER TABLE t1 DISABLE KEYS;
1456
SHOW TABLE STATUS LIKE 't1';
1457
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
1458
ALTER TABLE t1 ENABLE KEYS;
1459
SHOW TABLE STATUS LIKE 't1';
1460
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
1416
1461
# Enable keys with parallel repair
1462
SET GLOBAL myisam_repair_threads=2;
1417
1463
ALTER TABLE t1 DISABLE KEYS;
1418
1464
ALTER TABLE t1 ENABLE KEYS;
1465
SET GLOBAL myisam_repair_threads=1;
1466
CHECK TABLE t1 EXTENDED;
1420
1467
Table Op Msg_type Msg_text
1421
1468
test.t1 check status OK
1437
1484
DROP TABLE t1, t2;
1438
1485
End of 5.0 tests
1486
create temporary table t1 (a int not null, key `a` (a) key_block_size=1024) ENGINE=MyISAM;
1487
show create table t1;
1489
t1 CREATE TEMPORARY TABLE `t1` (
1491
KEY `a` (`a`) KEY_BLOCK_SIZE=1024
1494
create temporary table t1 (a int not null, key `a` (a) key_block_size=2048) ENGINE=MyISAM;
1495
show create table t1;
1497
t1 CREATE TEMPORARY TABLE `t1` (
1499
KEY `a` (`a`) KEY_BLOCK_SIZE=2048
1502
create temporary table t1 (a varchar(2048), key `a` (a)) ENGINE=MyISAM;
1504
Warning 1071 Specified key was too long; max key length is 1332 bytes
1505
show create table t1;
1507
t1 CREATE TEMPORARY TABLE `t1` (
1508
`a` varchar(2048) DEFAULT NULL,
1512
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1024) ENGINE=MyISAM;
1514
Warning 1071 Specified key was too long; max key length is 1332 bytes
1515
show create table t1;
1517
t1 CREATE TEMPORARY TABLE `t1` (
1518
`a` varchar(2048) DEFAULT NULL,
1519
KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
1522
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=1024;
1524
Warning 1071 Specified key was too long; max key length is 1332 bytes
1525
show create table t1;
1527
t1 CREATE TEMPORARY TABLE `t1` (
1529
`b` varchar(2048) DEFAULT NULL,
1531
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=6144
1532
) ENGINE=MyISAM KEY_BLOCK_SIZE=1024
1533
alter table t1 key_block_size=2048;
1534
show create table t1;
1536
t1 CREATE TEMPORARY TABLE `t1` (
1538
`b` varchar(2048) DEFAULT NULL,
1539
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1540
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192
1541
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
1542
alter table t1 add c int, add key (c);
1543
show create table t1;
1545
t1 CREATE TEMPORARY TABLE `t1` (
1547
`b` varchar(2048) DEFAULT NULL,
1548
`c` int DEFAULT NULL,
1549
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1550
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
1552
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
1553
alter table t1 key_block_size=0;
1554
alter table t1 add d int, add key (d);
1555
show create table t1;
1557
t1 CREATE TEMPORARY TABLE `t1` (
1559
`b` varchar(2048) DEFAULT NULL,
1560
`c` int DEFAULT NULL,
1561
`d` int DEFAULT NULL,
1562
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1563
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
1564
KEY `c` (`c`) KEY_BLOCK_SIZE=2048,
1568
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=8192;
1570
Warning 1071 Specified key was too long; max key length is 1332 bytes
1571
show create table t1;
1573
t1 CREATE TEMPORARY TABLE `t1` (
1575
`b` varchar(2048) DEFAULT NULL,
1578
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
1580
create temporary table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) ENGINE=MyISAM key_block_size=8192;
1582
Warning 1071 Specified key was too long; max key length is 1332 bytes
1583
show create table t1;
1585
t1 CREATE TEMPORARY TABLE `t1` (
1587
`b` varchar(2048) DEFAULT NULL,
1588
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1590
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
1592
create temporary table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) ENGINE=MyISAM key_block_size=16384;
1593
show create table t1;
1595
t1 CREATE TEMPORARY TABLE `t1` (
1597
`b` int DEFAULT NULL,
1598
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1599
KEY `b` (`b`) KEY_BLOCK_SIZE=8192
1600
) ENGINE=MyISAM KEY_BLOCK_SIZE=16384
1602
create temporary table t1 (a int not null, key `a` (a) key_block_size=512) ENGINE=MyISAM;
1603
show create table t1;
1605
t1 CREATE TEMPORARY TABLE `t1` (
1607
KEY `a` (`a`) KEY_BLOCK_SIZE=1024
1610
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000) ENGINE=MyISAM;
1612
Warning 1071 Specified key was too long; max key length is 1332 bytes
1613
show create table t1;
1615
t1 CREATE TEMPORARY TABLE `t1` (
1616
`a` varchar(2048) DEFAULT NULL,
1617
KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
1620
create temporary table t1 (a int not null, key `a` (a) key_block_size=1025) ENGINE=MyISAM;
1621
show create table t1;
1623
t1 CREATE TEMPORARY TABLE `t1` (
1625
KEY `a` (`a`) KEY_BLOCK_SIZE=2048
1628
create temporary table t1 (a int not null, key key_block_size=1024 (a)) ENGINE=MyISAM;
1629
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '=1024 (a)) ENGINE=MyISAM' at line 1
1630
create temporary table t1 (a int not null, key `a` key_block_size=1024 (a)) ENGINE=MyISAM;
1631
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_block_size=1024 (a)) ENGINE=MyISAM' at line 1
1439
1632
CREATE temporary TABLE t1 (
1441
1634
c2 VARCHAR(300),
1551
1746
CHECK TABLE t1;
1552
1747
Table Op Msg_type Msg_text
1553
1748
test.t1 check status OK
1555
Table Op Msg_type Msg_text
1556
test.t1 check status OK
1558
CREATE temporary TABLE t1 (
1562
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1563
SELECT COUNT(*) FROM t1;
1567
Table Op Msg_type Msg_text
1568
test.t1 check status OK
1569
SELECT COUNT(*) FROM t1;
1573
Table Op Msg_type Msg_text
1574
test.t1 check status OK
1576
CREATE temporary TABLE t1 (
1580
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1581
SELECT COUNT(*) FROM t1;
1585
Table Op Msg_type Msg_text
1586
test.t1 check status OK
1587
SELECT COUNT(*) FROM t1;
1749
CHECK TABLE t1 EXTENDED;
1750
Table Op Msg_type Msg_text
1751
test.t1 check status OK
1753
CREATE temporary TABLE t1 (
1757
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1758
SELECT COUNT(*) FROM t1;
1762
Table Op Msg_type Msg_text
1763
test.t1 check status OK
1764
SELECT COUNT(*) FROM t1;
1768
Table Op Msg_type Msg_text
1769
test.t1 check status OK
1771
CREATE temporary TABLE t1 (
1775
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1776
SELECT COUNT(*) FROM t1;
1779
CHECK TABLE t1 EXTENDED;
1780
Table Op Msg_type Msg_text
1781
test.t1 check status OK
1782
SELECT COUNT(*) FROM t1;
1785
CHECK TABLE t1 EXTENDED;
1591
1786
Table Op Msg_type Msg_text
1592
1787
test.t1 check status OK