From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- mysql-test/suite/perfschema/r/processlist.result | 201 +++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 mysql-test/suite/perfschema/r/processlist.result (limited to 'mysql-test/suite/perfschema/r/processlist.result') diff --git a/mysql-test/suite/perfschema/r/processlist.result b/mysql-test/suite/perfschema/r/processlist.result new file mode 100644 index 00000000..40c5a0f0 --- /dev/null +++ b/mysql-test/suite/perfschema/r/processlist.result @@ -0,0 +1,201 @@ +## +## Test the Performance Schema-based implementation of SHOW PROCESSLIST. +## +## Test cases: +## 1. Execute the new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist +## 2. Execute the legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist +## 3. Verify that performance_schema_show_processlist = ON executes the new implementation +## 4. Verify that performance_schema_show_processlist = OFF executes the legacy code path +## +## Results must be manually verified. + +### Setup ### + +select @@global.performance_schema_show_processlist into @save_processlist; + +create user user1@localhost, user2@localhost, +user3@localhost, user4@localhost; + +grant ALL on *.* to user1@localhost; +grant ALL on *.* to user2@localhost; +grant ALL on *.* to user3@localhost; +grant ALL on *.* to user4@localhost; + +flush privileges; + +use test; +create table test.t1 (s1 int, s2 int, s3 int, s4 int); + +# Switch to (con0, localhost, root, , ) + +insert into test.t1 values(1, 1, 1, 1); +insert into test.t1 values(2, 2, 2, 2); +insert into test.t1 values(3, 3, 3, 3); +insert into test.t1 values(4, 4, 4, 4); + +# Lock test.t1, insert/update/deletes will block +lock tables t1 read; + +# Connect (con1, localhost, user1, , ) +insert into test.t1 values (0, 0, 0, 0); + +# Connect (con2, localhost, user2, , ) +update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999;; + +# Connect (con3, localhost, user3, , ) +delete from test.t1 where s1 = 3; + +# Connect (con4, localhost, user4, , ) +insert into test.t1 values (4, 4, 4, 4); + +# Connection default + +# Wait for queries to appear in the processlist table + + +### Execute new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist + +set @@global.performance_schema_show_processlist = on; + +SHOW FULL PROCESSLIST; +Id User Host db Command Time State Info + event_scheduler NULL