summaryrefslogtreecommitdiff
path: root/mysql-test/main/userstat.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/userstat.test')
-rw-r--r--mysql-test/main/userstat.test19
1 files changed, 14 insertions, 5 deletions
diff --git a/mysql-test/main/userstat.test b/mysql-test/main/userstat.test
index 547138cfeaa..42fe1c2ad17 100644
--- a/mysql-test/main/userstat.test
+++ b/mysql-test/main/userstat.test
@@ -6,10 +6,6 @@
-- source include/have_innodb.inc
-- source include/have_log_bin.inc
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
select variable_value from information_schema.global_status where variable_name="handler_read_key" into @global_read_key;
show columns from information_schema.client_statistics;
show columns from information_schema.user_statistics;
@@ -115,5 +111,18 @@ set @@autocommit=1;
select @@in_transaction;
drop table t1;
-# Cleanup
set @@global.general_log=@save_general_log;
+
+--echo #
+--echo # MDEV-25242 Server crashes in check_grant upon invoking function with userstat enabled
+--echo #
+create function f() returns int return (select 1 from performance_schema.threads);
+set global userstat= 1;
+--error ER_SUBQUERY_NO_1_ROW
+select f() from information_schema.table_statistics;
+set global userstat= 0;
+drop function f;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #