summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <mikael@dator6.(none)>2007-06-13 17:28:59 +0200
committerunknown <mikael@dator6.(none)>2007-06-13 17:28:59 +0200
commitff3f8990e74e8133fb68bea7b85a60b055c9feb9 (patch)
tree042f563a659cfeeaffb727a1021e7e4b47147a1f
parented3ff663f3dc4aa87e24c60a35ffe7e9f77ac119 (diff)
downloadmariadb-git-ff3f8990e74e8133fb68bea7b85a60b055c9feb9.tar.gz
Disabled ascii-function
mysql-test/r/partition_bug18198.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_charset.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_error.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_pruning.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_range.result: Disabled a lot of test cases using ascii-function mysql-test/t/partition_bug18198.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_charset.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_error.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_pruning.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_range.test: Disabled a lot of test cases using ascii-function
-rw-r--r--mysql-test/r/partition_bug18198.result30
-rw-r--r--mysql-test/r/partition_charset.result4
-rw-r--r--mysql-test/r/partition_error.result2
-rw-r--r--mysql-test/r/partition_pruning.result18
-rw-r--r--mysql-test/r/partition_range.result76
-rw-r--r--mysql-test/t/partition_bug18198.test33
-rw-r--r--mysql-test/t/partition_charset.test7
-rw-r--r--mysql-test/t/partition_error.test3
-rw-r--r--mysql-test/t/partition_pruning.test22
-rw-r--r--mysql-test/t/partition_range.test128
-rw-r--r--sql/item_func.h1
11 files changed, 82 insertions, 242 deletions
diff --git a/mysql-test/r/partition_bug18198.result b/mysql-test/r/partition_bug18198.result
index 2071545dbca..18d7d904bb0 100644
--- a/mysql-test/r/partition_bug18198.result
+++ b/mysql-test/r/partition_bug18198.result
@@ -1,38 +1,8 @@
drop table if exists t1;
-create table t1 (a char(5) character set koi8r)
-partition by list (ascii(a) mod 3)
-subpartition by hash(ascii(a))
-subpartitions 3
-(partition p1 values in (1),
-partition p2 values in (2),
-partition p0 values in (0));
-insert into t1 values ('a');
-explain partitions select * from t1 where a = 'a';
-id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2_p2sp2 system NULL NULL NULL NULL 1
-select * from t1 where a = 'a';
-a
-a
-drop table t1;
-create table t1 (a char(5) character set cp1251)
-partition by list (ascii(a)) (partition pn values in (null));
-drop table t1;
create table t1 (col1 datetime)
partition by range(datediff(col1,col1))
(partition p0 values less than (10), partition p1 values less than (30));
drop table t1;
-create table t1 (a char(5) character set big5)
-partition by list (ascii(a)) (partition pn values in (null));
-ERROR HY000: This partition function is not allowed
-create table t1 (a char(1))
-partition by list(ascii(a))
-(partition p1 values in (ascii('i')));
-drop table t1;
-create table t1 (s1 char(5) character set latin5)
-partition by list (ascii(s1))
-(partition p1 values in (1));
-set names utf8;
-drop table t1;
create table t1 (col1 int)
partition by range(greatest(col1,10))
(partition p0 values less than (2), partition p1 values less than (6));
diff --git a/mysql-test/r/partition_charset.result b/mysql-test/r/partition_charset.result
index bb6cb5e3bef..f8f75e8bee7 100644
--- a/mysql-test/r/partition_charset.result
+++ b/mysql-test/r/partition_charset.result
@@ -19,6 +19,4 @@ drop table t1;
create table t1 (a varchar(1), primary key (a))
partition by list (ascii(a))
(partition p1 values in (65));
-insert into t1 values ('A');
-replace into t1 values ('A');
-drop table t1;
+ERROR HY000: This partition function is not allowed
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index 41829216178..7952c8df609 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -600,7 +600,7 @@ ERROR HY000: Partition constant is out of partition function domain
create table t1 (v varchar(12))
partition by range (ascii(v))
(partition p0 values less than (10));
-drop table t1;
+ERROR HY000: This partition function is not allowed
create table t1 (a int)
partition by hash (rand(a));
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index 80a24bc7065..9595676016c 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -676,24 +676,6 @@ f_int1 f_int2
8 8
9 9
drop table t1;
-create table t1 (a char(10) binary)
-partition by list(ascii(a))
-(partition p1 values in (ascii('a')),
-partition p2 values in (ascii('b')),
-partition p3 values in (ascii('c')),
-partition p4 values in (ascii('d')),
-partition p5 values in (ascii('e')));
-insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee');
-select * from t1 where a>='a' and a <= 'dddd';
-a
-a
-bb
-ccc
-dddd
-explain partitions select * from t1 where a>='a' and a <= 'dddd';
-id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1,p2,p3,p4,p5 ALL NULL NULL NULL NULL 5 Using where
-drop table t1;
create table t1 (f_int1 integer) partition by list(abs(mod(f_int1,2)))
subpartition by hash(f_int1) subpartitions 2
(
diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result
index e9ebd5ba2cf..a61006e87a4 100644
--- a/mysql-test/r/partition_range.result
+++ b/mysql-test/r/partition_range.result
@@ -1,38 +1,4 @@
drop table if exists 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;
create table t1 (a int unsigned)
partition by range (a)
(partition pnull values less than (0),
@@ -743,45 +709,3 @@ 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 (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;
-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 p0 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 p0 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 p0 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;
diff --git a/mysql-test/t/partition_bug18198.test b/mysql-test/t/partition_bug18198.test
index caf9bd560c0..7f071c6ec9e 100644
--- a/mysql-test/t/partition_bug18198.test
+++ b/mysql-test/t/partition_bug18198.test
@@ -3,45 +3,12 @@
drop table if exists t1;
--enable_warnings
-create table t1 (a char(5) character set koi8r)
-partition by list (ascii(a) mod 3)
-subpartition by hash(ascii(a))
-subpartitions 3
-(partition p1 values in (1),
- partition p2 values in (2),
- partition p0 values in (0));
-insert into t1 values ('a');
-explain partitions select * from t1 where a = 'a';
-select * from t1 where a = 'a';
-drop table t1;
-
-create table t1 (a char(5) character set cp1251)
-partition by list (ascii(a)) (partition pn values in (null));
-drop table t1;
-
create table t1 (col1 datetime)
partition by range(datediff(col1,col1))
(partition p0 values less than (10), partition p1 values less than (30));
drop table t1;
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
-create table t1 (a char(5) character set big5)
-partition by list (ascii(a)) (partition pn values in (null));
-
-create table t1 (a char(1))
-partition by list(ascii(a))
-(partition p1 values in (ascii('i')));
-#insert into t1 values ('i');
-drop table t1;
-
-create table t1 (s1 char(5) character set latin5)
-partition by list (ascii(s1))
-(partition p1 values in (1));
-set names utf8;
-#insert into tn values ('żż');
-drop table t1;
-
--- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (col1 int)
partition by range(greatest(col1,10))
(partition p0 values less than (2), partition p1 values less than (6));
diff --git a/mysql-test/t/partition_charset.test b/mysql-test/t/partition_charset.test
index 5e8f128e87a..6842e5268fa 100644
--- a/mysql-test/t/partition_charset.test
+++ b/mysql-test/t/partition_charset.test
@@ -20,9 +20,10 @@ set names latin1;
select * from t1;
drop table t1;
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (a varchar(1), primary key (a))
partition by list (ascii(a))
(partition p1 values in (65));
-insert into t1 values ('A');
-replace into t1 values ('A');
-drop table t1;
+#insert into t1 values ('A');
+#replace into t1 values ('A');
+#drop table t1;
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index fa5055b2981..5fc2097cc52 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -769,10 +769,11 @@ partition by range (a)
#
# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
#
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (v varchar(12))
partition by range (ascii(v))
(partition p0 values less than (10));
-drop table t1;
+#drop table t1;
-- error 1064
create table t1 (a int)
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index cef57bd9356..12951c9232a 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -538,17 +538,17 @@ select * from t1 where f_int1 between 5 and 15 order by f_int1;
drop table t1;
# part2: bug in pruning code
-create table t1 (a char(10) binary)
-partition by list(ascii(a))
- (partition p1 values in (ascii('a')),
- partition p2 values in (ascii('b')),
- partition p3 values in (ascii('c')),
- partition p4 values in (ascii('d')),
- partition p5 values in (ascii('e')));
-insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee');
-select * from t1 where a>='a' and a <= 'dddd';
-explain partitions select * from t1 where a>='a' and a <= 'dddd';
-drop table t1;
+#create table t1 (a char(10) binary)
+#partition by list(ascii(a))
+# (partition p1 values in (ascii('a')),
+# partition p2 values in (ascii('b')),
+# partition p3 values in (ascii('c')),
+# partition p4 values in (ascii('d')),
+# partition p5 values in (ascii('e')));
+#insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee');
+#select * from t1 where a>='a' and a <= 'dddd';
+#explain partitions select * from t1 where a>='a' and a <= 'dddd';
+#drop table t1;
# BUG#18659: Assertion failure when subpartitioning is used and partition is
# "IS NULL"
diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test
index 219637d6f81..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 (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;
+#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 (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;
+#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;
diff --git a/sql/item_func.h b/sql/item_func.h
index 8b4b66c1410..568effb2f63 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -832,7 +832,6 @@ public:
longlong val_int();
const char *func_name() const { return "ascii"; }
void fix_length_and_dec() { max_length=3; }
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
};
class Item_func_ord :public Item_int_func