summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-12-27 10:31:00 +0100
committerunknown <ingo@mysql.com>2005-12-27 10:31:00 +0100
commitd03d5a305f21e84f6df95318aa7dbf99a287ad56 (patch)
treeb4448bbf385fd96fc00b6783cc8e9f1a08ac15aa /sql/sql_update.cc
parent6759bbce9ac1a01f5f218d777a5a6e4fb0ceab0d (diff)
parente049f2c8fd6fe2f7dbf3877622737d8b6868721b (diff)
downloadmariadb-git-d03d5a305f21e84f6df95318aa7dbf99a287ad56.tar.gz
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-bug5390 BitKeeper/deleted/.del-ha_blackhole.cc~727c69ef7846623a: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_update.cc: Auto merged
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index a86d1b57190..2ff8a4bc244 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -616,7 +616,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
/* Check that we are not using table that we are updating in a sub select */
{
TABLE_LIST *duplicate;
- if ((duplicate= unique_table(table_list, table_list->next_global)))
+ if ((duplicate= unique_table(thd, table_list, table_list->next_global)))
{
update_non_unique_table_error(table_list, "UPDATE", duplicate);
my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->table_name);
@@ -839,7 +839,7 @@ reopen_tables:
tl->lock_type != TL_READ_NO_INSERT)
{
TABLE_LIST *duplicate;
- if ((duplicate= unique_table(tl, table_list)))
+ if ((duplicate= unique_table(thd, tl, table_list)))
{
update_non_unique_table_error(table_list, "UPDATE", duplicate);
DBUG_RETURN(TRUE);
@@ -1026,8 +1026,7 @@ int multi_update::prepare(List<Item> &not_used_values,
{
TABLE *table=table_ref->table;
if (!(tables_to_update & table->map) &&
- find_table_in_local_list(update_tables, table_ref->db,
- table_ref->table_name))
+ unique_table(thd, table_ref, update_tables))
table->no_cache= 1; // Disable row cache
}
DBUG_RETURN(thd->is_fatal_error != 0);