maria-developers team mailing list archive
Mailing list archive
Re: Missing locking around THD::set_db() ?
Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx> 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
I filed MDEV-4422 for this.