Commit cca4e14f authored by Sergei Petrunia's avatar Sergei Petrunia

Make the Optimizer Trace of reqular query and PS EXECUTE be identical

Print this piece when we've just made the choice to convert to semi-join.
Also, print it when we've already made that choice before:

  transformation": {
     "select_id": 2,
     "from": "IN (SELECT)",
     "to": "semijoin",
     "chosen": true
   }
parent 4da22738
...@@ -714,6 +714,15 @@ int check_and_do_in_subquery_rewrites(JOIN *join) ...@@ -714,6 +714,15 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
if (arena) if (arena)
thd->restore_active_arena(arena, &backup); thd->restore_active_arena(arena, &backup);
in_subs->is_registered_semijoin= TRUE; in_subs->is_registered_semijoin= TRUE;
}
/*
Print the transformation into trace. Do it when we've just set
is_registered_semijoin=TRUE above, and also do it when we've already
had it set.
*/
if (in_subs->is_registered_semijoin)
{
OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform, OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
select_lex->select_number, select_lex->select_number,
"IN (SELECT)", "semijoin"); "IN (SELECT)", "semijoin");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment