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_strfunc.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_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 64 |
1 files changed, 40 insertions, 24 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index b2e63deed92..bf822a87406 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -47,7 +47,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "md5"; } - 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);} }; @@ -58,7 +59,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "sha"; } - 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_aes_encrypt :public Item_str_func @@ -89,7 +91,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "concat"; } - 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_concat_ws :public Item_str_func @@ -110,7 +113,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "reverse"; } - 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);} }; @@ -148,7 +152,8 @@ protected: public: Item_str_conv(Item *item) :Item_str_func(item) {} String *val_str(String *); - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_binary_collation(int_arg);} }; @@ -212,7 +217,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "substr"; } - 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);} }; @@ -224,7 +230,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "substring_index"; } - 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);} }; @@ -239,7 +246,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "trim"; } - 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);} }; @@ -419,7 +427,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "soundex"; } - 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);} }; @@ -527,7 +536,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "rpad"; } - 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);} }; @@ -540,7 +550,8 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "lpad"; } - 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);} }; @@ -555,7 +566,8 @@ public: collation.set(default_charset()); max_length= 64; } - 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);} }; @@ -572,7 +584,8 @@ public: decimals=0; max_length=args[0]->max_length*2*collation.collation->mbmaxlen; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_binary_collation(int_arg);} }; class Item_func_unhex :public Item_str_func @@ -588,7 +601,8 @@ public: decimals=0; max_length=(1+args[0]->max_length)/2; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) + { return safe_for_binary_collation(int_arg);} }; @@ -612,7 +626,8 @@ public: } void print(String *str); const char *func_name() const { return "cast_as_binary"; } - 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);} }; @@ -652,7 +667,7 @@ public: String* val_str(String* str); const char *func_name() const { return "inet_ntoa"; } void fix_length_and_dec() { decimals = 0; max_length=3*8+7; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) { return 0;} }; class Item_func_quote :public Item_str_func @@ -667,7 +682,7 @@ public: collation.set(args[0]->collation); max_length= args[0]->max_length * 2 + 2; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *int_arg) { return 0;} }; class Item_func_conv_charset :public Item_str_func @@ -711,7 +726,6 @@ public: void fix_length_and_dec(); const char *func_name() const { return "convert"; } void print(String *str); - bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_set_collation :public Item_str_func @@ -744,7 +758,6 @@ public: maybe_null= 0; }; table_map not_null_tables() const { return 0; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_collation :public Item_str_func @@ -760,7 +773,6 @@ public: maybe_null= 0; }; table_map not_null_tables() const { return 0; } - bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_crc32 :public Item_int_func @@ -771,7 +783,8 @@ public: const char *func_name() const { return "crc32"; } void fix_length_and_dec() { max_length=10; } longlong val_int(); - 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_uncompressed_length : public Item_int_func @@ -782,7 +795,8 @@ public: const char *func_name() const{return "uncompressed_length";} void fix_length_and_dec() { max_length=10; } longlong val_int(); - 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 HAVE_COMPRESS @@ -799,7 +813,8 @@ public: void fix_length_and_dec(){max_length= (args[0]->max_length*120)/100+12;} const char *func_name() const{return "compress";} String *val_str(String *) ZLIB_DEPENDED_FUNCTION - 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_uncompress: public Item_str_func @@ -810,7 +825,8 @@ public: void fix_length_and_dec(){max_length= MAX_BLOB_WIDTH;} const char *func_name() const{return "uncompress";} String *val_str(String *) ZLIB_DEPENDED_FUNCTION - 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);} }; #define UUID_LENGTH (8+1+4+1+4+1+4+1+12) |