diff options
author | unknown <gshchepa/uchum@host.loc> | 2008-05-16 12:59:32 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@host.loc> | 2008-05-16 12:59:32 +0500 |
commit | 09de24ec5c9ddae6a08a2ee8367f13da8282fbae (patch) | |
tree | 475b05c19bb94aaeb4cd510890b1362b6124a3bf /sql/item_strfunc.cc | |
parent | 19e1bc76046a8bfd4f4ec8e94ffafc0bb01178bc (diff) | |
parent | 66367aeea83a0cd7f583a0194651a235b63975a9 (diff) | |
download | mariadb-git-09de24ec5c9ddae6a08a2ee8367f13da8282fbae.tar.gz |
Merge host.loc:/work/bugs/5.0-bugteam-36488
into host.loc:/work/bk/5.1-bugteam
sql/item_strfunc.cc:
Auto merged
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index fe805d7672a..56aa44b453e 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -298,6 +298,12 @@ String *Item_func_concat::val_str(String *str) { if (!(res=args[i]->val_str(str))) goto null; + /* + CONCAT accumulates its result in the result of its the first + non-empty argument. Because of this we need is_const to be + evaluated only for it. + */ + is_const= args[i]->const_item() || !args[i]->used_tables(); } else { |