Skip to content

Conversation

@DaveGosselin-MariaDB
Copy link
Member

When deleting from multiple tables, the DELETE operator uses a temporary table to collect the row IDs of rows that will be deleted. If this table grows too large, then we convert it from a heap temporary table to a persistent (on-disk) temporary table to avoid unbounded memory usage. There are several error codes that gate creating this persistent temporary table but themselves don't indicate a problem with the DELETE operation. However, regardless of this error code value, we need to clear it after deciding whether or not to create the persistent temporary table. If we don't clear this value, then the error code's stale state prevents binlog replication when its value is muxed with local_error during multi_delete::send_eof.

When deleting from multiple tables, the DELETE operator uses a temporary table
to collect the row IDs of rows that will be deleted. If this table grows too
large, then we convert it from a heap temporary table to a persistent (on-disk)
temporary table to avoid unbounded memory usage. There are several error codes
that gate creating this persistent temporary table but themselves don't
indicate a problem with the DELETE operation. However, regardless of this error
code value, we need to clear it after deciding whether or not to create the
persistent temporary table. If we don't clear this value, then the error
code's stale state prevents binlog replication when its value is muxed with
local_error during multi_delete::send_eof.
@DaveGosselin-MariaDB
Copy link
Member Author

I tested multi-table UPDATE and it is not affected by this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants