mirror of
https://github.com/MariaDB/server.git
synced 2025-07-16 00:42:55 +03:00
bugfix: multi-update checked privileges on views incorrectly
it always required UPDATE privilege on views, not being able to detect when a views was not actually updated in multi-update. fix: instead of marking all tables as "updating" by default, only set "updating" on tables that will actually be updated by multi-update. And mark the view "updating" if any of the view's tables is.
This commit is contained in:
@ -1305,6 +1305,9 @@ int mysql_multi_update_prepare(THD *thd)
|
||||
If table will be updated we should not downgrade lock for it and
|
||||
leave it as is.
|
||||
*/
|
||||
tl->updating= 1;
|
||||
if (tl->belong_to_view)
|
||||
tl->belong_to_view->updating= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1323,7 +1326,6 @@ int mysql_multi_update_prepare(THD *thd)
|
||||
tl->lock_type= read_lock_type_for_table(thd, lex, tl);
|
||||
else
|
||||
tl->set_lock_type(thd, read_lock_type_for_table(thd, lex, tl));
|
||||
tl->updating= 0;
|
||||
}
|
||||
}
|
||||
for (tl= table_list; tl; tl= tl->next_local)
|
||||
|
Reference in New Issue
Block a user