mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge maint1.mysql.com:/data/localhome/tsmith/bk/mrg50-b
into maint1.mysql.com:/data/localhome/tsmith/bk/mrg51-b
This commit is contained in:
@ -810,11 +810,18 @@ static bool mysql_prepare_insert_check_table(THD *thd, TABLE_LIST *table_list,
|
||||
bool insert_into_view= (table_list->view != 0);
|
||||
DBUG_ENTER("mysql_prepare_insert_check_table");
|
||||
|
||||
/*
|
||||
first table in list is the one we'll INSERT into, requires INSERT_ACL.
|
||||
all others require SELECT_ACL only. the ACL requirement below is for
|
||||
new leaves only anyway (view-constituents), so check for SELECT rather
|
||||
than INSERT.
|
||||
*/
|
||||
|
||||
if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
|
||||
&thd->lex->select_lex.top_join_list,
|
||||
table_list,
|
||||
&thd->lex->select_lex.leaf_tables,
|
||||
select_insert, INSERT_ACL))
|
||||
select_insert, SELECT_ACL))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
if (insert_into_view && !fields.elements)
|
||||
|
Reference in New Issue
Block a user