~snowstalker/drizzle/startup-errors

« back to all changes in this revision

Viewing changes to tests/t/myisam.test

  • Committer: Brian Aker
  • Date: 2009-11-26 18:48:20 UTC
  • mfrom: (1226.1.3 push)
  • Revision ID: brian@gaz-20091126184820-hltr0upee0ahopsj
Bundle Brian + Monty  (been through staging, just collecting it as want
overall patch as seen by staging).

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
# Test bug: Two optimize in a row reset index cardinality
61
61
#
62
62
 
63
 
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
 
63
create TEMPORARY table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)) ENGINE=MYISAM;
64
64
insert into t1 (b) values (1),(2),(2),(2),(2);
65
 
optimize table t1;
 
65
alter table t1 engine=MYISAM;
66
66
show index from t1;
67
 
optimize table t1;
 
67
alter table t1 engine=MyISAM;
68
68
show index from t1;
69
69
drop table t1;
70
70
 
89
89
# in ha_myisam::repair, and index size is changed (decreased).
90
90
#
91
91
 
92
 
create table t1 ( t1 char(255), key(t1(250)));
 
92
create temporary table t1 ( t1 char(255), key(t1(250))) ENGINE=MYISAM;
93
93
insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169');
94
94
insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203');
95
95
insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767');
119
119
insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'),
120
120
('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'),
121
121
('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47');
122
 
optimize table t1;
 
122
alter table t1 ENGINE=myisam;
123
123
check table t1;
124
124
drop table t1;
125
125
 
344
344
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
345
345
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
346
346
INSERT into t2 values (1,1,1), (2,2,2);
347
 
optimize table t1;
 
347
alter table t1 ENGINE=MYISAM;
348
348
show index from t1;
349
349
explain select * from t1,t2 where t1.a=t2.a;
350
350
explain select * from t1,t2 force index(a) where t1.a=t2.a;
652
652
--replace_column 6 # 7 # 8 # 9 # 11 # 12 # 13 # 14 # 15 # 16 #
653
653
SHOW TABLE STATUS LIKE 't1';
654
654
CHECK TABLE t1;
655
 
OPTIMIZE TABLE t1;
 
655
ALTER TABLE t1 ENGINE=MYISAM;
656
656
CHECK TABLE t1;
657
657
--replace_column 6 # 7 # 8 # 9 # 11 # 12 # 13 # 14 # 15 # 16 #
658
658
SHOW TABLE STATUS LIKE 't1';
1078
1078
INSERT INTO t1 VALUES('c', 'b');
1079
1079
DELETE FROM t1 WHERE c1='b';
1080
1080
SELECT COUNT(*) FROM t1;
1081
 
OPTIMIZE TABLE t1;
 
1081
ALTER TABLE t1 ENGINE=MyISAM;
1082
1082
SELECT COUNT(*) FROM t1;
1083
1083
DROP TABLE t1;
1084
1084
#
1160
1160
INSERT INTO t1 VALUES('c', 'b');
1161
1161
DELETE FROM t1 WHERE c1='b';
1162
1162
SELECT COUNT(*) FROM t1;
1163
 
OPTIMIZE TABLE t1;
 
1163
ALTER TABLE t1 ENGINE=MyISAM;
1164
1164
SELECT COUNT(*) FROM t1;
1165
1165
DROP TABLE t1;
1166
1166
#