summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_range.result
diff options
context:
space:
mode:
authorunknown <mikael/pappa@dator5.(none)>2006-08-02 06:40:25 -0400
committerunknown <mikael/pappa@dator5.(none)>2006-08-02 06:40:25 -0400
commitbcd98d512db7957896e44059e1f291c04aca3550 (patch)
tree0e9eb8d073575cd3767c2f5f7451ad0d62bad9fa /mysql-test/r/partition_range.result
parent04a70beb674878d850571102706476c54a258fd5 (diff)
downloadmariadb-git-bcd98d512db7957896e44059e1f291c04aca3550.tar.gz
BUG#18198: Fixes to handle VARCHAR strings properly
New methods to handle VARCHAR strings and CHAR's which are not using a binary collation. Indentation fixes Now strings are run through strnxfrm before they are processed by the partition function We do not allow collations where strnxfrm expands the string since we want the resulting string to fit in the same value range as the original. mysql-test/r/partition_range.result: New test cases mysql-test/t/partition_range.test: New test cases sql/partition_info.h: New methods to handle VARCHAR strings and CHAR's which are not using a binary collation. sql/sql_partition.cc: New methods to handle VARCHAR strings and CHAR's which are not using a binary collation. Indentation fixes Now strings are run through strnxfrm before they are processed by the partition function We do not allow collations where strnxfrm expands the string since we want the resulting string to fit in the same value range as the original.
Diffstat (limited to 'mysql-test/r/partition_range.result')
-rw-r--r--mysql-test/r/partition_range.result42
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result
index 9812c80040b..2fa40b44815 100644
--- a/mysql-test/r/partition_range.result
+++ b/mysql-test/r/partition_range.result
@@ -709,3 +709,45 @@ WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where
DROP TABLE t1;
+create table t1 (a varchar(20))
+partition by range (crc32(md5(a)))
+(partition p0 values less than (100),
+partition p1 values less than maxvalue);
+insert into t1 values ("12345678901234567890");
+insert into t1 values ("A2345678901234567890");
+insert into t1 values ("B2345678901234567890");
+insert into t1 values ("1234567890123456789");
+insert into t1 values ("1234567890123456");
+select * from t1;
+a
+12345678901234567890
+A2345678901234567890
+B2345678901234567890
+1234567890123456789
+1234567890123456
+explain partitions select * from t1 where a = "12345678901234567890";
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where
+explain partitions select * from t1 where a = "12345678901234567890" OR
+a = "A2345678901234567890" OR
+a = "B2345678901234567890" OR
+a = "C2345678901234567890";
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where
+explain partitions select * from t1 where a = "01234567890123456";
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where
+select * from t1 where a = "01234567890123456";
+a
+select * from t1 where a = "12345678901234567890" OR
+a = "A2345678901234567890" OR
+a = "B2345678901234567890" OR
+a = "C2345678901234567890";
+a
+12345678901234567890
+A2345678901234567890
+B2345678901234567890
+select * from t1 where a = "12345678901234567890";
+a
+12345678901234567890
+drop table t1;