diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2016-12-16 17:16:02 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2016-12-19 17:57:43 +0300 |
commit | f23b41b9b8a30e0e54a1ec7a8923057b0e57e0f5 (patch) | |
tree | d1ac40ba3e77eb973a8eb01d2d0d4bd24097555d /sql/sql_lex.cc | |
parent | 268bb69beaec027b9f713d13316aa78c5c292817 (diff) | |
download | mariadb-git-f23b41b9b8a30e0e54a1ec7a8923057b0e57e0f5.tar.gz |
MDEV-10148: Database crashes in the query to the View
Fix st_select_lex::is_merged_child_of to work across merged views or
derived tables.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index f2e7b4f7c3a..fa866bc7008 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4247,6 +4247,12 @@ bool st_select_lex::is_merged_child_of(st_select_lex *ancestor) { continue; } + + if (sl->master_unit()->derived && + sl->master_unit()->derived->is_merged_derived()) + { + continue; + } all_merged= FALSE; break; } |