~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/range.test

  • Committer: Stewart Smith
  • Date: 2009-06-16 06:55:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1094.
  • Revision ID: stewart@flamingspork.com-20090616065511-ps3ewfxj7918lwy3
rollback.test for MyISAM temp only.
- rename to myisam_rollback to reflect what it's testing
- just use create temporary table

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                      (3,1999,35,0,'1999-07-12');
63
63
select YEAR,ISSUE from t1 where PAPER_ID=3 and (YEAR>1999 or (YEAR=1999 and ISSUE>28))  order by YEAR,ISSUE;
64
64
check table t1;
 
65
repair table t1;
65
66
drop table t1;
66
67
 
67
68
CREATE TABLE t1 (
379
380
 
380
381
analyze table t1,t2;
381
382
 
382
 
--replace_column 3 # 8 # 9 #
 
383
--replace_column 9 #
383
384
explain select * from t1, t2  where t1.uid=t2.uid AND t1.uid > 0;
384
 
--replace_column 3 # 8 # 9 #
 
385
--replace_column 9 #
385
386
explain select * from t1, t2  where t1.uid=t2.uid AND t2.uid > 0;
386
 
--replace_column 3 # 8 # 9 #
 
387
--replace_column 9 #
387
388
explain select * from t1, t2  where t1.uid=t2.uid AND t1.uid != 0;
388
 
--replace_column 3 # 8 # 9 #
 
389
--replace_column 9 #
389
390
explain select * from t1, t2  where t1.uid=t2.uid AND t2.uid != 0;
390
391
 
391
392
select * from t1, t2  where t1.uid=t2.uid AND t1.uid > 0;
555
556
('d8c4177d24ccef970.14957924','d8c4177d09f8b11f5.52725521',10,11,
556
557
 'd8c4177d09f8b11f5.52725521');
557
558
 
558
 
--replace_column 3 # 8 # 9 #
559
 
--sorted_result
 
559
--replace_column 9 #
560
560
EXPLAIN
561
561
SELECT s.oxid FROM t1 v, t1 s 
562
562
  WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
793
793
create table t2 (a varchar(10), filler char(200), key(a));
794
794
insert into t2 select * from t1;
795
795
 
796
 
--replace_column 3 # 8 # 9 #
 
796
--replace_column 9 #
797
797
explain select * from t1 where a between 'a' and 'a '; 
798
 
--replace_column 3 # 8 # 9 #
 
798
--replace_column 9 #
799
799
explain select * from t1 where a = 'a' or a='a ';
800
800
 
801
 
--replace_column 3 # 8 # 9 #
 
801
--replace_column 9 #
802
802
explain select * from t2 where a between 'a' and 'a '; 
803
 
--replace_column 3 # 8 # 9 #
 
803
--replace_column 9 #
804
804
explain select * from t2 where a = 'a' or a='a ';
805
805
 
806
806
update t1 set a='b' where a<>'a';
807
 
--replace_column 3 # 4 # 5 # 6 # 7 # 8 # 9 #
 
807
--replace_column 9 #
808
808
explain select * from t1 where a not between 'b' and 'b'; 
809
809
select a, hex(filler) from t1 where a not between 'b' and 'b'; 
810
810
 
856
856
('A1','2005-12-12 08:00:00',3000),
857
857
('A2','2005-12-01 08:00:00',1000);
858
858
 
859
 
--replace_column 3 # 8 # 9 #
 
859
--replace_column 9 #
860
860
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 23:59:59';
861
861
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 23:59:59';
862
862
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
982
982
create temporary table t2e like t2;
983
983
alter table t2e engine=myisam;
984
984
insert into t2e select * from t2;
985
 
analyze table t2e;
986
985
explain select * from t2e where a=1000 and b<11;
987
986
 
988
987
drop table t1, t2;