diff options
author | unknown <mikael@dator5.(none)> | 2006-06-23 01:21:26 -0400 |
---|---|---|
committer | unknown <mikael@dator5.(none)> | 2006-06-23 01:21:26 -0400 |
commit | 604227e855b874b72541703f439b4b24f9cf142e (patch) | |
tree | 8a5d830c934165bdeafc31953e93b8856ce8e72f /sql/item_cmpfunc.h | |
parent | 3856cdb89b3753bb56e56b2a8629a2dd8d2d3deb (diff) | |
download | mariadb-git-604227e855b874b72541703f439b4b24f9cf142e.tar.gz |
BUG#18198: Less flexibility in defining partition functions
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
mysql-test/r/partition.result:
Changed test case since no longer supported to use multicharacter collations
in comparisons
mysql-test/t/partition.test:
Changed test case since no longer supported to use multicharacter collations
in comparisons
sql/item.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_cmpfunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_func.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_strfunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_timefunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_xmlfunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/partition_info.cc:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/partition_info.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/sql_partition.cc:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/sql_table.cc:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 82cb5febe7d..08b8d4a4d99 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -240,7 +240,8 @@ public: } Item *neg_transformer(THD *thd); virtual Item *negated_item(); - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; class Item_func_not :public Item_bool_func @@ -251,7 +252,8 @@ public: enum Functype functype() const { return NOT_FUNC; } const char *func_name() const { return "not"; } Item *neg_transformer(THD *thd); - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; class Item_maxmin_subselect; @@ -466,7 +468,8 @@ public: bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp_collation.collation; } uint decimal_precision() const { return 1; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; @@ -478,7 +481,8 @@ public: optimize_type select_optimize() const { return OPTIMIZE_NONE; } const char *func_name() const { return "strcmp"; } void print(String *str) { Item_func::print(str); } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; @@ -541,7 +545,7 @@ public: const char *func_name() const { return "ifnull"; } Field *tmp_table_field(TABLE *table); uint decimal_precision() const; - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) { return 0;} }; @@ -582,7 +586,7 @@ public: void print(String *str) { Item_func::print(str); } table_map not_null_tables() const { return 0; } bool is_null(); - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) { return 0;} }; @@ -625,7 +629,8 @@ public: void print(String *str); Item *find_item(String *str); CHARSET_INFO *compare_collation() { return cmp_collation.collation; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; @@ -976,7 +981,8 @@ public: bool nulls_in_row(); bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp_collation.collation; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; /* Functions used by where clause */ @@ -1018,7 +1024,7 @@ public: optimize_type select_optimize() const { return OPTIMIZE_NULL; } Item *neg_transformer(THD *thd); CHARSET_INFO *compare_collation() { return args[0]->collation.collation; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) { return 0;} }; /* Functions used by HAVING for rewriting IN subquery */ @@ -1040,8 +1046,8 @@ public: */ table_map used_tables() const { return used_tables_cache | RAND_TABLE_BIT; } - bool check_partition_func_processor(byte *bool_arg) - { *(bool *)bool_arg= FALSE; return 0; } + bool check_partition_func_processor(byte *int_arg) + { *(int *)int_arg= PF_UNSAFE; return 0; } }; @@ -1064,7 +1070,7 @@ public: void print(String *str); CHARSET_INFO *compare_collation() { return args[0]->collation.collation; } void top_level_item() { abort_on_null=1; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) { return 0;} }; @@ -1103,7 +1109,8 @@ public: const char *func_name() const { return "like"; } bool fix_fields(THD *thd, Item **ref); void cleanup(); - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; #ifdef USE_REGEX @@ -1126,7 +1133,8 @@ public: const char *func_name() const { return "regexp"; } void print(String *str) { print_op(str); } CHARSET_INFO *compare_collation() { return cmp_collation.collation; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; #else @@ -1183,7 +1191,8 @@ public: Item *transform(Item_transformer transformer, byte *arg); void traverse_cond(Cond_traverser, void *arg, traverse_order order); void neg_arguments(THD *thd); - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_single_char_collation(int_arg); } }; |