diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-05-22 19:08:39 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-07-04 19:13:55 +0200 |
commit | de745ecf29721795710910a19bd0ea3389da804c (patch) | |
tree | d5beaf48411123b9212a024480e495f1774c633c /sql/sql_load.cc | |
parent | 1b981b9edb419e2ac3be1d6e007192a827504185 (diff) | |
download | mariadb-git-de745ecf29721795710910a19bd0ea3389da804c.tar.gz |
MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operations
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index ddb5029c78a..dd6e723c953 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -390,10 +390,13 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list, if (mysql_handle_single_derived(thd->lex, table_list, DT_MERGE_FOR_INSERT) || mysql_handle_single_derived(thd->lex, table_list, DT_PREPARE)) DBUG_RETURN(TRUE); - if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context, - &thd->lex->select_lex.top_join_list, + if (setup_tables_and_check_access(thd, + &thd->lex->first_select_lex()->context, + &thd->lex->first_select_lex()-> + top_join_list, table_list, - thd->lex->select_lex.leaf_tables, FALSE, + thd->lex->first_select_lex()->leaf_tables, + FALSE, INSERT_ACL | UPDATE_ACL, INSERT_ACL | UPDATE_ACL, FALSE)) DBUG_RETURN(-1); |