mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
fixed detection of updating table on which we select (BUG#6032)
mysql-test/r/view.result: Trys update table from which we select using views and subqueries mysql-test/t/view.test: Trys update table from which we select using views and subqueries sql/sql_acl.cc: fix of fix for bug BUG#5976 sql/sql_base.cc: protection against temporary tables which have not table->table->table_cache_key fixed unique check to skip the same table instences sql/sql_delete.cc: removed next_independent to allow to check VIEW subqueries sql/sql_insert.cc: removed next_independent to allow to check VIEW subqueries sql/sql_parse.cc: removed next_independent to allow to check VIEW subqueries sql/sql_update.cc: removed next_independent to allow to check VIEW subqueries sql/sql_view.cc: removed next_independent to allow to check VIEW subqueries optimisation to mark as non-updatable views with subqueries by same table. sql/table.h: removed next_independent to allow to check VIEW subqueries
This commit is contained in:
@@ -293,7 +293,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 (unique_table(table_list, table_list->next_independent()))
|
||||
if (unique_table(table_list, table_list->next_global))
|
||||
{
|
||||
my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->real_name);
|
||||
DBUG_RETURN(-1);
|
||||
|
Reference in New Issue
Block a user