diff options
author | unknown <sanja@montyprogram.com> | 2012-02-03 13:01:05 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-02-03 13:01:05 +0200 |
commit | 79a04a2c9c2cb04bc635b609504e2b9fb57fd23d (patch) | |
tree | 92688c82ffbce89404da4ce64992172932b42092 /sql/sql_delete.cc | |
parent | 046988661d330e48e19af9fd7d9d2ad4f6cbcd1e (diff) | |
download | mariadb-git-79a04a2c9c2cb04bc635b609504e2b9fb57fd23d.tar.gz |
Moving LP BUG#794005 to 5.3 + fixing INSERT of multi-table view.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 3ce375190a7..84e88196f20 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -68,7 +68,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, if (mysql_handle_list_of_derived(thd->lex, table_list, DT_PREPARE)) DBUG_RETURN(TRUE); - if (!table_list->updatable) + if (!table_list->single_table_updatable()) { my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE"); DBUG_RETURN(TRUE); @@ -526,7 +526,8 @@ int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds) setup_conds(thd, table_list, select_lex->leaf_tables, conds) || setup_ftfuncs(select_lex)) DBUG_RETURN(TRUE); - if (!table_list->updatable || check_key_in_view(thd, table_list)) + if (!table_list->single_table_updatable() || + check_key_in_view(thd, table_list)) { my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE"); DBUG_RETURN(TRUE); @@ -622,7 +623,7 @@ int mysql_multi_delete_prepare(THD *thd) DBUG_RETURN(TRUE); } - if (!target_tbl->correspondent_table->updatable || + if (!target_tbl->correspondent_table->single_table_updatable() || check_key_in_view(thd, target_tbl->correspondent_table)) { my_error(ER_NON_UPDATABLE_TABLE, MYF(0), |