summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-07-20 10:34:39 +0300
committerunknown <bell@sanja.is.com.ua>2004-07-20 10:34:39 +0300
commit9050c44cffd26d7ff24c5c7413d1126f22078671 (patch)
tree3b123025449df5a6ddc5739dbaf3e4d32874f71c /sql/sql_view.cc
parentec33aa2beee2ebf4c98cee58f189a0f6f6f070e6 (diff)
downloadmariadb-git-9050c44cffd26d7ff24c5c7413d1126f22078671.tar.gz
fix case what VIEW have not tables (BUG#4614)
mysql-test/r/view.result: test of VIEW without tables mysql-test/t/view.test: test of VIEW without tables sql/sql_view.cc: fix case what VIEW have not tables
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 32d09cc63ef..c558d1c5d34 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -677,6 +677,11 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
if ((tbl_end->next_global= old_next))
tbl_end->next_global->prev_global= &tbl_end->next_global;
}
+ else
+ {
+ /* VIEW do not contain tables */
+ table->next_global= old_next;
+ }
}
table->derived= &lex->unit;