1DROP TABLE IF EXISTS t1,t2,t3; 2CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE, 3c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY); 4INSERT INTO t1 VALUES 5(-3.31168791059336e-06,-3.19054655887874e-06,-1.06528081684847e-05,-1.227278240089e-06,-1.66718069164799e-06,-2.59038972510885e-06,-2.83145227805303e-06,-4.09678491270648e-07,-2.22610091291797e-06,6), 6(0.0030743000272545,2.53222044316438e-05,2.78674650061845e-05,1.95914465544536e-05,1.7347572525984e-05,1.87513810069614e-05,1.69882826885005e-05,2.44449336987598e-05,1.89914629921774e-05,9), 7(2.85229319423495e-05,3.05970988282259e-05,3.77161100113133e-05,2.3055238978766e-05,2.08241267364615e-05,2.28009504270553e-05,2.12070165658947e-05,2.84350091565409e-05,2.3366822910704e-05,3), 8(0,0,0,0,0,0,0,0,0,12), 9(3.24544577570754e-05,3.44619021870993e-05,4.37561613201124e-05,2.57556808726748e-05,2.3195354640561e-05,2.58532400758869e-05,2.34934241667179e-05,3.1621640063232e-05,2.58229982746189e-05,19), 10(2.53222044316438e-05,0.00445071933455582,2.97447268116016e-05,2.12379514059868e-05,1.86777776502663e-05,2.0170058676712e-05,1.8946030385445e-05,2.66040037173511e-05,2.09161899668946e-05,20), 11(3.03462382611645e-05,3.26517930083994e-05,3.5242025468662e-05,2.53219745106391e-05,2.24384532945004e-05,2.4052346047657e-05,2.23865572957053e-05,3.1634313969082e-05,2.48285463481801e-05,21), 12(1.95914465544536e-05,2.12379514059868e-05,2.27808649037128e-05,0.000341724375366877,1.4512761275113e-05,1.56475828693953e-05,1.44372366441415e-05,2.07952121981765e-05,1.61488256935919e-05,28), 13(1.7347572525984e-05,1.86777776502663e-05,2.04116907052727e-05,1.4512761275113e-05,0.000432162526082388,1.38116514014465e-05,1.2712914948904e-05,1.82503165178506e-05,1.43043075345922e-05,30), 14(1.68339762136661e-05,1.77836497166611e-05,2.36328309295222e-05,1.30183423732016e-05,1.18674654241553e-05,1.32467273128652e-05,1.24581739117775e-05,1.55624190959406e-05,1.33010638508213e-05,31), 15(1.89643062824415e-05,2.06997140070717e-05,2.29045490159364e-05,1.57918175731019e-05,1.39864987449492e-05,1.50580274578455e-05,1.45908734129609e-05,1.95329296993327e-05,1.5814709481221e-05,32), 16(1.69882826885005e-05,1.8946030385445e-05,2.00820439721439e-05,1.44372366441415e-05,1.2712914948904e-05,1.35209686474184e-05,0.00261563314789896,1.78285095864627e-05,1.46699314500019e-05,34), 17(2.0278186540684e-05,2.18923409729654e-05,2.39981539939738e-05,1.71774589459438e-05,1.54654355357383e-05,1.62731485707636e-05,1.49253140625051e-05,2.18229800160297e-05,1.71923561673718e-05,35), 18(2.44449336987598e-05,2.66040037173511e-05,2.84860148925308e-05,2.07952121981765e-05,1.82503165178506e-05,1.97667730441441e-05,1.78285095864627e-05,0.00166478601822712,2.0299952103232e-05,36), 19(1.89914629921774e-05,2.09161899668946e-05,2.26026841007872e-05,1.61488256935919e-05,1.43043075345922e-05,1.52609063290127e-05,1.46699314500019e-05,2.0299952103232e-05,0.00306670170971682,39), 20(0,0,0,0,0,0,0,0,0,41), 21(0,0,0,0,0,0,0,0,0,17), 22(0,0,0,0,0,0,0,0,0,18), 23(2.51880677333017e-05,2.63051795435778e-05,2.79874748974906e-05,2.02888886670845e-05,1.8178636318197e-05,1.91308527003585e-05,1.83260023644133e-05,2.4422300558171e-05,1.96411467520551e-05,44), 24(2.22402118719591e-05,2.37546284320705e-05,2.58463051055541e-05,1.83391609130854e-05,1.6300720519646e-05,1.74559091886791e-05,1.63733785575587e-05,2.26616253279828e-05,1.79541237435621e-05,45), 25(3.01092775359837e-05,3.23865212934412e-05,4.09444584045994e-05,0,2.15470966302776e-05,2.39082636344032e-05,2.28296706429177e-05,2.9007671511595e-05,2.44201138973326e-05,46); 26FLUSH TABLES; 27CHECK TABLE t1 EXTENDED; 28Table Op Msg_type Msg_text 29test.t1 check status OK 30DROP TABLE t1; 31drop table if exists t1; 32create table t1(f1 int, f2 char(255)); 33insert into t1 values(1, 'foo'), (2, 'bar'); 34insert into t1 select * from t1; 35insert into t1 select * from t1; 36insert into t1 select * from t1; 37insert into t1 select * from t1; 38insert into t1 select * from t1; 39insert into t1 select * from t1; 40insert into t1 select * from t1; 41insert into t1 select * from t1; 42insert into t1 select * from t1; 43insert into t1 select * from t1; 44insert into t1 select * from t1; 45insert into t1 select * from t1; 46flush tables; 47optimize table t1; 48Table Op Msg_type Msg_text 49test.t1 optimize Error Table 't1' is read only 50test.t1 optimize status Operation failed 51repair table t1; 52Table Op Msg_type Msg_text 53test.t1 repair Error Table 't1' is read only 54test.t1 repair status Operation failed 55drop table t1; 56# 57# BUG#41541 - Valgrind warnings on packed MyISAM table 58# 59CREATE TABLE t1(f1 VARCHAR(200), f2 TEXT); 60INSERT INTO t1 VALUES ('foo', 'foo1'), ('bar', 'bar1'); 61FLUSH TABLE t1; 62# Compress the table using MYISAMPACK tool 63SELECT COUNT(*) FROM t1; 64COUNT(*) 651024 66DROP TABLE t1; 67# 68# Bug #43973 - backup_myisam.test fails on 6.0-bugteam 69# 70CREATE DATABASE mysql_db1; 71CREATE TABLE mysql_db1.t1 (c1 VARCHAR(5), c2 int); 72CREATE INDEX i1 ON mysql_db1.t1 (c1, c2); 73INSERT INTO mysql_db1.t1 VALUES ('A',1); 74INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 75INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 76INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 77INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 78INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 79INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 80INSERT INTO mysql_db1.t1 SELECT * FROM mysql_db1.t1; 81FLUSH TABLE mysql_db1.t1; 82# Compress the table using MYISAMPACK tool 83# Run MYISAMCHK tool on the compressed table 84SELECT COUNT(*) FROM mysql_db1.t1 WHERE c2 < 5; 85COUNT(*) 86128 87# ===== myisampack.1 ===== 88CREATE TABLE t1(a INT); 89INSERT INTO t1 VALUES(20); 90CREATE TABLE t2(a INT); 91INSERT INTO t2 VALUES(40); 92FLUSH TABLE t1,t2; 93#If the myisampack --join operation is successful, we have table t3(.frm) 94#so we should be able to query about the table from server. 95SELECT COUNT(a) FROM t3; 96COUNT(a) 971024 98# ===== myisampack.2 ===== 99FLUSH TABLE t3; 100#Tests the myisampack join operation with an existing destination .frm file, 101#the command should return correct exit status(0) and 102#we should be able to query the table. 103SELECT COUNT(a) FROM t3; 104COUNT(a) 1051024 106# ===== myisampack.3 ===== 107DROP TABLE t3; 108#Tests the myisampack join operation without frm file for the first and second table 109#No frm file is generated in this and we shouldn't be able to access the newly 110#created table 111SELECT COUNT(a) FROM t3; 112ERROR 42S02: Table 'test.t3' doesn't exist 113# ===== myisampack.4 ===== 114#Tests the myisampack join operation with an existing destination .frm,.MYI,.MDI 115#the command should fail with exit status 2 116myisampack: Can't create/write to file (Errcode: 17 - File exists) 117Aborted: file is not compressed 118DROP TABLE t1,t2,t3; 119DROP TABLE mysql_db1.t1; 120DROP DATABASE mysql_db1; 121# 122# BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES 123# 124CREATE TABLE t1(a CHAR(4), FULLTEXT(a)); 125INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc'); 126FLUSH TABLE t1; 127CHECK TABLE t1; 128Table Op Msg_type Msg_text 129test.t1 check status OK 130SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE); 131a 132aaaa 133SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa'); 134a 135aaaa 136DROP TABLE t1; 137# Test table with key_reflength > rec_reflength 138CREATE TABLE t1(a CHAR(30), FULLTEXT(a)); 139# Populating a table, so it's index file exceeds 65K 140# Populating a table, so index file has second level fulltext tree 141FLUSH TABLE t1; 142# Compressing table 143# Fixing index (repair by sort) 144CHECK TABLE t1; 145Table Op Msg_type Msg_text 146test.t1 check status OK 147FLUSH TABLE t1; 148# Fixing index (repair with keycache) 149CHECK TABLE t1; 150Table Op Msg_type Msg_text 151test.t1 check status OK 152DROP TABLE t1; 153# 154# BUG#11751736: DROP DATABASE STATEMENT SHOULD REMOVE .OLD SUFFIX FROM 155# DATABASE DIRECTORY 156# 157CREATE DATABASE db1; 158CREATE TABLE db1.t1(c1 INT) ENGINE=MyISAM; 159DROP DATABASE db1; 160