mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0 mysql-test/r/subselect.result: Auto merged sql/sql_acl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_view.cc: Auto merged
This commit is contained in:
@ -356,7 +356,12 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
|
||||
|
||||
// print query
|
||||
str.length(0);
|
||||
thd->lex->unit.print(&str);
|
||||
{
|
||||
ulong sql_mode= thd->variables.sql_mode & MODE_ANSI_QUOTES;
|
||||
thd->variables.sql_mode&= ~MODE_ANSI_QUOTES;
|
||||
thd->lex->unit.print(&str);
|
||||
thd->variables.sql_mode|= sql_mode;
|
||||
}
|
||||
str.append('\0');
|
||||
DBUG_PRINT("VIEW", ("View: %s", str.ptr()));
|
||||
|
||||
@ -657,6 +662,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
|
||||
}
|
||||
|
||||
table->effective_algorithm= VIEW_ALGORITHM_TMEPTABLE;
|
||||
lex->select_lex.linkage= DERIVED_TABLE_TYPE;
|
||||
if (table->updatable)
|
||||
{
|
||||
//TOTO: warning: can't be updateable, .frm edited by hand. version
|
||||
@ -676,6 +682,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;
|
||||
|
Reference in New Issue
Block a user