~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/myisam.test

  • Committer: devananda
  • Date: 2009-06-30 14:27:54 UTC
  • mfrom: (1030.2.4 trunk)
  • mto: (1093.1.7 captain)
  • mto: This revision was merged to the branch mainline in revision 1095.
  • Revision ID: devananda.vdv@gmail.com-20090630142754-vm9w374yxkf1pikc
mergeĀ fromĀ lp

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
--enable_warnings
46
46
enable_query_log;
47
47
check table t1;
48
 
repair table t1;
49
48
 
50
49
# @TODO Because there are no notes on what the heck this
51
50
# is actually testing (which bug?), it's difficult to tell
55
54
#delete from t1 where (a & 1);
56
55
delete from t1 where (a mod 2) = 1;
57
56
check table t1;
58
 
repair table t1;
59
 
check table t1;
60
57
drop table t1;
61
58
 
62
59
#
325
322
 
326
323
INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test');
327
324
 
328
 
# @TODO The REPAIR TABLE statement crashes server.
329
 
# Bug#309802: https://bugs.launchpad.net/drizzle/+bug/309802
330
 
# Commenting it out for now to proceed in testing. - JRP
331
 
# REPAIR TABLE t1;
332
325
CHECK TABLE t1;
333
326
drop table t1;
334
327
 
416
409
create table t1 ( a text not null, key a (a(20)));
417
410
insert into t1 values ('aaa   '),('aaa'),('aa');
418
411
check table t1;
419
 
repair table t1;
420
412
select concat(a,'.') from t1 where a='aaa';
421
413
select concat(a,'.') from t1 where binary a='aaa';
422
414
update t1 set a='bbb' where a='aaa';
748
740
SELECT _id FROM t1;
749
741
DROP TABLE t1;
750
742
#
751
 
# Test REPAIR QUICK. This retains the old data file.
752
 
CREATE TABLE t1 (
753
 
  `_id` int NOT NULL default '0',
754
 
  `url` text,
755
 
  `email` text,
756
 
  `description` text,
757
 
  `loverlap` int default NULL,
758
 
  `roverlap` int default NULL,
759
 
  `lneighbor_id` int default NULL,
760
 
  `rneighbor_id` int default NULL,
761
 
  `length_` int default NULL,
762
 
  `sequence` text,
763
 
  `name` text,
764
 
  `_obj_class` text NOT NULL,
765
 
  PRIMARY KEY  (`_id`),
766
 
  UNIQUE KEY `sequence_name_index` (`name`(50)),
767
 
  KEY (`length_`)
768
 
) ENGINE=MyISAM;
769
 
 
770
 
INSERT INTO t1 VALUES
771
 
  (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''),
772
 
  (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''),
773
 
  (3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample3',''),
774
 
  (4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample4',''),
775
 
  (5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample5',''),
776
 
  (6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample6',''),
777
 
  (7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample7',''),
778
 
  (8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample8',''),
779
 
  (9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample9','');
780
 
#
781
 
SELECT _id FROM t1;
782
 
DELETE FROM t1 WHERE _id < 8;
783
 
--replace_column 6 # 7 # 8 # 9 # 11 # 12 # 13 # 14 # 15 # 16 #
784
 
SHOW TABLE STATUS LIKE 't1';
785
 
CHECK TABLE t1 EXTENDED;
786
 
REPAIR TABLE t1 QUICK;
787
 
CHECK TABLE t1 EXTENDED;
788
 
--replace_column 6 # 7 # 8 # 9 # 11 # 12 # 13 # 14 # 15 # 16 #
789
 
SHOW TABLE STATUS LIKE 't1';
790
 
SELECT _id FROM t1;
791
 
DROP TABLE t1;
792
 
#
793
743
SET GLOBAL myisam_repair_threads=1;
794
744
SHOW VARIABLES LIKE 'myisam_repair%';
795
745
 
1187
1137
INSERT INTO t1 SELECT * FROM t1;
1188
1138
INSERT INTO t1 SELECT * FROM t1;
1189
1139
CHECK TABLE t1;
1190
 
REPAIR TABLE t1;
1191
1140
DELETE FROM t1 WHERE c1 >= 10;
1192
1141
CHECK TABLE t1;
1193
1142
DROP TABLE t1;
1206
1155
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
1207
1156
SELECT COUNT(*) FROM t1;
1208
1157
CHECK TABLE t1;
1209
 
REPAIR TABLE t1;
1210
1158
SELECT COUNT(*) FROM t1;
1211
1159
CHECK TABLE t1;
1212
1160
DROP TABLE t1;
1221
1169
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
1222
1170
SELECT COUNT(*) FROM t1;
1223
1171
CHECK TABLE t1 EXTENDED;
1224
 
REPAIR TABLE t1 EXTENDED;
1225
1172
SELECT COUNT(*) FROM t1;
1226
1173
CHECK TABLE t1 EXTENDED;
1227
1174
DROP TABLE t1;
1288
1235
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1289
1236
SELECT COUNT(*) FROM t1;
1290
1237
CHECK TABLE t1;
1291
 
REPAIR TABLE t1;
1292
1238
SELECT COUNT(*) FROM t1;
1293
1239
CHECK TABLE t1;
1294
1240
DROP TABLE t1;
1304
1250
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1305
1251
SELECT COUNT(*) FROM t1;
1306
1252
CHECK TABLE t1 EXTENDED;
1307
 
REPAIR TABLE t1 EXTENDED;
1308
1253
SELECT COUNT(*) FROM t1;
1309
1254
CHECK TABLE t1 EXTENDED;
1310
1255
DROP TABLE t1;