From: Mattias Jonsson Date: December 22 2010 2:45pm Subject: bzr commit into mysql-5.1-bugteam branch (mattias.jonsson:3531) Bug#54483 Bug#57071 List-Archive: http://lists.mysql.com/commits/127510 X-Bug: 54483,57071 Message-Id: <201012221446.oBMEKkL7030788@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6515725052589186360==" --===============6515725052589186360== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///Users/mattiasj/mysql-bzr/b54483-51-bt_2/ based on revid:mattias.jonsson@stripped 3531 Mattias Jonsson 2010-12-22 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 Renamed function according to reviewers comments. @ sql/item.h better name of processor function @ sql/item_func.h better name of processor function @ sql/item_timefunc.h better name of processor function @ sql/sql_partition.cc better name of processor function Updated comment. modified: sql/item.h sql/item_func.h sql/item_timefunc.h sql/sql_partition.cc === modified file 'sql/item.h' --- a/sql/item.h 2010-12-22 09:50:36 +0000 +++ b/sql/item.h 2010-12-22 14:45:17 +0000 @@ -970,7 +970,7 @@ public: for date functions. Also used by partitioning code to reject timezone-dependent expressions in a (sub)partitioning function. */ - virtual bool is_arguments_valid_processor(uchar *bool_arg) + virtual bool check_valid_arguments_processor(uchar *bool_arg) { return FALSE; } === modified file 'sql/item_func.h' --- a/sql/item_func.h 2010-12-22 09:50:36 +0000 +++ b/sql/item_func.h 2010-12-22 14:45:17 +0000 @@ -248,7 +248,7 @@ public: representation of a TIMESTAMP argument verbatim, and thus does not depend on the timezone. */ - virtual bool is_arguments_valid_processor(uchar *bool_arg) + virtual bool check_valid_arguments_processor(uchar *bool_arg) { return has_timestamp_args(); } === modified file 'sql/item_timefunc.h' --- a/sql/item_timefunc.h 2010-12-22 09:50:36 +0000 +++ b/sql/item_timefunc.h 2010-12-22 14:45:17 +0000 @@ -70,7 +70,7 @@ public: enum_monotonicity_info get_monotonicity_info() const; longlong val_int_endpoint(bool left_endp, bool *incl_endp); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -90,7 +90,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -119,7 +119,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -152,7 +152,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -172,7 +172,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_time_args(); } @@ -192,7 +192,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_time_args(); } @@ -212,7 +212,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -232,7 +232,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_time_args(); } @@ -266,7 +266,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -288,7 +288,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -322,7 +322,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_date_args(); } @@ -355,7 +355,7 @@ public: (and thus may not be used as a partitioning function) when its argument is NOT of the TIMESTAMP type. */ - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_timestamp_args(); } @@ -380,7 +380,7 @@ public: max_length=10*MY_CHARSET_BIN_MB_MAXLEN; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_time_args(); } @@ -637,7 +637,7 @@ public: const char *func_name() const { return "from_days"; } bool get_date(MYSQL_TIME *res, uint fuzzy_date); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return has_date_args() || has_time_args(); } @@ -767,7 +767,7 @@ class Item_extract :public Item_int_func bool eq(const Item *item, bool binary_cmp) const; virtual void print(String *str, enum_query_type query_type); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { switch (int_type) { case INTERVAL_YEAR: @@ -1053,7 +1053,7 @@ public: maybe_null=1; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} - bool is_arguments_valid_processor(uchar *int_arg) + bool check_valid_arguments_processor(uchar *int_arg) { return !has_time_args(); } === modified file 'sql/sql_partition.cc' --- a/sql/sql_partition.cc 2010-12-22 09:50:36 +0000 +++ b/sql/sql_partition.cc 2010-12-22 14:45:17 +0000 @@ -1014,12 +1014,13 @@ static bool fix_fields_part_func(THD *th } /* - We don't allow creating partitions with timezone-dependent expressions as - a (sub)partitioning function, but we want to allow such expressions when - opening existing tables for easier maintenance. This exception should be - deprecated at some point in future so that we always throw an error. + We don't allow creating partitions with expressions with non matching + arguments as a (sub)partitioning function, + but we want to allow such expressions when 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_arguments_valid_processor, + if (func_expr->walk(&Item::check_valid_arguments_processor, 0, NULL)) { if (is_create_table_ind) --===============6515725052589186360== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/mattias.jonsson@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: mattias.jonsson@stripped\ # cbv3l5jlbd0mq5s8 # target_branch: file:///Users/mattiasj/mysql-bzr/b54483-51-bt_2/ # testament_sha1: 0249d5c028f983e9b394ae15d38b19749b196531 # timestamp: 2010-12-22 15:45:25 +0100 # base_revision_id: mattias.jonsson@stripped\ # 2lpx0gqu4i45jtkz # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWfHClZQABLNfgEAQWff/93o6 FsC////wYAjNxfHyfT1rQHs3Nt7aDa+9h61pNYBpKfqmmjekJoBk2oAAANABoASUmmiepqe0k9pN JkNGRmkNAMgAAEpTYiap6NRp6TJoaekAyANDQYgASIiJimAaUHlBo0D1NNPUAaGjTagRSTU9NKep 6TaaE1Tz0KT2ptR6moDRkZGgASSAgATQ0BMjUmxNQ09RoBtTRkmENfOwKamQUXwRGAoDo1qVE5LH DHIvxK0ACY4EeOlVVXAECIXJWZAtqoXJKDj1LS7NNUorlhREUBNEtywQeEPoF4NtA2kNpvT9wFbs rDDO82iJc0jQ2jS40xEuNUVdKx3pgpktJc2zV4WzJWYvd7llXLIY3zdH88TnPv7/9r1lX2G4A3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