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

Applied Sanja's patch to fix LP bug #784297 in the tree for mwl106.

The patch imposes unconditional materialization for derived tables
used in update and multi-update statements.
Fixed a bug with a wrong order of processing derived tables/views
at the prepare stage that caused a crash for the variant of the 
query from test case for bug 52157.
This commit is contained in:
Igor Babaev
2011-05-27 00:03:55 -07:00
parent 317e04ce67
commit c9a349488b
10 changed files with 55 additions and 17 deletions

View File

@ -1040,8 +1040,8 @@ reopen_tables:
//We need to merge for insert prior to prepare.
if (mysql_handle_list_of_derived(lex, table_list, DT_MERGE_FOR_INSERT))
DBUG_RETURN(1);
if (mysql_handle_list_of_derived(lex, table_list, DT_PREPARE))
DBUG_RETURN(1);
if (mysql_handle_derived(lex, DT_PREPARE))
DBUG_RETURN(TRUE);
if (setup_tables_and_check_access(thd, &lex->select_lex.context,
&lex->select_lex.top_join_list,