[Commits] eb6979ee420: Make the Optimizer Trace of reqular query and PS EXECUTE be identical
revision-id: eb6979ee420475c16b7f172fbde8b5a6a0d0c7ec (mariadb-10.4.22-30-geb6979ee420) parent(s): b53ee760ff17e3d9ed95b75e5ea2de124ae69384 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2021-11-25 18:27:56 +0300 message: 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 } --- sql/opt_subselect.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index cef6cd9c160..e0c1d6dac4a 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -714,6 +714,15 @@ int check_and_do_in_subquery_rewrites(JOIN *join) if (arena) thd->restore_active_arena(arena, &backup); 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, select_lex->select_number, "IN (SELECT)", "semijoin");
participants (1)
-
psergey