1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2019-11-01 15:23:18 +02:00
183 changed files with 3959 additions and 1684 deletions

View File

@ -698,7 +698,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
thd->reset_unsafe_warnings();
if (thd->binlog_query(THD::STMT_QUERY_TYPE,
buff.ptr(), buff.length(), FALSE, FALSE, FALSE,
errcode))
errcode) > 0)
res= TRUE;
}
@ -1501,6 +1501,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
privileges of top_view
*/
tbl->grant.want_privilege= SELECT_ACL;
/*
After unfolding the view we lose the list of tables referenced in it
(we will have only a list of underlying tables in case of MERGE
@ -1551,6 +1552,18 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
views with subqueries in select list.
*/
view_main_select_tables= lex->first_select_lex()->table_list.first;
/*
Mergeable view can be used for inserting, so we move the flag down
*/
if (table->for_insert_data)
{
for (TABLE_LIST *t= view_main_select_tables;
t;
t= t->next_local)
{
t->for_insert_data= TRUE;
}
}
/*
Let us set proper lock type for tables of the view's main