ha_innodb.cc, trx0trx.h, lock0lock.c, trx0trx.c:
Reserve the MySQL LOCK_thread_count mutex when printing thd->query of an arbitrary transaction; if we are printing thd->query of a transaction that we know is currently executing inside InnoDB, then we know that MySQL cannot meanwhile change thd->query, and no need to reserve the MySQL mutex; note that this patch still leaves open the possibility of races in MySQL's thd->query_len
Showing
Please register or sign in to comment