Commit aed67d25 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

In crash handler, output session value of the optimizer switch.

parent 5e4a381c
......@@ -2761,8 +2761,16 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n",
my_safe_print_str(thd->query(), min(65536,thd->query_length()));
fprintf(stderr, "Connection ID (thread ID): %lu\n", (ulong) thd->thread_id);
fprintf(stderr, "Status: %s\n", kreason);
fprintf(stderr, "Optimizer switch: %s\n", optimizer_switch_str);
fputc('\n', stderr);
fprintf(stderr, "Optimizer switch: ");
ulonglong optsw= thd->variables.optimizer_switch;
for (uint i= 0; optimizer_switch_names[i+1]; i++, optsw >>= 1)
{
if (i)
fputc(',', stderr);
fprintf(stderr, "%s=%s",
optimizer_switch_names[i], optsw & 1 ? "on" : "off");
}
fprintf(stderr, "\n\n");
}
fprintf(stderr, "\
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains\n\
......
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