mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-13723: Server crashes in ha_heap::find_unique_row or Assertion `0' failed in st_select_lex_unit::optimize with INTERSECT
With INTERSECT/EXCEPT fact that subquery item of IN/ALL/ANY was not assigned value does not mean that temporary table used for calculating unit is empty (records could be deleted).
This commit is contained in:
@ -1259,11 +1259,11 @@ bool st_select_lex_unit::optimize()
|
||||
{
|
||||
item->assigned(0); // We will reinit & rexecute unit
|
||||
item->reset();
|
||||
if (table->is_created())
|
||||
{
|
||||
table->file->ha_delete_all_rows();
|
||||
table->file->info(HA_STATUS_VARIABLE);
|
||||
}
|
||||
}
|
||||
if (table->is_created())
|
||||
{
|
||||
table->file->ha_delete_all_rows();
|
||||
table->file->info(HA_STATUS_VARIABLE);
|
||||
}
|
||||
/* re-enabling indexes for next subselect iteration */
|
||||
if (union_distinct && table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL))
|
||||
|
Reference in New Issue
Block a user