Commit 94890a74 authored by Rucha Deodhar's avatar Rucha Deodhar

MDEV-24179: Assertion `m_status == DA_ERROR || m_status == DA_OK ||

m_status == DA_OK_BULK' failed in Diagnostics_area::message()

Analysis: Assertion failure happens because we reach the maximum limit to
examine rows.
Fix: Return the error state.
parent beaea31a
...@@ -2196,5 +2196,17 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL ...@@ -2196,5 +2196,17 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
Warnings: Warnings:
Warning 1931 Query execution was interrupted. The query examined at least ### rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete Warning 1931 Query execution was interrupted. The query examined at least ### rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete
# #
# MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK ||
# m_status == DA_OK_BULK' failed in Diagnostics_area::message()
#
call mtr.add_suppression("Sort aborted.*");
DROP DATABASE test;
CREATE DATABASE test;
USE test;
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;
SELECT * FROM v LIMIT ROWS EXAMINED 9;
ERROR HY000: Sort aborted:
DROP VIEW v;
#
# End of 10.2 Test # End of 10.2 Test
# #
...@@ -1917,6 +1917,23 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a' ...@@ -1917,6 +1917,23 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a'
replace_regex /at least \d+ rows/at least ### rows/; replace_regex /at least \d+ rows/at least ### rows/;
SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10; SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10;
--echo #
--echo # MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK ||
--echo # m_status == DA_OK_BULK' failed in Diagnostics_area::message()
--echo #
call mtr.add_suppression("Sort aborted.*");
DROP DATABASE test;
CREATE DATABASE test;
USE test;
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;
--error ER_FILSORT_ABORT
SELECT * FROM v LIMIT ROWS EXAMINED 9;
DROP VIEW v;
--echo # --echo #
--echo # End of 10.2 Test --echo # End of 10.2 Test
--echo # --echo #
...@@ -5058,6 +5058,12 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) ...@@ -5058,6 +5058,12 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
continue; continue;
} }
if (thd->killed == ABORT_QUERY)
{
error= 0;
goto err;
}
DEBUG_SYNC(thd, "before_open_in_get_all_tables"); DEBUG_SYNC(thd, "before_open_in_get_all_tables");
if (fill_schema_table_by_open(thd, FALSE, if (fill_schema_table_by_open(thd, FALSE,
table, schema_table, table, schema_table,
......
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