summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_range.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/partition_range.test')
-rw-r--r--mysql-test/t/partition_range.test128
1 files changed, 63 insertions, 65 deletions
diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test
index 84f67febe8b..50d850913bc 100644
--- a/mysql-test/t/partition_range.test
+++ b/mysql-test/t/partition_range.test
@@ -12,45 +12,45 @@ drop table if exists t1;
#
# BUG 18198: Various tests for partition functions
#
-create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)
-partition by range (length(a) * b)
-(partition p0 values less than (2), partition p1 values less than (400));
-insert into t1 values ('a ', 2),('a',3);
-drop table t1;
-
-create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)
-partition by range (b* length(a) * b)
-(partition p0 values less than (2), partition p1 values less than (400));
-insert into t1 values ('a ', 2),('a',3);
-drop table t1;
-
-create table t1 (a varchar(10) charset latin1 collate latin1_bin,
- b varchar(10) charset latin1 collate latin1_bin)
-partition by range (length(b) * length(a))
-(partition p0 values less than (2), partition p1 values less than (400));
-insert into t1 values ('a ', 'b '),('a','b');
-drop table t1;
-
-create table t1 (a varchar(10) charset latin1 collate latin1_bin,
- b varchar(10) charset latin1 collate latin1_bin)
-partition by range (length(a) * length(b))
-(partition p0 values less than (2), partition p1 values less than (400));
-insert into t1 values ('a ', 'b '),('a','b');
-drop table t1;
-
-create table t1 (a varchar(10) charset latin1 collate latin1_bin,
- b varchar(10) charset latin1 collate latin1_bin, c int)
-partition by range (length(a) * c)
-(partition p0 values less than (2), partition p1 values less than (400));
-insert into t1 values ('a ', 'b ', 2),('a','b', 3);
-drop table t1;
-
-create table t1 (a varchar(10) charset latin1 collate latin1_bin,
- b varchar(10) charset latin1 collate latin1_bin, c int)
-partition by range (c * length(a))
-(partition p0 values less than (2), partition p1 values less than (400));
-insert into t1 values ('a ', 'b ', 2),('a','b', 3);
-drop table t1;
+#create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)
+#partition by range (ascii(a) * b)
+#(partition p0 values less than (2), partition p1 values less than (4000));
+#insert into t1 values ('a ', 2),('a',3);
+#drop table t1;
+
+#create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)
+#partition by range (b* ascii(a) * b)
+#(partition p0 values less than (2), partition p1 values less than (4000));
+#insert into t1 values ('a ', 2),('a',3);
+#drop table t1;
+
+#create table t1 (a varchar(10) charset latin1 collate latin1_bin,
+# b varchar(10) charset latin1 collate latin1_bin)
+#partition by range (ascii(b) * ascii(a))
+#(partition p0 values less than (2), partition p1 values less than (40000));
+#insert into t1 values ('a ', 'b '),('a','b');
+#drop table t1;
+
+#create table t1 (a varchar(10) charset latin1 collate latin1_bin,
+# b varchar(10) charset latin1 collate latin1_bin)
+#partition by range (ascii(a) * ascii(b))
+#(partition p0 values less than (2), partition p1 values less than (40000));
+#insert into t1 values ('a ', 'b '),('a','b');
+#drop table t1;
+
+#create table t1 (a varchar(10) charset latin1 collate latin1_bin,
+# b varchar(10) charset latin1 collate latin1_bin, c int)
+#partition by range (ascii(a) * c)
+#(partition p0 values less than (2), partition p1 values less than (4000));
+#insert into t1 values ('a ', 'b ', 2),('a','b', 3);
+#drop table t1;
+
+#create table t1 (a varchar(10) charset latin1 collate latin1_bin,
+# b varchar(10) charset latin1 collate latin1_bin, c int)
+#partition by range (c * ascii(a))
+#(partition p0 values less than (2), partition p1 values less than (4000));
+#insert into t1 values ('a ', 'b ', 2),('a','b', 3);
+#drop table t1;
#
# More checks for partition pruning
@@ -733,29 +733,27 @@ DROP TABLE t1;
#
# Bug 18198: Try with a couple of cases using VARCHAR fields in
# partition function.
-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;
-explain partitions select * from t1 where a = "12345678901234567890";
-explain partitions select * from t1 where a = "12345678901234567890" OR
- a = "A2345678901234567890" OR
- a = "B2345678901234567890" OR
- a = "C2345678901234567890";
-explain partitions select * from t1 where a = "01234567890123456";
-select * from t1 where a = "01234567890123456";
-select * from t1 where a = "12345678901234567890" OR
- a = "A2345678901234567890" OR
- a = "B2345678901234567890" OR
- a = "C2345678901234567890";
-select * from t1 where a = "12345678901234567890";
-
-
-drop table t1;
+#create table t1 (a varchar(20))
+#partition by range (ascii(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;
+#explain partitions select * from t1 where a = "12345678901234567890";
+#explain partitions select * from t1 where a = "12345678901234567890" OR
+# a = "A2345678901234567890" OR
+# a = "B2345678901234567890" OR
+# a = "C2345678901234567890";
+#explain partitions select * from t1 where a = "01234567890123456";
+#select * from t1 where a = "01234567890123456";
+#select * from t1 where a = "12345678901234567890" OR
+# a = "A2345678901234567890" OR
+# a = "B2345678901234567890" OR
+# a = "C2345678901234567890";
+#select * from t1 where a = "12345678901234567890";
+#drop table t1;