mirror of
https://github.com/MariaDB/server.git
synced 2026-02-06 18:59:08 +01:00
ft_handler isn't getting initialized for subqueries inside explain delete/update queries. However, ft_handler is accessed inside ha_ft_read(), and is the reason for NULL pointer exception. This is not the case with non-explain delete/update queries, as well as explain/non-explain select queries. Follow the approach the SELECT statements are using in JOIN::optimize_constant_subqueries(): remove SELECT_DESCRIBE flag when invoking optimization of constant subqueries. Single-table UPDATE/DELETEs have SELECT_LEX but don't have JOIN. So, we make optimize_constant_subqueries() not to be a member of JOIN class, and instead move it to SELECT_LEX, and then invoke it from single-table UPDATE/DELETE as well as for SELECT queries. |
||
|---|---|---|
| .. | ||
| r | ||
| t | ||