diff options
author | unknown <bell@sanja.is.com.ua> | 2003-07-03 11:59:57 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-07-03 11:59:57 +0300 |
commit | 01eb6a4a223ece65c7ff1c9124f4d4b528d579b9 (patch) | |
tree | 649a5b402d0e779673e8295b10098046a53e6799 /sql/item_func.cc | |
parent | 69be8b9d64e0a4e3f3374fd2cb3124b7deaa25a3 (diff) | |
parent | 9f6614292b8061063e709147b1282dda84c7f018 (diff) | |
download | mariadb-git-01eb6a4a223ece65c7ff1c9124f4d4b528d579b9.tar.gz |
merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 0b43cdc1bb8..ee4a6f40b0c 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1357,7 +1357,18 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func, Item *item= *arg; if (item->fix_fields(thd, tables, arg) || item->check_cols(1)) return 1; - if (item->binary()) + /* + TODO: We should think about this. It is not always + right way just to set an UDF result to return my_charset_bin + if one argument has binary sorting order. + The result collation should be calculated according to arguments + derivations in some cases and should not in other cases. + Moreover, some arguments can represent a numeric input + which doesn't effect the result character set and collation. + There is no a general rule for UDF. Everything depends on + the particular user definted function. + */ + if (item->charset()->state & MY_CS_BINSORT) func->set_charset(&my_charset_bin); if (item->maybe_null) func->maybe_null=1; |