summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRucha Deodhar <rucha.deodhar@mariadb.com>2020-10-08 23:05:35 +0530
committerRucha Deodhar <rucha.deodhar@mariadb.com>2020-10-11 21:44:23 +0530
commiteb612e42020b7409cd37f7ccb41ba61c70a8fb8b (patch)
tree86c738541df925e078b69fb17a7ceefc6f427651
parentd99f787244ab82f658b3f4a6c9877289e6385e04 (diff)
downloadmariadb-git-bb-10.3-MDEV-23445.tar.gz
MDEV-23445: LIMIT ROWS EXAMINED throws error in Debug build onlybb-10.3-MDEV-23445
Analysis: When we reach the maximum limit to examine rows killed_state is set as ABORT. But this isn't an actual error and we still return TRUE. This eventually sets error as UNKNOWN ERROR. Fix: Check if need to stop execution by checking the killed state. If we have to abort it, return false because this isn't an actual error.
-rw-r--r--mysql-test/main/information_schema.test7
-rw-r--r--sql/sql_show.cc5
2 files changed, 5 insertions, 7 deletions
diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test
index 22baad77a69..d090921c97c 100644
--- a/mysql-test/main/information_schema.test
+++ b/mysql-test/main/information_schema.test
@@ -1932,14 +1932,7 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a'
--echo # Diagnostics_area::sql_errno upon query from I_S with LIMIT ROWS EXAMINED
--echo #
-if ($have_debug) {
---error ER_UNKNOWN_ERROR
SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10;
-SHOW WARNINGS;
-}
-if (!$have_debug) {
-SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10;
-}
--echo #
--echo # End of 10.2 Test
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index b9c914f9545..0fe8b707472 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -5273,6 +5273,11 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
free_root(&tmp_mem_root, MY_MARK_BLOCKS_FREE);
}
}
+ if (thd->killed == ABORT_QUERY)
+ {
+ error= 0;
+ goto err;
+ }
}
}
}