summaryrefslogtreecommitdiff
path: root/sql/sql_handler.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/sql_handler.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/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index f98bb0a9131..f250a00eca1 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -429,7 +429,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
}
tables->table=table;
- if (cond && (cond->fix_fields(thd, tables, &cond) || cond->check_cols(1)))
+ if (cond && ((!cond->fixed &&
+ cond->fix_fields(thd, tables, &cond)) || cond->check_cols(1)))
goto err0;
table->file->init_table_handle_for_HANDLER(); // Only InnoDB requires it
@@ -516,7 +517,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
for (key_len=0 ; (item=it_ke++) ; key_part++)
{
// 'item' can be changed by fix_fields() call
- if (item->fix_fields(thd, tables, it_ke.ref()) ||
+ if ((!item->fixed &&
+ item->fix_fields(thd, tables, it_ke.ref())) ||
(item= *it_ke.ref())->check_cols(1))
goto err;
if (item->used_tables() & ~RAND_TABLE_BIT)