Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4b86ca7f
Commit
4b86ca7f
authored
Feb 24, 2011
by
Tor Didriksen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #11747102 30771: LOG MORE INFO ABOUT THREADS KILL'D AND SORT ABORTED MESSAGES
parent
2c9f4a23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
2 deletions
+58
-2
mysql-test/r/filesort_debug.result
mysql-test/r/filesort_debug.result
+17
-0
mysql-test/t/filesort_debug.test
mysql-test/t/filesort_debug.test
+36
-0
sql/filesort.cc
sql/filesort.cc
+5
-2
No files found.
mysql-test/r/filesort_debug.result
View file @
4b86ca7f
...
...
@@ -14,3 +14,20 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
DROP TABLE t1;
DROP FUNCTION f1;
#
# Bug #11747102
# 30771: LOG MORE INFO ABOUT THREADS KILL'D AND SORT ABORTED MESSAGES
#
# connection 1
CREATE TABLE t1(f0 int auto_increment primary key, f1 int);
INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
SET DEBUG_SYNC='filesort_start SIGNAL filesort_started WAIT_FOR filesort_killed';
# Sending: (not reaped since connection is killed later)
SELECT * FROM t1 ORDER BY f1 ASC, f0;
# connection 2
SET DEBUG_SYNC='now WAIT_FOR filesort_started';
KILL @id;
SET DEBUG_SYNC='now SIGNAL filesort_killed';
# connection default
SET DEBUG_SYNC= "RESET";
DROP TABLE t1;
mysql-test/t/filesort_debug.test
View file @
4b86ca7f
--
source
include
/
have_debug
.
inc
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
count_sessions
.
inc
SET
@
old_debug
=
@@
session
.
debug
;
...
...
@@ -21,3 +23,37 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
DROP
TABLE
t1
;
DROP
FUNCTION
f1
;
--
echo
#
--
echo
# Bug #11747102
--
echo
# 30771: LOG MORE INFO ABOUT THREADS KILL'D AND SORT ABORTED MESSAGES
--
echo
#
connect
(
con1
,
localhost
,
root
);
connect
(
con2
,
localhost
,
root
);
--
echo
# connection 1
connection
con1
;
CREATE
TABLE
t1
(
f0
int
auto_increment
primary
key
,
f1
int
);
INSERT
INTO
t1
(
f1
)
VALUES
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
);
let
$ID
=
`SELECT @id := CONNECTION_ID()`
;
SET
DEBUG_SYNC
=
'filesort_start SIGNAL filesort_started WAIT_FOR filesort_killed'
;
--
echo
# Sending: (not reaped since connection is killed later)
--
send
SELECT
*
FROM
t1
ORDER
BY
f1
ASC
,
f0
--
echo
# connection 2
connection
con2
;
let
$ignore
=
`SELECT @id := $ID`
;
SET
DEBUG_SYNC
=
'now WAIT_FOR filesort_started'
;
KILL
@
id
;
SET
DEBUG_SYNC
=
'now SIGNAL filesort_killed'
;
--
echo
# connection default
connection
default
;
disconnect
con1
;
disconnect
con2
;
--
source
include
/
wait_until_count_sessions
.
inc
SET
DEBUG_SYNC
=
"RESET"
;
DROP
TABLE
t1
;
sql/filesort.cc
View file @
4b86ca7f
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment