mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-22910: SIGSEGV in Opt_trace_context::is_started & SIGSEGV in Json_writer::add_table_name (on optimized builds)
Make sure to initialize members of TABLE::reginfo when TABLE::init is called. In this case the problem was that table->reginfo.join_tab was set for the SELECT query and then was reused by the UPDATE query. This case occurred only when the SELECT query had a degenerate join.
This commit is contained in:
@ -2690,10 +2690,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
DBUG_PRINT("info",("Time to scan table: %g", read_time));
|
||||
|
||||
Json_writer_object table_records(thd);
|
||||
if (head->reginfo.join_tab)
|
||||
table_records.add_table_name(head->reginfo.join_tab);
|
||||
else
|
||||
table_records.add_table_name(head);
|
||||
table_records.add_table_name(head);
|
||||
|
||||
Json_writer_object trace_range(thd, "range_analysis");
|
||||
{
|
||||
Json_writer_object table_rec(thd, "table_scan");
|
||||
|
Reference in New Issue
Block a user