diff options
author | Galina Shalygina <galashalygina@gmail.com> | 2015-12-17 23:52:14 +0300 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2015-12-18 10:01:42 -0800 |
commit | dfc4772f83b8c5dcee459435b3e4fbb8b881a1ad (patch) | |
tree | 9e6afeed20c2db8cc7e222006f22cc6094a6cab8 /sql/table.cc | |
parent | 12b86beac8e395eb9aeada820f83a0737949f937 (diff) | |
download | mariadb-git-dfc4772f83b8c5dcee459435b3e4fbb8b881a1ad.tar.gz |
MDEV-8789 Implement non-recursive common table expressions
Initial implementation
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index 933cfaaf27e..f409fe9a544 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -7280,7 +7280,9 @@ bool TABLE_LIST::init_derived(THD *thd, bool init_view) */ if (is_merged_derived()) { - if (is_view() || unit->prepared) + if (is_view() || + (unit->prepared && + !(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW))) create_field_translation(thd); } @@ -7422,6 +7424,11 @@ void TABLE_LIST::set_lock_type(THD *thd, enum thr_lock_type lock) } } +bool TABLE_LIST::is_with_table() +{ + return derived && derived->with_element; +} + uint TABLE_SHARE::actual_n_key_parts(THD *thd) { return use_ext_keys && |