summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/inc/partition_float.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/parts/inc/partition_float.inc')
-rw-r--r--mysql-test/suite/parts/inc/partition_float.inc34
1 files changed, 16 insertions, 18 deletions
diff --git a/mysql-test/suite/parts/inc/partition_float.inc b/mysql-test/suite/parts/inc/partition_float.inc
index 25c59a10153..34f14137d4d 100644
--- a/mysql-test/suite/parts/inc/partition_float.inc
+++ b/mysql-test/suite/parts/inc/partition_float.inc
@@ -1,21 +1,9 @@
---disable_query_log
-# DATA DIRECTORY
-eval SET @data_dir = 'DATA DIRECTORY =
-''/tmp''';
-let $data_directory = `select @data_dir`;
-
-#INDEX DIRECTORY
-eval SET @indx_dir = 'INDEX DIRECTORY =
-''/tmp''';
-let $index_directory = `select @indx_dir`;
---enable_query_log
-
eval create table t1 (a float not null, primary key(a)) engine=$engine
partition by key (a) (
-partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
-partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
-partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
-partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
+partition pa1 max_rows=20 min_rows=2,
+partition pa2 max_rows=30 min_rows=3,
+partition pa3 max_rows=30 min_rows=4,
+partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1;
@@ -51,8 +39,15 @@ dec $count;
select count(*) from t2;
drop table t2;
+# Bug 30577: FLOOR() and CEILING() not usable as partition functions
+# Partition functions are required to return INT_RESULT; FLOOR() and
+# CEILING() do not, unless they have an INT argument. Disable this
+# portion of the test until bug 30577 is fixed.
+
+--disable_parsing
+
eval create table t3 (a float not null, primary key(a)) engine=$engine
-partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
+partition by range (floor(a)) subpartition by key (a) subpartitions 3 (
partition pa1 values less than (3),
partition pa3 values less than (6),
partition pa10 values less than (10)
@@ -72,7 +67,7 @@ select * from t3;
drop table t3;
eval create table t4 (a float not null, primary key(a)) engine=$engine
-partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
+partition by list (floor(a)) subpartition by key (a) subpartitions 3 (
partition pa1 values in (1,2,3),
partition pa3 values in (4,5,6),
partition pa10 values in (7,8,9,10)
@@ -90,3 +85,6 @@ dec $count;
select count(*) from t4;
select * from t4;
drop table t4;
+
+# Disabled due to Bug 30577
+--enable_parsing