summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-03-07 01:20:56 +0200
committerunknown <monty@mashka.mysql.fi>2003-03-07 01:20:56 +0200
commit81f368cc549ebd0078ef64b61bd92332edb5d319 (patch)
tree473a02ad21d3dcb150966988c72ab2d2a3dd7601 /sql/sql_select.cc
parent7ae420a4a17fab1b45ee56dc5cac2f8d9063baa5 (diff)
parent5861dc5b8b39b3f822a8968963a4783541d59b77 (diff)
downloadmariadb-git-81f368cc549ebd0078ef64b61bd92332edb5d319.tar.gz
Merge to get fix for LOCK TABLES + DROP TABLE in another thread
BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-delete.result: Delete: mysql-test/r/delete.result client/mysqlbinlog.cc: Auto merged libmysql/libmysql.c: Auto merged mysql-test/t/delete.test: Auto merged mysql-test/t/type_datetime.test: Auto merged sql/field.h: Auto merged sql/lock.cc: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/type_datetime.result: Update results after merge sql/log_event.h: Use local version sql/mysql_priv.h: Use local version sql/mysqld.cc: Use local version sql/sql_repl.h: Use local version
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index cf7f310bbd5..d3934fbd620 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -3330,6 +3330,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
== Item_func::COND_AND_FUNC;
List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
Item::cond_result tmp_cond_value;
+ bool should_fix_fields=0;
*cond_value=Item::COND_UNDEF;
Item *item;
@@ -3349,6 +3350,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
delete item; // This may be shared
#endif
VOID(li.replace(new_item));
+ should_fix_fields=1;
}
if (*cond_value == Item::COND_UNDEF)
*cond_value=tmp_cond_value;
@@ -3375,6 +3377,9 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
break; /* purecov: deadcode */
}
}
+ if (should_fix_fields)
+ cond->fix_fields(current_thd,0);
+
if (!((Item_cond*) cond)->argument_list()->elements ||
*cond_value != Item::COND_OK)
return (COND*) 0;