diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-08-07 18:06:56 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-08-07 18:06:56 +0200 |
commit | 6fb17a06016506498f4de75ff754f500f9f674f1 (patch) | |
tree | d03c86959f150edc0f6f27ca2c06ccbc0e6e5bf0 /sql/sql_view.cc | |
parent | 2023fac28130d7d3f7d6776332239c62c3890195 (diff) | |
parent | a4ab2431a20f6e2198d980f8e84fa7118515ca3b (diff) | |
download | mariadb-git-6fb17a06016506498f4de75ff754f500f9f674f1.tar.gz |
5.5.39 merge
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index a18193c6eb6..07169f299d7 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -400,9 +400,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, TABLE_LIST *tables= lex->query_tables; TABLE_LIST *tbl; SELECT_LEX *select_lex= &lex->select_lex; -#ifndef NO_EMBEDDED_ACCESS_CHECKS SELECT_LEX *sl; -#endif SELECT_LEX_UNIT *unit= &lex->unit; bool res= FALSE; DBUG_ENTER("mysql_create_view"); @@ -547,7 +545,8 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, } /* Check if the auto generated column names are conforming. */ - make_valid_column_names(select_lex->item_list); + for (sl= select_lex; sl; sl= sl->next_select()) + make_valid_column_names(sl->item_list); if (check_duplicate_names(select_lex->item_list, 1)) { @@ -624,7 +623,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, if (!res) tdc_remove_table(thd, TDC_RT_REMOVE_ALL, view->db, view->table_name, false); - if (mysql_bin_log.is_open()) + if (!res && mysql_bin_log.is_open()) { String buff; const LEX_STRING command[3]= |