summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition.result
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2010-08-30 17:33:55 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2010-08-30 17:33:55 +0200
commit86327002fe29e70f0e29d97e0cf0b1e14806c2f8 (patch)
tree95c1677d57c85cadeb341aee06221cfbe98753ec /mysql-test/r/partition.result
parent1ed02deea0986ee2aefd7b8bc61390f3675c2e94 (diff)
downloadmariadb-git-86327002fe29e70f0e29d97e0cf0b1e14806c2f8.tar.gz
Bug#50036: Inconsistent errors when using TIMESTAMP columns/expressions
It was hard to understand what the error really meant. The error checking in partitioning is done in several different parts during the execution of a query which can make it hard to return useful errors. Added a new error for bad VALUES part in the per PARTITION clause. Using the more verbose error that a column is not allowed in the partitioning function instead of just that the function is not allowed. mysql-test/r/partition.result: changed error to be more specific mysql-test/r/partition_error.result: updated result mysql-test/std_data/parts/t1TIMESTAMP.frm: .frm file of CREATE TABLE t1 (a TIMESTAMP) PARTITION BY HASH(TO_DAYS(a)); mysql-test/t/partition.test: changed error to be more specific mysql-test/t/partition_error.test: Added test (also for verifying behaviour of previously created tables which is no longer allowed). Updated expected errors in other places sql/partition_info.cc: Added function report_part_expr_error to be able to return a more specific error. Renamed fix_func_partition to fix_partition_values since the function really fixes/checks the VALUES clause. sql/partition_info.h: removed part_result_type, since it was unused. renamed fix_funk_partition->fix_partition_values added report_part_expr_error sql/share/errmsg-utf8.txt: Added a more specific error. sql/sql_partition.cc: made use of report_part_expr_error to get a more specific error. sql/sql_yacc.yy: Changed error message to be more specific. And return an other error code.
Diffstat (limited to 'mysql-test/r/partition.result')
-rw-r--r--mysql-test/r/partition.result4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 55366bd2e07..693c338fc76 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -520,12 +520,12 @@ create table t1 (a bigint)
partition by range (a)
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
partition p1 values less than (10));
-ERROR HY000: VALUES value must be of same type as partition function
+ERROR HY000: VALUES value for partition 'p0' must have type INT
create table t1 (a bigint)
partition by list (a)
(partition p0 values in (0xFFFFFFFFFFFFFFFF),
partition p1 values in (10));
-ERROR HY000: VALUES value must be of same type as partition function
+ERROR HY000: VALUES value for partition 'p0' must have type INT
create table t1 (a bigint unsigned)
partition by range (a)
(partition p0 values less than (100),