mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 06:05:32 +02:00
Fix check of view updatability in case of underlying view changes its updatability.
For single table update/insert added deep check of single tables (single_table_updatable()). For multi-table view insert added additional check of target table (check_view_single_update). Multi-update was correct. Test suite for all cases added.
This commit is contained in:
parent
81690cf326
commit
d6e1377ac2
6 changed files with 87 additions and 7 deletions
|
|
@ -277,7 +277,8 @@ int mysql_update(THD *thd,
|
|||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
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, "UPDATE");
|
||||
DBUG_RETURN(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue