mirror of
https://github.com/MariaDB/server.git
synced 2025-10-30 02:16:32 +01:00
The server crashes with a segfault when trying to drop duplicate domain ids in the same command, e.g. FLUSH BINARY LOGS DELETE_DOMAIN_ID=(0), BINARY LOGS DELETE_DOMAIN_ID=(0) This is because a pointer is referenced at the wrong level. When dropping domain ids, first the code builds a list of unique domain ids to drop, and the actual deletion uses the domain ids from this unique list. However, the logic which checks for uniqueness references elements in the existing list of unique domain ids at the wrong level. That is, the type of the unique domain id list is a pointer to rpl_binlog_state::element (i.e. (rpl_binlog_state::element*)). The code uses dynamic_array_ptr to reference its elements, which is a pointer to one of these elements, i.e. (rpl_binlog_state::element**), but the code treated it as a single-level pointer. This code fixes the return from dynamic_array_ptr to be a double-pointer. |
||
|---|---|---|
| .. | ||
| include | ||
| r | ||
| std_data | ||
| t | ||
| combinations | ||
| disabled.def | ||