summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2004-12-14 03:36:19 +0300
committersergefp@mysql.com <>2004-12-14 03:36:19 +0300
commit3c8f48d2e39b513e9d2de0e10c04b4fc850356fd (patch)
tree7ef26d1f995140355d4c3b2d9b5b1992ddec220f /sql/item_cmpfunc.cc
parent3ceb04a5d8c12d76e52195c2112845387151469c (diff)
downloadmariadb-git-3c8f48d2e39b513e9d2de0e10c04b4fc850356fd.tar.gz
* Added comments and one assert
* Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields()
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 26ed8f4e9c1..a135f08ae45 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2374,8 +2374,10 @@ bool
Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
DBUG_ASSERT(fixed == 0);
- if (args[0]->fix_fields(thd, tables, args) || args[0]->check_cols(1) ||
- args[1]->fix_fields(thd,tables, args + 1) || args[1]->check_cols(1))
+ if ((!args[0]->fixed &&
+ args[0]->fix_fields(thd, tables, args)) || args[0]->check_cols(1) ||
+ (!args[1]->fixed &&
+ args[1]->fix_fields(thd,tables, args + 1)) || args[1]->check_cols(1))
return 1; /* purecov: inspected */
with_sum_func=args[0]->with_sum_func || args[1]->with_sum_func;
max_length= 1;