mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed LP bug #794890.
Changed the code that processing of multi-updates and multi-deletes with multitable views at the prepare stage. A proper solution would be: never to perform any transformations of views before and at the prepare stage. Yet it would require re-engineering of the code that checks privileges and updatability of views. Ultimately this re-engineering has to be done to provide a clean solution for INSERT/UPDATE/DELETE statements that use views. Fixed a valgrind problem in the function TABLE::use_index.
This commit is contained in:
@ -1038,8 +1038,9 @@ reopen_tables:
|
||||
call in setup_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_derived(lex, DT_MERGE_FOR_INSERT))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
if (mysql_handle_derived(lex, DT_PREPARE))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
@ -1237,6 +1238,9 @@ reopen_tables:
|
||||
further check in multi_update::prepare whether to use record cache.
|
||||
*/
|
||||
lex->select_lex.exclude_from_table_unique_test= FALSE;
|
||||
|
||||
if (lex->select_lex.save_prep_leaf_tables(thd))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
DBUG_RETURN (FALSE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user