summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2011-02-24 08:00:12 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2011-02-24 08:00:12 +0100
commit4b86ca7f69b0a4176a545e8e55e95ca473fbd587 (patch)
tree2f23573f944768da4c1842ffb310fab80623d094 /sql/filesort.cc
parent2c9f4a23bb76998df560803953ef37b675c7053c (diff)
downloadmariadb-git-4b86ca7f69b0a4176a545e8e55e95ca473fbd587.tar.gz
Bug #11747102 30771: LOG MORE INFO ABOUT THREADS KILL'D AND SORT ABORTED MESSAGES
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r--sql/filesort.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index cf5334cd87f..c3250b6e699 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -32,6 +32,7 @@
#include "probes_mysql.h"
#include "sql_test.h" // TEST_filesort
#include "opt_range.h" // SQL_SELECT
+#include "debug_sync.h"
/// How to write record_ref.
#define WRITE_REF(file,from) \
@@ -123,6 +124,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
Item_subselect *subselect= tab ? tab->containing_subselect() : 0;
MYSQL_FILESORT_START(table->s->db.str, table->s->table_name.str);
+ DEBUG_SYNC(thd, "filesort_start");
/*
Release InnoDB's adaptive hash index latch (if holding) before
@@ -325,12 +327,13 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
}
if (error)
{
- DBUG_ASSERT(thd->is_error());
+ int kill_errno= thd->killed_errno();
+ DBUG_ASSERT(thd->is_error() || kill_errno);
my_printf_error(ER_FILSORT_ABORT,
"%s: %s",
MYF(ME_ERROR + ME_WAITTANG),
ER_THD(thd, ER_FILSORT_ABORT),
- thd->stmt_da->message());
+ kill_errno ? ER(kill_errno) : thd->stmt_da->message());
if (global_system_variables.log_warnings > 1)
{