23 Apr
2013
23 Apr
'13
1:09 p.m.
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
What happens seems to be this:
Thread 1 is running SHOW PROCESSLIST, it grabs the pointer THD::db to the current database of thread 2.
Thread 2 then does THD::set_db(), freeing the old THD::db pointer and allocating a new one with the new data.
Thread 1 then resumes, doing strdup() of the _old_, now invalid, THD::db pointer, which reads garbage data (or could even segfault if we get really unlucky).
I filed MDEV-4422 for this. - Kristian.