diff options
-rw-r--r-- | mysql-test/r/information_schema.result | 12 | ||||
-rw-r--r-- | mysql-test/t/information_schema.test | 17 | ||||
-rw-r--r-- | sql/sql_show.cc | 6 |
3 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 7644ff4e7a2..2abb1a95d01 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -2195,5 +2195,17 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL Warnings: Warning 1931 Query execution was interrupted. The query examined at least 666 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 # diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index df00ff26908..aa0de692185 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1917,5 +1917,22 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a' 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 # End of 10.2 Test --echo # diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 5544c765775..73b7a84fae1 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5046,6 +5046,12 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) continue; } + if (thd->killed == ABORT_QUERY) + { + error= 0; + goto err; + } + DEBUG_SYNC(thd, "before_open_in_get_all_tables"); if (fill_schema_table_by_open(thd, FALSE, table, schema_table, |