1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-33281 Optimizer hints code cleanup:

- remove get_args_printer() from hints printing
 - add append_hint_arguments(THD *thd, opt_hints_enum hint, String *str)
 - add more comments
 - rename st_opt_hint_info::hint_name to hint_type
 - add pptimizer trace support for hints
 - add dbug_print_hints()
 - make print_warn() not be a template
 - introduce Printable_parser_rule interface, make grammar rules that
     emit warnings implement it  and print_warn invokes its function)
 - remove Parser::Hint::append_args() as it is not used anywhere
     (it used to be necessary call print_warn(... (Parser::Hint*)NULL);
This commit is contained in:
Sergei Petrunia
2024-12-08 22:03:01 +02:00
committed by Oleg Smirnov
parent 0e088b5d7e
commit c4fe794d22
10 changed files with 216 additions and 168 deletions

View File

@@ -2194,6 +2194,9 @@ JOIN::optimize_inner()
trace_prepare.add_select_number(select_lex->select_number);
Json_writer_array trace_steps(thd, "steps");
if (select_lex->opt_hints_qb)
select_lex->opt_hints_qb->trace_hints(thd);
/*
Needed in case optimizer short-cuts,
set properly in make_aggr_tables_info()