~vkolesnikov/pbxt/pbxt-preload-test-bug

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/t/partition_pruning.test

  • Committer: paul-mccullagh
  • Date: 2008-03-10 11:36:34 UTC
  • Revision ID: paul-mccullagh-417ebf175a9c8ee6e5b3777d9e2398e1fb197391
Implemented full durability

Show diffs side-by-side

added added

removed removed

Lines of Context:
538
538
drop table t1;
539
539
 
540
540
#  part2: bug in pruning code
541
 
create table t1 (a char(10) binary)
542
 
partition by list(length(a))
543
 
 (partition p1 values in (1),
544
 
  partition p2 values in (2),
545
 
  partition p3 values in (3),
546
 
  partition p4 values in (4),
547
 
  partition p5 values in (5)
548
 
);
549
 
insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee');
550
 
select * from t1 where a>='a' and a <= 'dddd';
551
 
explain partitions select * from t1 where a>='a' and a <= 'dddd';
552
 
drop table t1;
 
541
#create table t1 (a char(10) binary)
 
542
#partition by list(ascii(a))
 
543
# (partition p1 values in (ascii('a')),
 
544
#  partition p2 values in (ascii('b')),
 
545
#  partition p3 values in (ascii('c')),
 
546
#  partition p4 values in (ascii('d')),
 
547
#  partition p5 values in (ascii('e')));
 
548
#insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee');
 
549
#select * from t1 where a>='a' and a <= 'dddd';
 
550
#explain partitions select * from t1 where a>='a' and a <= 'dddd';
 
551
#drop table t1;
553
552
 
554
553
# BUG#18659: Assertion failure when subpartitioning is used and partition is
555
554
# "IS NULL"
692
691
explain partitions select * from t1 where a = 18446744073709551613;
693
692
explain partitions select * from t1 where a = 18446744073709551614;
694
693
drop table t1;
695
 
 
696
 
create table t1 (a int) 
697
 
  partition by range((a & 0xFF) << 56) (
698
 
  partition p0 values less than (0x40 << 56),
699
 
  partition p1 values less than (0x80 << 56),
700
 
  partition p2 values less than (0xFF << 56)
701
 
);
702
 
 
703
 
insert into t1 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE); 
 
694
#
 
695
# Test all variants of usage for interval_via_mapping
 
696
# and interval_via_walking
 
697
#
 
698
# t1 will use interval_via_mapping since it uses a
 
699
# monotonic function, whereas t2 will use
 
700
# interval_via_walking since the intervals are short
 
701
# and the function isn't monotonic (it is, but it isn't
 
702
# discovered in this version).
 
703
#
 
704
  create table t1 (a int)
 
705
  partition by range(a) (
 
706
  partition p0 values less than (64),
 
707
  partition p1 values less than (128),
 
708
  partition p2 values less than (255)
 
709
);
 
710
 
 
711
create table t2 (a int)
 
712
  partition by range(a+0) (
 
713
  partition p0 values less than (64),
 
714
  partition p1 values less than (128),
 
715
  partition p2 values less than (255)
 
716
);
 
717
  
 
718
insert into t1 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE);
 
719
insert into t2 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE);
704
720
explain partitions select * from t1 where a=0;
 
721
explain partitions select * from t2 where a=0;
705
722
explain partitions select * from t1 where a=0xFE;
706
 
explain partitions select * from t1 where a>0xFE and a<= 0xFF;
 
723
explain partitions select * from t2 where a=0xFE;
 
724
explain partitions select * from t1 where a > 0xFE AND a <= 0xFF;
 
725
explain partitions select * from t2 where a > 0xFE AND a <= 0xFF;
 
726
explain partitions select * from t1 where a >= 0xFE AND a <= 0xFF;
 
727
explain partitions select * from t2 where a >= 0xFE AND a <= 0xFF;
 
728
explain partitions select * from t1 where a < 64 AND a >= 63;
 
729
explain partitions select * from t2 where a < 64 AND a >= 63;
 
730
explain partitions select * from t1 where a <= 64 AND a >= 63;
 
731
explain partitions select * from t2 where a <= 64 AND a >= 63;
707
732
drop table t1;
708
 
 
 
733
drop table t2;
 
734
  
709
735
create table t1(a bigint unsigned not null) partition by range(a+0) (
710
736
  partition p1 values less than (10),
711
737
  partition p2 values less than (20),