From ad7e09dec4a3d05170ca4e86a9c285f4d3fac05e Mon Sep 17 00:00:00 2001 From: "dlenev@brandersnatch.localdomain" <> Date: Thu, 1 Apr 2004 00:19:30 +0400 Subject: [PATCH] More after-merge fixes for patch fixing bug #2050 --- sql/sql_base.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 2b60a3b3e04..8bcdf9d40ed 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2337,10 +2337,12 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name, while ((field = *ptr++)) { + uint not_used_field_index= NO_CACHED_FIELD_INDEX; /* Skip duplicate field names if NATURAL JOIN is used */ if (!natural_join_table || !find_field_in_table(thd, natural_join_table, field->field_name, - strlen(field->field_name), 0, 0)) + strlen(field->field_name), 0, 0, + ¬_used_field_index)) { Item_field *item= new Item_field(thd, field); if (!found++) @@ -2434,9 +2436,11 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) for (t1_field= t1->field; (*t1_field); t1_field++) { const char *t1_field_name= (*t1_field)->field_name; + uint not_used_field_index= NO_CACHED_FIELD_INDEX; if ((t2_field= find_field_in_table(thd, t2, t1_field_name, - strlen(t1_field_name), 0, 0))) + strlen(t1_field_name), 0, 0, + ¬_used_field_index))) { Item_func_eq *tmp=new Item_func_eq(new Item_field(*t1_field), new Item_field(t2_field));