diff options
author | Igor Babaev <igor@askmonty.org> | 2016-04-20 10:55:53 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-04-20 10:55:53 -0700 |
commit | 3b6a64c24776c0291962147dfb3fe331b0b46cc4 (patch) | |
tree | 821bd6b921c15d23d3edea4204d0841f165fb373 /sql/sql_view.cc | |
parent | 4b8e54bb98ac2caf07a83c7df16164bdaa7818b1 (diff) | |
download | mariadb-git-3b6a64c24776c0291962147dfb3fe331b0b46cc4.tar.gz |
Fixed bug mdev-9937.
When the specification of a WITH table referred to a view
that used a based table with the same name as the WITH table
the server went into an infinite loop because it erroneously
resolved the reference to the base table as the reference to
the WITH table.
With tables used in a view cannot be searched for beyond the
scope the view.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 41fd5b78f04..b66f678adfc 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1612,6 +1612,8 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table, sl->context.error_processor_data= (void *)table; } + table->select_lex->master_unit()->is_view= true; + /* check MERGE algorithm ability - algorithm is not explicit TEMPORARY TABLE |