diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-03-19 17:24:46 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-03-19 17:24:46 +0400 |
commit | 676f986838bcf220ee50dc5df975b153eced76d1 (patch) | |
tree | 15bd6d30495327c82d283d95880c51d0110b853b /sql/item_strfunc.cc | |
parent | 80630f12f3dbcf269fe81c7f39649b5ce9426363 (diff) | |
download | mariadb-git-676f986838bcf220ee50dc5df975b153eced76d1.tar.gz |
Produce an error when arguments are not compatible for CONCAT()
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 5151a25f257..d04ed97393d 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -328,8 +328,12 @@ void Item_func_concat::fix_length_and_dec() for (uint i=0 ; i < arg_count ; i++) { max_length+=args[i]->max_length; - set_charset(charset(), coercibility, - args[i]->charset(), args[i]->coercibility); + if (set_charset(charset(), coercibility, + args[i]->charset(), args[i]->coercibility)) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),func_name()); + break; + } } if (max_length > MAX_BLOB_WIDTH) |