summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-12-14 03:36:19 +0300
committerunknown <sergefp@mysql.com>2004-12-14 03:36:19 +0300
commit8322eb0aaaf410819da5eaa95ecd5e3b6ce3c2b0 (patch)
tree7ef26d1f995140355d4c3b2d9b5b1992ddec220f /sql/item_cmpfunc.cc
parent0e4868529124dd1048acf1cbf2b10edee0614fb3 (diff)
downloadmariadb-git-8322eb0aaaf410819da5eaa95ecd5e3b6ce3c2b0.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() sql/item.cc: * More comments * Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/item.h: Assert added sql/item_cmpfunc.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/item_func.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/item_strfunc.h: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/item_subselect.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/item_sum.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/set_var.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/sql_base.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/sql_handler.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/sql_help.cc: Backport of safety measures from 5.0: make numeorous replaces: s/item->fix_fields()/if (!item->fixed) item->fix_fields() sql/sql_select.cc: 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;