Skip to content

Commit 3bf8b60

Browse files
committed
clarify the message when filesort is aborted by LIMIT ROWS EXAMINED
1 parent 9508a44 commit 3bf8b60

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mysql-test/main/information_schema.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2240,7 +2240,7 @@ drop database dummy;
22402240
USE test;
22412241
CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema;
22422242
SELECT * FROM v LIMIT ROWS EXAMINED 9;
2243-
ERROR HY000: Sort aborted:
2243+
ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
22442244
DROP VIEW v;
22452245
#
22462246
# MDEV-23408 Wrong result upon query from I_S and further Assertion `!alias_arg || strlen(alias_arg->str) == alias_arg->length' failed with certain connection charset

mysql-test/main/limit_rows_examined.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2;
608608
id select_type table type possible_keys key key_len ref rows Extra
609609
1 SIMPLE t3 ALL NULL NULL NULL NULL 5 Using filesort
610610
select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2;
611-
ERROR HY000: Sort aborted:
611+
ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
612612
explain
613613
select c1, c2 from t3i order by c2, c1 LIMIT ROWS EXAMINED 2;
614614
id select_type table type possible_keys key key_len ref rows Extra
@@ -624,7 +624,7 @@ select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
624624
id select_type table type possible_keys key key_len ref rows Extra
625625
1 SIMPLE t3i index NULL it3j 8 NULL 5 Using index; Using filesort
626626
select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
627-
ERROR HY000: Sort aborted:
627+
ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
628628
drop table t3,t3i;
629629
=========================================================================
630630
INSERT/DELETE/UPDATE

sql/filesort.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
474474
MYF(0),
475475
ER_THD(thd, ER_FILSORT_ABORT),
476476
kill_errno ? ER_THD(thd, kill_errno) :
477-
thd->killed == ABORT_QUERY ? "" :
477+
thd->killed == ABORT_QUERY ? "LIMIT ROWS EXAMINED" :
478478
thd->get_stmt_da()->message());
479479

480480
if (global_system_variables.log_warnings > 1)

0 commit comments

Comments
 (0)