summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-11-18 22:03:02 +0100
committerSergei Golubchik <serg@mariadb.org>2015-11-18 22:03:02 +0100
commitab476a8d107b3e5b591944b2b5eb3a21d6d003a1 (patch)
tree966c077afce804cbaf0fc46ecab09c3d1da36a13 /sql/sql_view.cc
parentf91798dd1c9e178061ba58c88a42b9cb3701385d (diff)
parent43a5090980ac0ab9695587979b9068b6bf849d64 (diff)
downloadmariadb-git-ab476a8d107b3e5b591944b2b5eb3a21d6d003a1.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index a63d8a51a86..3814d58ed75 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -1493,6 +1493,11 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
*/
lex->sql_command= old_lex->sql_command;
lex->duplicates= old_lex->duplicates;
+
+ /* Fields in this view can be used in upper select in case of merge. */
+ if (table->select_lex)
+ table->select_lex->select_n_where_fields+=
+ lex->select_lex.select_n_where_fields;
}
/*
This method has a dependency on the proper lock type being set,