summaryrefslogtreecommitdiff
path: root/mysql-test/t/change_user.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/change_user.test')
-rw-r--r--mysql-test/t/change_user.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test
index d0cdfc8a741..eec2a6f39d3 100644
--- a/mysql-test/t/change_user.test
+++ b/mysql-test/t/change_user.test
@@ -33,3 +33,31 @@ SELECT IS_USED_LOCK('bug31418') = CONNECTION_ID();
--change_user
SELECT IS_FREE_LOCK('bug31418');
SELECT IS_USED_LOCK('bug31418');
+
+#
+# Bug#31222: com_% global status counters behave randomly with
+# mysql_change_user.
+#
+
+FLUSH STATUS;
+
+--disable_result_log
+--disable_query_log
+
+let $i = 100;
+
+while ($i)
+{
+ dec $i;
+
+ SELECT 1;
+}
+
+--enable_query_log
+--enable_result_log
+
+SHOW GLOBAL STATUS LIKE 'com_select';
+
+--change_user
+
+SHOW GLOBAL STATUS LIKE 'com_select';