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) checksum=1;
498
create table t2 (a int, b varchar(200), c text not null) checksum=0;
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
651
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 # # # # #
652
SHOW TABLE STATUS LIKE 't1';
653
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
654
CHECK TABLE t1 EXTENDED;
655
Table Op Msg_type Msg_text
656
test.t1 check status OK
658
Table Op Msg_type Msg_text
659
test.t1 optimize status OK
660
CHECK TABLE t1 EXTENDED;
661
Table Op Msg_type Msg_text
662
test.t1 check status OK
663
SHOW TABLE STATUS LIKE 't1';
664
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
665
SELECT _id FROM t1;
617
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 # # # # #
670
SET GLOBAL myisam_repair_threads=1;
671
SHOW VARIABLES LIKE 'myisam_repair%';
673
myisam_repair_threads 1
674
CREATE TABLE t1(a VARCHAR(16));
675
INSERT INTO t1 VALUES('aaaaaaaa'),(NULL);
676
UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa';
682
CREATE TABLE t1(a INT);
683
INSERT INTO t1 VALUES(1),(2);
684
UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1;
685
SELECT * FROM t1 ORDER BY a;
690
CREATE TEMPORARY TABLE t1 (c1 TEXT) ENGINE=MyISAM AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100;
691
SHOW TABLE STATUS LIKE 't1';
692
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
694
CREATE TEMPORARY TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
623
695
INSERT INTO t1 VALUES
778
850
insert into t1 values('+ ', '+ ', '+ ');
779
851
set @a=repeat(' ',20);
780
852
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));
854
Note 1265 Data truncated for column 'v' at row 1
855
Note 1265 Data truncated for column 'c' at row 1
787
856
select concat('*',v,'*',c,'*',t,'*') from t1;
788
857
concat('*',v,'*',c,'*',t,'*')
791
860
show create table t1;
792
861
Table Create Table
793
862
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
863
`v` varchar(10) DEFAULT NULL,
864
`c` varchar(10) DEFAULT NULL,
798
867
create TEMPORARY table t2 like t1;
799
868
show create table t2;
800
869
Table Create Table
801
870
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
871
`v` varchar(10) DEFAULT NULL,
872
`c` varchar(10) DEFAULT NULL,
806
875
create TEMPORARY table t3 select * from t1;
807
876
show create table t3;
808
877
Table Create Table
809
878
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
879
`v` varchar(10) DEFAULT NULL,
880
`c` varchar(10) DEFAULT NULL,
814
883
alter table t1 modify c varchar(10);
815
884
show create table t1;
816
885
Table Create Table
817
886
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
887
`v` varchar(10) DEFAULT NULL,
888
`c` varchar(10) DEFAULT NULL,
822
891
alter table t1 modify v char(10);
823
892
show create table t1;
824
893
Table Create Table
825
894
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
895
`v` varchar(10) DEFAULT NULL,
896
`c` varchar(10) DEFAULT NULL,
830
899
alter table t1 modify t varchar(10);
901
Note 1265 Data truncated for column 't' at row 2
831
902
show create table t1;
832
903
Table Create Table
833
904
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
905
`v` varchar(10) DEFAULT NULL,
906
`c` varchar(10) DEFAULT NULL,
907
`t` varchar(10) DEFAULT NULL
838
909
select concat('*',v,'*',c,'*',t,'*') from t1;
839
910
concat('*',v,'*',c,'*',t,'*')
1303
1374
show create table t1;
1304
1375
Table Create Table
1305
1376
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,
1377
`v` varchar(10) DEFAULT NULL,
1378
`c` varchar(10) DEFAULT NULL,
1309
1380
KEY `v` (`v`(5)),
1310
1381
KEY `c` (`c`(5)),
1311
1382
KEY `t` (`t`(5))
1312
) ENGINE=MyISAM COLLATE = utf8_general_ci
1314
1385
create TEMPORARY table t1 (v char(10));
1315
1386
show create table t1;
1316
1387
Table Create Table
1317
1388
t1 CREATE TEMPORARY TABLE `t1` (
1318
`v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
1319
) ENGINE=MyISAM COLLATE = utf8_general_ci
1389
`v` varchar(10) DEFAULT NULL
1321
create TEMPORARY table t1 (v varchar(10), c char(10));
1392
create TEMPORARY table t1 (v varchar(10), c char(10)) row_format=fixed;
1322
1393
show create table t1;
1323
1394
Table Create Table
1324
1395
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
1396
`v` varchar(10) DEFAULT NULL,
1397
`c` varchar(10) DEFAULT NULL
1398
) ENGINE=MyISAM ROW_FORMAT=FIXED
1328
1399
insert into t1 values('a','a'),('a ','a ');
1329
1400
select concat('*',v,'*',c,'*') from t1;
1330
1401
concat('*',v,'*',c,'*')
1349
1420
create temporary table t1 (v varchar(65535));
1350
1421
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1351
1422
set storage_engine=InnoDB;
1352
create temporary table t1 (a int, key(a)) engine=myisam;
1423
create table t1 (a int, key(a));
1353
1424
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
1354
1425
analyze table t1;
1355
1426
Table Op Msg_type Msg_text
1356
test.t1 analyze note The storage engine for the table doesn't support analyze
1427
test.t1 analyze status OK
1357
1428
show keys from t1;
1358
Table Unique Key_name Seq_in_index Column_name
1429
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
1430
t1 1 a 1 a A 8 NULL NULL YES BTREE
1360
1431
alter table t1 disable keys;
1433
Note 1031 Table storage engine for 't1' doesn't have this option
1361
1434
alter table t1 enable keys;
1436
Note 1031 Table storage engine for 't1' doesn't have this option
1362
1437
show keys from t1;
1363
Table Unique Key_name Seq_in_index Column_name
1438
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
1439
t1 1 a 1 a A 8 NULL NULL YES BTREE
1441
create temporary table t1 (c1 int) engine=myisam pack_keys=0;
1442
create temporary table t2 (c1 int) engine=myisam pack_keys=1;
1443
create temporary table t3 (c1 int) engine=myisam pack_keys=default;
1444
create temporary table t4 (c1 int) engine=myisam pack_keys=2;
1445
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 '2' at line 1
1446
drop table t1, t2, t3;
1366
1447
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1367
1448
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
1368
1449
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
1392
1473
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 # # # # #
1474
SHOW TABLE STATUS LIKE 't1';
1475
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
1476
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 # # # # #
1477
SHOW TABLE STATUS LIKE 't1';
1478
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
1479
ALTER TABLE t1 DISABLE KEYS;
1480
SHOW TABLE STATUS LIKE 't1';
1481
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
1482
ALTER TABLE t1 ENABLE KEYS;
1483
SHOW TABLE STATUS LIKE 't1';
1484
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
1485
ALTER TABLE t1 DISABLE KEYS;
1486
SHOW TABLE STATUS LIKE 't1';
1487
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
1488
ALTER TABLE t1 ENABLE KEYS;
1489
SHOW TABLE STATUS LIKE 't1';
1490
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
1491
# Enable keys with parallel repair
1492
SET GLOBAL myisam_repair_threads=2;
1417
1493
ALTER TABLE t1 DISABLE KEYS;
1418
1494
ALTER TABLE t1 ENABLE KEYS;
1495
SET GLOBAL myisam_repair_threads=1;
1496
CHECK TABLE t1 EXTENDED;
1420
1497
Table Op Msg_type Msg_text
1421
1498
test.t1 check status OK
1514
DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
1437
1521
DROP TABLE t1, t2;
1438
1522
End of 5.0 tests
1523
create temporary table t1 (a int not null, key `a` (a) key_block_size=1024) ENGINE=MyISAM;
1524
show create table t1;
1526
t1 CREATE TEMPORARY TABLE `t1` (
1528
KEY `a` (`a`) KEY_BLOCK_SIZE=1024
1531
create temporary table t1 (a int not null, key `a` (a) key_block_size=2048) ENGINE=MyISAM;
1532
show create table t1;
1534
t1 CREATE TEMPORARY TABLE `t1` (
1536
KEY `a` (`a`) KEY_BLOCK_SIZE=2048
1539
create temporary table t1 (a varchar(2048), key `a` (a)) ENGINE=MyISAM;
1541
Warning 1071 Specified key was too long; max key length is 1332 bytes
1542
show create table t1;
1544
t1 CREATE TEMPORARY TABLE `t1` (
1545
`a` varchar(2048) DEFAULT NULL,
1549
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1024) ENGINE=MyISAM;
1551
Warning 1071 Specified key was too long; max key length is 1332 bytes
1552
show create table t1;
1554
t1 CREATE TEMPORARY TABLE `t1` (
1555
`a` varchar(2048) DEFAULT NULL,
1556
KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
1559
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=1024;
1561
Warning 1071 Specified key was too long; max key length is 1332 bytes
1562
show create table t1;
1564
t1 CREATE TEMPORARY TABLE `t1` (
1566
`b` varchar(2048) DEFAULT NULL,
1568
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=6144
1569
) ENGINE=MyISAM KEY_BLOCK_SIZE=1024
1570
alter table t1 key_block_size=2048;
1571
show create table t1;
1573
t1 CREATE TEMPORARY TABLE `t1` (
1575
`b` varchar(2048) DEFAULT NULL,
1576
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1577
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192
1578
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
1579
alter table t1 add c int, add key (c);
1580
show create table t1;
1582
t1 CREATE TEMPORARY TABLE `t1` (
1584
`b` varchar(2048) DEFAULT NULL,
1585
`c` int DEFAULT NULL,
1586
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1587
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
1589
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
1590
alter table t1 key_block_size=0;
1591
alter table t1 add d int, add key (d);
1592
show create table t1;
1594
t1 CREATE TEMPORARY TABLE `t1` (
1596
`b` varchar(2048) DEFAULT NULL,
1597
`c` int DEFAULT NULL,
1598
`d` int DEFAULT NULL,
1599
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1600
KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
1601
KEY `c` (`c`) KEY_BLOCK_SIZE=2048,
1605
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=8192;
1607
Warning 1071 Specified key was too long; max key length is 1332 bytes
1608
show create table t1;
1610
t1 CREATE TEMPORARY TABLE `t1` (
1612
`b` varchar(2048) DEFAULT NULL,
1615
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
1617
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;
1619
Warning 1071 Specified key was too long; max key length is 1332 bytes
1620
show create table t1;
1622
t1 CREATE TEMPORARY TABLE `t1` (
1624
`b` varchar(2048) DEFAULT NULL,
1625
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1627
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
1629
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;
1630
show create table t1;
1632
t1 CREATE TEMPORARY TABLE `t1` (
1634
`b` int DEFAULT NULL,
1635
KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1636
KEY `b` (`b`) KEY_BLOCK_SIZE=8192
1637
) ENGINE=MyISAM KEY_BLOCK_SIZE=16384
1639
create temporary table t1 (a int not null, key `a` (a) key_block_size=512) ENGINE=MyISAM;
1640
show create table t1;
1642
t1 CREATE TEMPORARY TABLE `t1` (
1644
KEY `a` (`a`) KEY_BLOCK_SIZE=1024
1647
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000) ENGINE=MyISAM;
1649
Warning 1071 Specified key was too long; max key length is 1332 bytes
1650
show create table t1;
1652
t1 CREATE TEMPORARY TABLE `t1` (
1653
`a` varchar(2048) DEFAULT NULL,
1654
KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
1657
create temporary table t1 (a int not null, key `a` (a) key_block_size=1025) ENGINE=MyISAM;
1658
show create table t1;
1660
t1 CREATE TEMPORARY TABLE `t1` (
1662
KEY `a` (`a`) KEY_BLOCK_SIZE=2048
1665
create temporary table t1 (a int not null, key key_block_size=1024 (a)) ENGINE=MyISAM;
1666
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
1667
create temporary table t1 (a int not null, key `a` key_block_size=1024 (a)) ENGINE=MyISAM;
1668
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
1669
CREATE temporary TABLE t1 (
1441
1671
c2 VARCHAR(300),
1551
1783
CHECK TABLE t1;
1552
1784
Table Op Msg_type Msg_text
1553
1785
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;
1786
CHECK TABLE t1 EXTENDED;
1787
Table Op Msg_type Msg_text
1788
test.t1 check status OK
1790
CREATE temporary TABLE t1 (
1794
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1795
SELECT COUNT(*) FROM t1;
1799
Table Op Msg_type Msg_text
1800
test.t1 check status OK
1801
SELECT COUNT(*) FROM t1;
1805
Table Op Msg_type Msg_text
1806
test.t1 check status OK
1808
CREATE temporary TABLE t1 (
1812
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1813
SELECT COUNT(*) FROM t1;
1816
CHECK TABLE t1 EXTENDED;
1817
Table Op Msg_type Msg_text
1818
test.t1 check status OK
1819
SELECT COUNT(*) FROM t1;
1822
CHECK TABLE t1 EXTENDED;
1591
1823
Table Op Msg_type Msg_text
1592
1824
test.t1 check status OK