summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-09-01 22:42:37 +0300
committerunknown <bell@sanja.is.com.ua>2005-09-01 22:42:37 +0300
commita8fc85cbe338787214be1afc91e5760c6b81632a (patch)
treed788943a464c45d6c90828c3d67021e7b0e2d4b9 /sql/sql_view.cc
parenta2d8ab0bb5fe8edaaea8637bf8d9d78548dd5a21 (diff)
parenteb7c4ff2dbcfcc0292dcd1ff577b1d203463834c (diff)
downloadmariadb-git-a8fc85cbe338787214be1afc91e5760c6b81632a.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0 BitKeeper/etc/config: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/view.test: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Auto merged sql/table.h: Auto merged
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 8269c16916a..4f87706be17 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -774,9 +774,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
}
if (!res && !thd->is_fatal_error)
{
- TABLE_LIST *top_view= (table->belong_to_view ?
- table->belong_to_view :
- table);
+ TABLE_LIST *top_view= table->top_table();
TABLE_LIST *view_tables= lex->query_tables;
TABLE_LIST *view_tables_tail= 0;
TABLE_LIST *tbl;
@@ -1145,8 +1143,7 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view)
thd->lex->select_lex.select_limit == 0)
DBUG_RETURN(FALSE); /* it is normal table or query without LIMIT */
table= view->table;
- if (view->belong_to_view)
- view= view->belong_to_view;
+ view= view->top_table();
trans= view->field_translation;
key_info_end= (key_info= table->key_info)+ table->s->keys;