1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00

Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0-release

into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0


sql/sql_insert.cc:
  Auto merged
This commit is contained in:
unknown
2006-07-19 19:52:27 +02:00
3 changed files with 246 additions and 1 deletions

View File

@@ -836,11 +836,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, where,
&thd->lex->select_lex.leaf_tables,
select_insert, INSERT_ACL))
select_insert, SELECT_ACL))
DBUG_RETURN(TRUE);
if (insert_into_view && !fields.elements)