diff options
author | unknown <igor@rurik.mysql.com> | 2005-08-17 22:24:20 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-08-17 22:24:20 -0700 |
commit | 57966d81a8fd6fb0decd83773f0c65961e82a09e (patch) | |
tree | 50378999ee2936818acf109cf44ab432ceff4b1c /sql/sql_view.cc | |
parent | d8f09108f26f0cbbf51bebe9cfe01cdc2b8cf7a0 (diff) | |
parent | 9f3d970d2a704c17dd83f0e6a787a919c4044a5f (diff) | |
download | mariadb-git-57966d81a8fd6fb0decd83773f0c65961e82a09e.tar.gz |
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
sql/sql_view.cc:
Auto merged
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 577d1d32fcc..af21b43e5c9 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -306,9 +306,11 @@ bool mysql_create_view(THD *thd, /* check that tables are not temporary and this VIEW do not used in query - (it is possible with ALTERing VIEW) - */ - for (tbl= tables; tbl; tbl= tbl->next_global) + (it is possible with ALTERing VIEW). + open_and_lock_tables can change the value of tables, + e.g. it may happen if before the function call tables was equal to 0. + */ + for (tbl= tables= lex->query_tables; tbl; tbl= tbl->next_global) { /* is this table temporary and is not view? */ if (tbl->table->s->tmp_table != NO_TMP_TABLE && !tbl->view && |