summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-08-13 02:25:50 +0500
committerunknown <vva@eagle.mysql.r18.ru>2004-08-13 02:25:50 +0500
commita88902033a494fc68682645c636c03c789da040b (patch)
tree5376a714034ed1d67fb5d68a1313de944a944994 /sql
parent5ee446d9d0337f7c35ad8cb2b90f0a6aeac20a3c (diff)
parent7e5247aadeeaddc08f0d2c4405095e3c19e3a0a4 (diff)
downloadmariadb-git-a88902033a494fc68682645c636c03c789da040b.tar.gz
Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_4358/mysql-4.0 sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 7b688041acc..882f345a1ca 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7172,7 +7172,16 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields)
if (!(pos=new Item_copy_string(pos)))
goto err;
VOID(li.replace(pos));
- if (param->copy_funcs.push_back(pos))
+ /*
+ Item_copy_string::copy for function can call
+ Item_copy_string::val_int for blob via Item_ref.
+ But if Item_copy_string::copy for blob isn't called before,
+ it's value will be wrong
+ so let's insert Item_copy_string for blobs in the beginning of
+ copy_funcs
+ (to see full test case look at having.test, BUG #4358)
+ */
+ if (param->copy_funcs.push_front(pos))
goto err;
continue;
}