diff options
author | unknown <sanja@montyprogram.com> | 2012-02-03 12:24:55 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-02-03 12:24:55 +0200 |
commit | 52d4103ccc02c55e05faef188d73d2b07c00084b (patch) | |
tree | 8b74f97e71e64a9cef9d4bdf49ade0396b6b7828 /sql/sql_delete.cc | |
parent | b9616d815d9c318bb2c1028041a210a807d941bc (diff) | |
download | mariadb-git-52d4103ccc02c55e05faef188d73d2b07c00084b.tar.gz |
Fixed DELETE issues of view over view over table.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 29cd3262a72..72a5b9703b3 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -508,7 +508,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); @@ -598,7 +599,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), |