• Sergei Petrunia's avatar
    MDEV-27306: SET STATEMENT optimizer_trace=1 Doesn't save the trace · 32692140
    Sergei Petrunia authored
    In mysql_execute_command(), move optimizer trace initialization to be
    after run_set_statement_if_requested() call.
    
    Unfortunately, mysql_execute_command() code uses "goto error" a lot, and
    this means optimizer trace code cannot use RAII objects. Work this around
    by:
    - Make Opt_trace_start a non-RAII object, add init() method.
    - Move the code that writes the top-level object and array into
      Opt_trace_start::init().
    32692140
sp_head.cc 153 KB