summaryrefslogtreecommitdiff
path: root/mysql-test/t/processlist.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/processlist.test')
-rw-r--r--mysql-test/t/processlist.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/processlist.test b/mysql-test/t/processlist.test
new file mode 100644
index 00000000000..c7b775cf992
--- /dev/null
+++ b/mysql-test/t/processlist.test
@@ -0,0 +1,35 @@
+#
+# MDEV-4578 information_schema.processlist reports incorrect value for Time (2147483647)
+#
+
+source include/have_debug_sync.inc;
+
+SET DEBUG_SYNC = 'dispatch_command_before_set_time WAIT_FOR do_set_time';
+send SELECT 1;
+
+connect (con1,localhost,root,,);
+
+SET DEBUG_SYNC = 'fill_schema_processlist_after_unow SIGNAL do_set_time WAIT_FOR fill_schema_proceed';
+send SELECT INFO,TIME,TIME_MS FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO IS NULL;
+
+connection default;
+reap;
+SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed';
+
+connection con1;
+reap;
+connection default;
+
+#
+# MDEV-4683 query start_time not reset when going to sleep
+#
+
+connection con1;
+select sleep(5); #run a query that will take some time
+connection default;
+
+# verify that the time in COM_SLEEP doesn't include the query run time
+select command, time < 5 from information_schema.processlist where id != connection_id();
+
+disconnect con1;
+