Commit 6a46fd5e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Enhance crash reporting. Fix

LPBug#819711 : optimizer_switch must be reported on segfault
LPBug#820169:  Full query text must be reported on crash
parent 21bfae66
......@@ -2754,9 +2754,10 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n",
fprintf(stderr, "\nTrying to get some variables.\n"
"Some pointers may be invalid and cause the dump to abort.\n");
fprintf(stderr, "Query (%p): ", thd->query());
my_safe_print_str(thd->query(), min(1024, thd->query_length()));
my_safe_print_str(thd->query(), 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, "\
......
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