mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table
If the listed columns in the view definition of the table used in a 'INSERT .. SELECT ..' statement mismatched, a debug assertion would trigger in the cache invalidation code following the failing statement. Although the find_field_in_view() function correctly generated ER_BAD_FIELD_ERROR during setup_fields(), the error failed to propagate further than handle_select(). This patch fixes the issue by adding a check for the return value.
This commit is contained in:
@@ -3241,7 +3241,7 @@ end_with_restore_list:
|
||||
TODO: this is workaround. right way will be move invalidating in
|
||||
the unlock procedure.
|
||||
*/
|
||||
if (first_table->lock_type == TL_WRITE_CONCURRENT_INSERT &&
|
||||
if (!res && first_table->lock_type == TL_WRITE_CONCURRENT_INSERT &&
|
||||
thd->lock)
|
||||
{
|
||||
/* INSERT ... SELECT should invalidate only the very first table */
|
||||
|
||||
Reference in New Issue
Block a user