1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +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

@@ -245,7 +245,7 @@ Optimizer_hint_parser::
Hint_list_container::add(Optimizer_hint_parser *p,
Hint &&elem)
{
Hint *pe= (Hint*) p->m_thd->alloc(sizeof(*pe));
Hint *pe= new (p->m_thd->mem_root) Hint;
if (!pe)
return true;
*pe= std::move(elem);