From cbdbccafd1328e09a48375ca497e82afffc97ca6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Sep 2004 10:18:04 +0300 Subject: test of updating and fetching from the same table check (BUG##5157) mysql-test/r/lowercase_view.result: test of updating and fetching from the same table check mysql-test/r/view.result: test of updating and fetching from the same table check mysql-test/t/lowercase_view.test: test of updating and fetching from the same table check mysql-test/t/view.test: test of updating and fetching from the same table check sql/mysql_priv.h: unique table test sql/sql_base.cc: unique table test which take into account views added sql/sql_delete.cc: unique table test which take into account views added sql/sql_insert.cc: unique table test which take into account views added sql/sql_parse.cc: unique table test which take into account views added sql/sql_update.cc: unique table test which take into account views added sql/sql_view.cc: unique table test which take into account views added sql/table.h: save next independent (do not belong to current view) table --- sql/sql_delete.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/sql_delete.cc') diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 089c0c00c3b..291504dae88 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -282,8 +282,7 @@ int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds) my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE"); DBUG_RETURN(-1); } - if (find_table_in_global_list(table_list->next_global, - table_list->db, table_list->real_name)) + if (unique_table(table_list, table_list->next_independent())) { my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->real_name); DBUG_RETURN(-1); -- cgit v1.2.1