summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-11-30 17:06:53 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-11-30 17:06:53 -0200
commite1e81ceb83dfc344cb20675604d46e8cb0e7403d (patch)
tree4abb7ef6876679d4b98b722cfbfc15c06e604e99 /sql
parenta542943c911fb090a238b301a66dd6bb699efbe5 (diff)
parentd5e928959e55b4c124a783b83c2c70069dbedbca (diff)
downloadmariadb-git-e1e81ceb83dfc344cb20675604d46e8cb0e7403d.tar.gz
Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 7fec30520d0..cf8fd7f7d2e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2427,7 +2427,7 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n",
if (!(test_flags & TEST_NO_STACKTRACE))
{
- fprintf(stderr, "thd: 0x%lx\n",(long) thd);
+ fprintf(stderr, "Thread pointer: 0x%lx\n", (long) thd);
fprintf(stderr, "Attempting backtrace. You can use the following "
"information to find out\nwhere mysqld died. If "
"you see no messages after this, something went\n"
@@ -2455,11 +2455,13 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n",
kreason= "KILLED_NO_VALUE";
break;
}
- fprintf(stderr, "Trying to get some variables.\n\
-Some pointers may be invalid and cause the dump to abort...\n");
- my_safe_print_str("thd->query", thd->query(), 1024);
- fprintf(stderr, "thd->thread_id=%lu\n", (ulong) thd->thread_id);
- fprintf(stderr, "thd->killed=%s\n", kreason);
+ 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()));
+ fprintf(stderr, "Connection ID (thread ID): %lu\n", (ulong) thd->thread_id);
+ fprintf(stderr, "Status: %s\n", kreason);
+ fputc('\n', stderr);
}
fprintf(stderr, "\
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains\n\