Commit 17d5da7e authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

InnoDB: avoid some data races in innobase_mysql_print_thd() (Bug #3596)

parent ecdac0a3
......@@ -323,9 +323,10 @@ innobase_mysql_print_thd(
FILE* f, /* in: output stream */
void* input_thd)/* in: pointer to a MySQL THD object */
{
THD* thd;
const THD* thd;
const char* s;
thd = (THD*) input_thd;
thd = (const THD*) input_thd;
fprintf(f, "MySQL thread id %lu, query id %lu",
thd->thread_id, thd->query_id);
......@@ -344,14 +345,14 @@ innobase_mysql_print_thd(
fputs(thd->user, f);
}
if (thd->proc_info) {
if ((s = thd->proc_info)) {
putc(' ', f);
fputs(thd->proc_info, f);
fputs(s, f);
}
if (thd->query) {
if ((s = thd->query)) {
putc(' ', f);
fputs(thd->query, f);
fputs(s, f);
}
putc('\n', f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment