diff options
author | unknown <bell@sanja.is.com.ua> | 2004-07-16 01:15:55 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-07-16 01:15:55 +0300 |
commit | 8790b1e65c3e1b2ae2ad9aedfe064c20d48bd096 (patch) | |
tree | 7a8e815ca26d9138de3bc77a619aa8103e037911 /sql/sql_derived.cc | |
parent | b0df20349d5e6ed2fc1527c3bd1db66a7d4ff311 (diff) | |
download | mariadb-git-8790b1e65c3e1b2ae2ad9aedfe064c20d48bd096.tar.gz |
VIEW
two TABLE_LIST copy eliminated
include/mysqld_error.h:
errors of view
libmysqld/Makefile.am:
new view file
mysql-test/r/connect.result:
SHOW TABLE show type of table
mysql-test/r/ctype_recoding.result:
SHOW TABLE show type of table
mysql-test/r/drop.result:
SHOW TABLE show type of table
mysql-test/r/grant.result:
new two privileges (CRETEA|SHOW VIEW)
mysql-test/r/lowercase_table.result:
SHOW TABLE show type of table
mysql-test/r/ps_1general.result:
SHOW TABLE show type of table
mysql-test/r/rename.result:
SHOW TABLE show type of table
mysql-test/r/rpl000009.result:
SHOW TABLE show type of table
mysql-test/r/rpl_error_ignored_table.result:
SHOW TABLE show type of table
mysql-test/r/select.result:
SHOW TABLE show type of table
mysql-test/r/system_mysql_db.result:
SHOW TABLE show type of table
new two privileges (CRETEA|SHOW VIEW)
mysql-test/t/system_mysql_db_fix.test:
removing all system tables
scripts/mysql_fix_privilege_tables.sql:
new two privileges (CRETEA|SHOW VIEW)
sql/Makefile.am:
new VIEW related file
sql/ha_myisammrg.cc:
two TABLE_LIST copy eliminated
sql/item.cc:
VIEW
sql/item.h:
VIEW
sql/item_subselect.cc:
VIEW
sql/item_subselect.h:
VIEW
sql/lex.h:
VIEW
sql/lock.cc:
VIEW
sql/mysql_priv.h:
VIEW
sql/mysqld.cc:
VIEW
new parameter - sql_updatable_view_key
sql/opt_sum.cc:
two TABLE_LIST copy eliminated
sql/set_var.cc:
new parameter - sql_updatable_view_key
sql/share/czech/errmsg.txt:
errors messages of views
sql/share/danish/errmsg.txt:
errors messages of views
sql/share/dutch/errmsg.txt:
errors messages of views
sql/share/english/errmsg.txt:
errors messages of views
sql/share/estonian/errmsg.txt:
errors messages of views
sql/share/french/errmsg.txt:
errors messages of views
sql/share/german/errmsg.txt:
errors messages of views
sql/share/greek/errmsg.txt:
errors messages of views
sql/share/hungarian/errmsg.txt:
errors messages of views
sql/share/italian/errmsg.txt:
errors messages of views
sql/share/japanese/errmsg.txt:
errors messages of views
sql/share/korean/errmsg.txt:
errors messages of views
sql/share/norwegian-ny/errmsg.txt:
errors messages of views
sql/share/norwegian/errmsg.txt:
errors messages of views
sql/share/polish/errmsg.txt:
errors messages of views
sql/share/portuguese/errmsg.txt:
errors messages of views
sql/share/romanian/errmsg.txt:
errors messages of views
sql/share/russian/errmsg.txt:
errors messages of views
sql/share/serbian/errmsg.txt:
errors messages of views
sql/share/slovak/errmsg.txt:
errors messages of views
sql/share/spanish/errmsg.txt:
errors messages of views
sql/share/swedish/errmsg.txt:
errors messages of views
sql/share/ukrainian/errmsg.txt:
errors messages of views
sql/slave.cc:
two TABLE_LIST copy eliminated
sql/sp.cc:
VIEW
sql/sql_acl.cc:
VIEW
sql/sql_acl.h:
VIEW
sql/sql_base.cc:
VIEW
sql/sql_cache.cc:
two TABLE_LIST copy eliminated
sql/sql_class.h:
VIEW
sql/sql_db.cc:
two TABLE_LIST copy eliminated
sql/sql_delete.cc:
VIEW
sql/sql_derived.cc:
VIEW
sql/sql_handler.cc:
two TABLE_LIST copy eliminated
sql/sql_help.cc:
two TABLE_LIST copy eliminated
sql/sql_insert.cc:
VIEW
sql/sql_lex.cc:
VIEW
sql/sql_lex.h:
VIEW
sql/sql_load.cc:
VIEW
sql/sql_olap.cc:
VIEW
sql/sql_parse.cc:
two TABLE_LIST copy eliminated
VIEW
sql/sql_prepare.cc:
VIEW
sql/sql_rename.cc:
two TABLE_LIST copy eliminated
sql/sql_select.cc:
VIEW
sql/sql_show.cc:
VIEW
sql/sql_table.cc:
VIEW
sql/sql_union.cc:
VIEW
sql/sql_update.cc:
VIEW
sql/sql_yacc.yy:
VIEW
sql/table.cc:
VIEW
sql/table.h:
VIEW
sql/tztime.cc:
two TABLE_LIST copy eliminated
sql/unireg.h:
VIEW
tests/client_test.c:
VIEW
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 48bc6f4c5a2..3137890f2ba 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -52,15 +52,17 @@ mysql_handle_derived(LEX *lex) { for (TABLE_LIST *cursor= sl->get_table_list(); cursor; - cursor= cursor->next) + cursor= cursor->next_local) { int res; - if (cursor->derived && (res=mysql_derived(lex->thd, lex, - cursor->derived, - cursor))) + if (cursor->derived && (res= mysql_derived(lex->thd, lex, + cursor->derived, + cursor))) { return res; } + else if (cursor->ancestor) + cursor->set_ancestor(); } if (lex->describe) { @@ -148,10 +150,11 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, derived_result->set_table(table); /* - if it is preparation PS only then we do not need real data and we - can skip execution (and parameters is not defined, too) + if it is preparation PS only or commands that need only VIEW structure + then we do not need real data and we can skip execution (and parameters + is not defined, too) */ - if (!thd->only_prepare()) + if (!thd->only_prepare() && !lex->only_view_structure()) { if (is_union) { @@ -197,11 +200,6 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, { org_table_list->real_name= table->real_name; org_table_list->table= table; - if (org_table_list->table_list) - { - org_table_list->table_list->real_name= table->real_name; - org_table_list->table_list->table= table; - } table->derived_select_number= first_select->select_number; table->tmp_table= TMP_TABLE; #ifndef NO_EMBEDDED_ACCESS_CHECKS |