summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-03-19 17:24:46 +0400
committerunknown <bar@bar.mysql.r18.ru>2003-03-19 17:24:46 +0400
commit676f986838bcf220ee50dc5df975b153eced76d1 (patch)
tree15bd6d30495327c82d283d95880c51d0110b853b /sql/item_strfunc.cc
parent80630f12f3dbcf269fe81c7f39649b5ce9426363 (diff)
downloadmariadb-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.cc8
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)