summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2010-12-22 10:50:36 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2010-12-22 10:50:36 +0100
commit1615419d7265ccc76db6fbe667651f2dce345ca8 (patch)
treea5acc440e05f371151bbdafd9bb22854c105ff7d /sql/sql_partition.cc
parent1a3d5fbfc7aa45463354b57586e24a630727c73e (diff)
downloadmariadb-git-1615419d7265ccc76db6fbe667651f2dce345ca8.tar.gz
Bug#54483: valgrind errors when making warnings for multiline inserts into partition
Bug#57071: EXTRACT(WEEK from date_col) cannot be allowed as partitioning function There were functions allowed as partitioning functions that implicit allowed cast. That could result in unacceptable behaviour. Solution was to check that the arguments of date and time functions have allowed types (field and date/datetime/time depending on function). mysql-test/r/partition.result: Updated result mysql-test/r/partition_error.result: Updated result mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc: disabled test with not allowed arguments. mysql-test/suite/parts/r/part_supported_sql_func_innodb.result: Updated result mysql-test/suite/parts/r/part_supported_sql_func_myisam.result: Updated result mysql-test/t/partition.test: Fixed typo in bug number and removed non allowed function (bad argument) mysql-test/t/partition_error.test: Added tests to verify correct type of argument. sql/item.h: Renamed processor since it is no longer only for timezone sql/item_func.h: Added help functions for checking date/time/datetime arguments. sql/item_timefunc.h: Added processors for argument correctness sql/sql_partition.cc: renamed the processor for checking arguments.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 48d50c3a303..835ddcc4bc6 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -1019,7 +1019,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
opening existing tables for easier maintenance. This exception should be
deprecated at some point in future so that we always throw an error.
*/
- if (func_expr->walk(&Item::is_timezone_dependent_processor,
+ if (func_expr->walk(&Item::is_arguments_valid_processor,
0, NULL))
{
if (is_create_table_ind)