1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge trunk-bugfixing -> trunk-runtime

This commit is contained in:
Konstantin Osipov
2010-06-17 17:31:51 +04:00
388 changed files with 6327 additions and 11537 deletions

View File

@ -897,7 +897,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
view->algorithm != VIEW_ALGORITHM_TMPTABLE)))
{
/* TODO: change here when we will support UNIONs */
for (TABLE_LIST *tbl= (TABLE_LIST *)lex->select_lex.table_list.first;
for (TABLE_LIST *tbl= lex->select_lex.table_list.first;
tbl;
tbl= tbl->next_local)
{
@ -1016,7 +1016,7 @@ loop_out:
*/
if (view->updatable_view &&
!lex->select_lex.master_unit()->is_union() &&
!((TABLE_LIST*)lex->select_lex.table_list.first)->next_local &&
!(lex->select_lex.table_list.first)->next_local &&
find_table_in_global_list(lex->query_tables->next_global,
lex->query_tables->db,
lex->query_tables->table_name))
@ -1217,9 +1217,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
char old_db_buf[NAME_LEN+1];
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
bool dbchanged;
Parser_state parser_state(thd,
table->select_stmt.str,
table->select_stmt.length);
Parser_state parser_state;
if (parser_state.init(thd, table->select_stmt.str,
table->select_stmt.length))
goto err;
/*
Use view db name as thread default database, in order to ensure
@ -1377,8 +1378,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
This may change in future, for example if we enable merging of
views with subqueries in select list.
*/
view_main_select_tables=
(TABLE_LIST*)lex->select_lex.table_list.first;
view_main_select_tables= lex->select_lex.table_list.first;
/*
Let us set proper lock type for tables of the view's main