* Konstantin Osipov <konstantin@stripped> [08/08/21 00:39]:
> > When thread is closing MySQL Server unlock tables after "sending OK to
> > client" (actually the flag means that output just closed, as I
> > understand). It is the situation which is not possible in normal query
> > processing and there is no way to detect it.
> Committing an internal maria transaction in external_lock() is a
> maria hack. It has backfired already in having to add
> maria::implicit_commit() in a few places. Now some assert files.
> The diagnostics area is a brand new class that has been made
> clean. Now it contains a member that tracks information that is
> totally unrelated to the purpose of the class.
> Again, only because maria engine has a hack in it.
> Can you please find a better solution (preferably maria-specific)?
Thinking more of it, you could just as successfully add
bool is_quit to class String.
Then the code in COM_QUIT would set:
And in maria you could check for thd->convert_buffer.is_quit.
I am trying to point out that diagnostics_area is not a
single-instance class -- with the fix for Bug#23032 there will be
multiple diagnostics area instances created during execution, and
is_quit has as little relevance to the purpose of this class as it
has to, say, the purpose of class String.
The best way, perhaps, is to put it, if so much needed, to