Hi Marc,
Marc Alff wrote:
>
> Hi Davi
>
> If I understand correctly, thd->profiling should be instrumented
> properly with:
> - thd->profiling.start_new_query();
> - thd->profiling.finish_current_query();
> at the *outermost* entry points in the server.
>
> There are 2 entry points:
> - handle_bootstrap
> - do_command
There is one more: execute_init_command
> I agree with the change in handle_bootstrap(), as it seems this path was
> not working properly.
>
> Now, I would like to understand why moving the instrumentation from
> do_command() down to dispatch_command() fixes the reported bug,
> and why narrowing the scope of the instrumented code is considered a
> good change.
I'm not narrowing as their scope is dispatch_command, nothing
interesting happens outside of it.
>
> Could the reported bug be fixed by changing handle_bootstrap() alone ?
>
No.
-- Davi