summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition.test
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/t/partition.test
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/t/partition.test')
-rw-r--r--mysql-test/t/partition.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 1224dee24ed..fe2ef8cea1f 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -430,12 +430,12 @@ drop table t1;
#
# BUG 16002: Handle unsigned integer functions properly
#
---error ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR
+--error ER_VALUES_IS_NOT_INT_TYPE_ERROR
create table t1 (a bigint)
partition by range (a)
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
partition p1 values less than (10));
---error ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR
+--error ER_VALUES_IS_NOT_INT_TYPE_ERROR
create table t1 (a bigint)
partition by list (a)
(partition p0 values in (0xFFFFFFFFFFFFFFFF),