1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and processlist

MDEV-32441 SENT_ROWS shows random wrong values when stored function
           is selected.
MDEV-32281 EXAMINED_ROWS is not populated in
           information_schema.processlist upon SELECT.

Added ROWS_SENT to information_schema.processlist
This is to have the same information as Percona server (SENT_ROWS)

To ensure that information_schema.processlist has correct values for
sent_rows and examined_rows I introduced two new variables to hold the
total counts so far. This was needed as stored functions and stored
procedures will reset the normal counters to be able to count rows for
each statement individually for slow query log.

Other things:
- Selects with functions shows in processlist the total examined_rows
  and sent_rows by the main statement and all functions.
- Stored procedures shows in processlist examined_rows and sent_rows
  per stored procedure statement.
- Fixed some double accounting for sent_rows and examined_rows.
- HANDLER operations now also supports send_rows and examined_rows.
- Display sizes for MEMORY_USED, MAX_MEMORY_USED, EXAMINED_ROWS and
  QUERY_ID in information_schema.processlist changed to 10 characters.
- EXAMINED_ROWS and SENT_ROWS changed to bigint.
- INSERT RETURNING and DELETE RETURNING now updates SENT_ROWS.
- As thd is always up to date with examined_rows, we do not need
  to handle examined row counting for unions or filesort.
- I renamed SORT_INFO::examined_rows to m_examined_rows to ensure that
  we don't get bugs in merges that tries to use examined_rows.
- Removed calls of type "thd->set_examined_row_count(0)" as they are
  not needed anymore.
- Removed JOIN::join_examined_rows
- Removed not used functions:
  THD::set_examined_row_count()
- Made inline some functions that where called for each row.
This commit is contained in:
Monty
2023-09-11 17:31:40 +03:00
parent 3e50b4ecbc
commit f132fc0049
30 changed files with 689 additions and 342 deletions

View File

@@ -1083,12 +1083,13 @@ t1 CREATE TABLE `t1` (
`STAGE` tinyint(2) NOT NULL, `STAGE` tinyint(2) NOT NULL,
`MAX_STAGE` tinyint(2) NOT NULL, `MAX_STAGE` tinyint(2) NOT NULL,
`PROGRESS` decimal(7,3) NOT NULL, `PROGRESS` decimal(7,3) NOT NULL,
`MEMORY_USED` bigint(7) NOT NULL, `MEMORY_USED` bigint(10) NOT NULL,
`MAX_MEMORY_USED` bigint(7) NOT NULL, `MAX_MEMORY_USED` bigint(10) NOT NULL,
`EXAMINED_ROWS` int(7) NOT NULL, `EXAMINED_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(4) NOT NULL, `SENT_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(10) NOT NULL,
`INFO_BINARY` blob, `INFO_BINARY` blob,
`TID` bigint(4) NOT NULL `TID` bigint(10) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
drop table t1; drop table t1;
create temporary table t1 like information_schema.processlist; create temporary table t1 like information_schema.processlist;
@@ -1107,12 +1108,13 @@ t1 CREATE TEMPORARY TABLE `t1` (
`STAGE` tinyint(2) NOT NULL, `STAGE` tinyint(2) NOT NULL,
`MAX_STAGE` tinyint(2) NOT NULL, `MAX_STAGE` tinyint(2) NOT NULL,
`PROGRESS` decimal(7,3) NOT NULL, `PROGRESS` decimal(7,3) NOT NULL,
`MEMORY_USED` bigint(7) NOT NULL, `MEMORY_USED` bigint(10) NOT NULL,
`MAX_MEMORY_USED` bigint(7) NOT NULL, `MAX_MEMORY_USED` bigint(10) NOT NULL,
`EXAMINED_ROWS` int(7) NOT NULL, `EXAMINED_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(4) NOT NULL, `SENT_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(10) NOT NULL,
`INFO_BINARY` blob, `INFO_BINARY` blob,
`TID` bigint(4) NOT NULL `TID` bigint(10) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
drop table t1; drop table t1;
create table t1 like information_schema.character_sets; create table t1 like information_schema.character_sets;

View File

@@ -211,3 +211,19 @@ id
3 3
set sql_mode=@sql_mode_save; set sql_mode=@sql_mode_save;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
# processlist
#
create table t1 (a int primary key, b int);
insert into t1 select seq,seq+1 from seq_1_to_10;
flush status;
delete from t1 where a between 1 and 3 returning a,b;
a b
1 2
2 3
3 4
show status like "Rows_sent";
Variable_name Value
Rows_sent 3
drop table t1;

View File

@@ -1,3 +1,4 @@
--source include/have_sequence.inc
# #
# Tests for DELETE FROM <table> ... RETURNING <expr>,... # Tests for DELETE FROM <table> ... RETURNING <expr>,...
# #
@@ -170,3 +171,15 @@ DELETE FROM t1 WHERE id > 2 RETURNING *;
set sql_mode=@sql_mode_save; set sql_mode=@sql_mode_save;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
--echo # processlist
--echo #
create table t1 (a int primary key, b int);
insert into t1 select seq,seq+1 from seq_1_to_10;
flush status;
delete from t1 where a between 1 and 3 returning a,b;
show status like "Rows_sent";
drop table t1;

View File

@@ -683,3 +683,23 @@ INSERT t WITH cte AS (SELECT 1) SELECT * FROM cte RETURNING *;
a a
1 1
DROP TABLE t; DROP TABLE t;
#
# MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
# processlist
#
create table t1 (a int primary key, b int);
flush status;
insert into t1 values (1,2),(2,4) returning a,b;
a b
1 2
2 4
insert into t1 select seq,seq from seq_10_to_13 returning a,b;
a b
10 10
11 11
12 12
13 13
show status like "Rows_sent";
Variable_name Value
Rows_sent 6
drop table t1;

View File

@@ -1,3 +1,5 @@
--source include/have_sequence.inc
--echo # Test for INSERT...RETURNING --echo # Test for INSERT...RETURNING
CREATE TABLE t1(id1 INT PRIMARY KEY AUTO_INCREMENT, val1 VARCHAR(1)); CREATE TABLE t1(id1 INT PRIMARY KEY AUTO_INCREMENT, val1 VARCHAR(1));
@@ -396,3 +398,15 @@ CREATE TABLE t (a INT);
INSERT t WITH cte AS (SELECT 1) SELECT * FROM cte RETURNING *; INSERT t WITH cte AS (SELECT 1) SELECT * FROM cte RETURNING *;
DROP TABLE t; DROP TABLE t;
--echo #
--echo # MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
--echo # processlist
--echo #
create table t1 (a int primary key, b int);
flush status;
insert into t1 values (1,2),(2,4) returning a,b;
insert into t1 select seq,seq from seq_10_to_13 returning a,b;
show status like "Rows_sent";
drop table t1;

View File

@@ -83,3 +83,121 @@ variable_value < 1024*1024*1024
# #
# End of 10.2 tests # End of 10.2 tests
# #
#
# MDEV-32441 SENT_ROWS shows random wrong values when stored function
# is selected
#
create table t1 (a int) engine=aria;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
flush status;
create function if not exists f() returns int return
(
select sum(a) > 0 from t1
);
select f() from seq_1_to_10 where seq%5 = 0;
f()
1
1
show status like "rows_sent";
Variable_name Value
Rows_sent 2
# Test simple query
set debug_sync='RESET';
connect con1,localhost,root,,;
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go';
select f() from seq_1_to_10 where seq%5 = 0;
connection default;
set debug_sync='now WAIT_FOR parked';
# Result should be 2, 10+7*2=24
select sent_rows, examined_rows from information_schema.processlist where id=#;
sent_rows examined_rows
2 24
set debug_sync='now signal go';
connection con1;
f()
1
1
# Test union
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go';
select a from t1 where a not in (1,2,3,4) union select a from t1 where a not in (4,5,6,7);
connection default;
set debug_sync='now WAIT_FOR parked';
# Result should be 6, 7+7+6=20 (2 scans of 7 rows + 6 rows in union)
select sent_rows, examined_rows from information_schema.processlist where id=#;
sent_rows examined_rows
6 20
set debug_sync='now signal go';
connection con1;
a
5
6
7
1
2
3
# Test handler calls
handler t1 open;
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go';
handler t1 read NEXT LIMIT 2,4;
connection default;
set debug_sync='now WAIT_FOR parked';
# Result should be 2, 10+7*2=24
select sent_rows, examined_rows from information_schema.processlist where id=#;
sent_rows examined_rows
4 6
set debug_sync='now signal go';
connection con1;
a
3
4
5
6
handler t1 close;
connection default;
drop function f;
drop table t1;
# Test Stored procedures
create or replace table t (a int primary key);
insert into t select seq from seq_1_to_100;
create procedure pr()
begin
select * from t where a between 1 and 2 ;
select * from t where a between 4 and 6 ;
end $
connection con1;
flush status;
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go EXECUTE 2';
call pr();
connection default;
set debug_sync='now WAIT_FOR parked';
select examined_rows, sent_rows, info from information_schema.processlist where id=#;
examined_rows sent_rows info
2 2 select * from t where a between 1 and 2
set debug_sync='now signal go';
select examined_rows, sent_rows, info from information_schema.processlist where id=#;
examined_rows sent_rows info
3 3 select * from t where a between 4 and 6
set debug_sync='now signal go';
connection con1;
a
1
2
a
4
5
6
show status like '%rows%';
Variable_name Value
Not_flushed_delayed_rows 0
Rows_read 8
Rows_sent 5
Rows_tmp_read 0
Sort_rows 0
connection default;
drop table t;
drop procedure pr;
disconnect con1;
set debug_sync= RESET;
#
# End of 11.3 tests
#

View File

@@ -1,4 +1,7 @@
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/have_sequence.inc
--source include/have_debug_sync.inc
--source include/have_sequence.inc
--echo # --echo #
--echo # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines --echo # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines
@@ -77,3 +80,112 @@ select variable_value < 1024*1024*1024 from information_schema.global_status whe
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo # --echo #
--echo #
--echo # MDEV-32441 SENT_ROWS shows random wrong values when stored function
--echo # is selected
--echo #
create table t1 (a int) engine=aria;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
flush status;
create function if not exists f() returns int return
(
select sum(a) > 0 from t1
);
--disable_ps_protocol
select f() from seq_1_to_10 where seq%5 = 0;
show status like "rows_sent";
--enable_ps_protocol
--echo # Test simple query
set debug_sync='RESET';
--connect(con1,localhost,root,,)
--let $conid= `select connection_id()`
--let $replace_conid=id=$conid
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go';
--send select f() from seq_1_to_10 where seq%5 = 0
--connection default
set debug_sync='now WAIT_FOR parked';
--echo # Result should be 2, 10+7*2=24
--replace_result $replace_conid id=#
eval select sent_rows, examined_rows from information_schema.processlist where id=$conid;
set debug_sync='now signal go';
--connection con1
--reap
--echo # Test union
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go';
--send select a from t1 where a not in (1,2,3,4) union select a from t1 where a not in (4,5,6,7)
--connection default
set debug_sync='now WAIT_FOR parked';
--echo # Result should be 6, 7+7+6=20 (2 scans of 7 rows + 6 rows in union)
--replace_result $replace_conid id=#
eval select sent_rows, examined_rows from information_schema.processlist where id=$conid;
set debug_sync='now signal go';
--connection con1
--reap
--echo # Test handler calls
handler t1 open;
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go';
--send handler t1 read NEXT LIMIT 2,4
--connection default
set debug_sync='now WAIT_FOR parked';
--echo # Result should be 2, 10+7*2=24
--replace_result $replace_conid id=#
eval select sent_rows, examined_rows from information_schema.processlist where id=$conid;
set debug_sync='now signal go';
--connection con1
--reap
handler t1 close;
--connection default
drop function f;
drop table t1;
--echo # Test Stored procedures
create or replace table t (a int primary key);
insert into t select seq from seq_1_to_100;
--delimiter $
create procedure pr()
begin
select * from t where a between 1 and 2 ;
select * from t where a between 4 and 6 ;
end $
--delimiter ;
--connection con1
flush status;
set debug_sync='end_of_statement SIGNAL parked WAIT_FOR go EXECUTE 2';
--send call pr()
--connection default
set debug_sync='now WAIT_FOR parked';
--replace_result $replace_conid id=#
eval select examined_rows, sent_rows, info from information_schema.processlist where id=$conid;
set debug_sync='now signal go';
--replace_result $replace_conid id=#
eval select examined_rows, sent_rows, info from information_schema.processlist where id=$conid;
set debug_sync='now signal go';
--connection con1
--reap
show status like '%rows%';
connection default;
# Cleanup
drop table t;
drop procedure pr;
--disconnect con1
set debug_sync= RESET;
--echo #
--echo # End of 11.3 tests
--echo #

View File

@@ -161,7 +161,7 @@ eval SHOW CREATE TABLE $table;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SHOW $table; eval SHOW $table;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
eval SELECT * FROM $table $select_where ORDER BY id; eval SELECT * FROM $table $select_where ORDER BY id;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
eval SELECT $columns FROM $table $select_where ORDER BY id; eval SELECT $columns FROM $table $select_where ORDER BY id;
@@ -182,7 +182,7 @@ eval SHOW CREATE TABLE $table;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SHOW $table; eval SHOW $table;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
eval SELECT * FROM $table $select_where ORDER BY id; eval SELECT * FROM $table $select_where ORDER BY id;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
eval SELECT $columns FROM $table $select_where ORDER BY id; eval SELECT $columns FROM $table $select_where ORDER BY id;
@@ -209,7 +209,7 @@ SHOW GRANTS;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -222,7 +222,7 @@ SHOW GRANTS;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -246,7 +246,7 @@ SHOW GRANTS;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -269,7 +269,7 @@ SHOW GRANTS;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -296,7 +296,7 @@ if ($fixed_bug_30395)
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
} }
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -318,7 +318,7 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -341,7 +341,7 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -389,7 +389,7 @@ SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -411,7 +411,7 @@ SHOW GRANTS;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -435,7 +435,7 @@ GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3
@@ -460,7 +460,7 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist; SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 E_ROWS 16 S_ROWS 17 QUERY_ID 19 TID
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
--real_sleep 0.3 --real_sleep 0.3

View File

@@ -92,7 +92,7 @@ echo
# - INFO must contain the corresponding SHOW/SELECT PROCESSLIST # - INFO must contain the corresponding SHOW/SELECT PROCESSLIST
# #
# 1. Just dump what we get # 1. Just dump what we get
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS>
@@ -160,7 +160,7 @@ let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE COMMAND = 'Sleep' AND USER = 'test_user'; WHERE COMMAND = 'Sleep' AND USER = 'test_user';
--source include/wait_condition.inc --source include/wait_condition.inc
# 1. Just dump what we get # 1. Just dump what we get
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
@@ -203,7 +203,7 @@ echo
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
; ;
connection con1; connection con1;
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
@@ -229,7 +229,7 @@ let $wait_condition= SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
--source include/wait_condition.inc --source include/wait_condition.inc
connection con2; connection con2;
# Just dump what we get # Just dump what we get
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
@@ -281,7 +281,7 @@ WHERE ID = @test_user_con2_id AND Command IN('Query','Execute')
AND State = 'User sleep' AND INFO IS NOT NULL ; AND State = 'User sleep' AND INFO IS NOT NULL ;
--source include/wait_condition.inc --source include/wait_condition.inc
# 1. Just dump what we get # 1. Just dump what we get
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
@@ -341,7 +341,7 @@ let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
# #
# Expect to see the state 'Waiting for table metadata lock' for the third # Expect to see the state 'Waiting for table metadata lock' for the third
# connection because the SELECT collides with the WRITE TABLE LOCK. # connection because the SELECT collides with the WRITE TABLE LOCK.
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
UNLOCK TABLES; UNLOCK TABLES;
# #
@@ -388,7 +388,7 @@ echo
# SHOW FULL PROCESSLIST Complete statement # SHOW FULL PROCESSLIST Complete statement
# SHOW PROCESSLIST statement truncated after 100 char # SHOW PROCESSLIST statement truncated after 100 char
; ;
--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID> --replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <E_ROWS> 16 <S_ROWS> 17 <QUERY_ID> 19 <TID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_result Execute Query --replace_result Execute Query
--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> --replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE>

View File

@@ -283,19 +283,20 @@ def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL
def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) select NEVER NULL
def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) select NEVER NULL
def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext select NEVER NULL
def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select NEVER NULL def information_schema PROCESSLIST INFO_BINARY 18 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select NEVER NULL
def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select NEVER NULL def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select NEVER NULL
def information_schema PROCESSLIST QUERY_ID 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema PROCESSLIST QUERY_ID 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
def information_schema PROCESSLIST SENT_ROWS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
def information_schema PROCESSLIST TID 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema PROCESSLIST TID 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL
def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select NEVER NULL def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select NEVER NULL
def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select NEVER NULL def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) select NEVER NULL
@@ -857,12 +858,13 @@ NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(
NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2) NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2) NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3) NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(7) NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(7) NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST EXAMINED_ROWS int NULL NULL NULL NULL int(7) NULL information_schema PROCESSLIST EXAMINED_ROWS bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(4) NULL information_schema PROCESSLIST SENT_ROWS bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(10)
1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob 1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob
NULL information_schema PROCESSLIST TID bigint NULL NULL NULL NULL bigint(4) NULL information_schema PROCESSLIST TID bigint NULL NULL NULL NULL bigint(10)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512) 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64) 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64) 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)

View File

@@ -283,19 +283,20 @@ def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL
def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(20) NEVER NULL
def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(16) NEVER NULL
def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb3 utf8mb3_general_ci longtext NEVER NULL
def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL def information_schema PROCESSLIST INFO_BINARY 18 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) NEVER NULL def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) NEVER NULL
def information_schema PROCESSLIST QUERY_ID 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema PROCESSLIST QUERY_ID 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
def information_schema PROCESSLIST SENT_ROWS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
def information_schema PROCESSLIST TID 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema PROCESSLIST TID 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL
def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) NEVER NULL def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) NEVER NULL
def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(128) NEVER NULL
@@ -857,12 +858,13 @@ NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(
NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2) NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2) NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3) NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(7) NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(7) NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST EXAMINED_ROWS int NULL NULL NULL NULL int(7) NULL information_schema PROCESSLIST EXAMINED_ROWS bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(4) NULL information_schema PROCESSLIST SENT_ROWS bigint NULL NULL NULL NULL bigint(10)
NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(10)
1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob 1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob
NULL information_schema PROCESSLIST TID bigint NULL NULL NULL NULL bigint(4) NULL information_schema PROCESSLIST TID bigint NULL NULL NULL NULL bigint(10)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512) 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64) 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64) 3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)

View File

@@ -38,21 +38,22 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`STAGE` tinyint(2) NOT NULL, `STAGE` tinyint(2) NOT NULL,
`MAX_STAGE` tinyint(2) NOT NULL, `MAX_STAGE` tinyint(2) NOT NULL,
`PROGRESS` decimal(7,3) NOT NULL, `PROGRESS` decimal(7,3) NOT NULL,
`MEMORY_USED` bigint(7) NOT NULL, `MEMORY_USED` bigint(10) NOT NULL,
`MAX_MEMORY_USED` bigint(7) NOT NULL, `MAX_MEMORY_USED` bigint(10) NOT NULL,
`EXAMINED_ROWS` int(7) NOT NULL, `EXAMINED_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(4) NOT NULL, `SENT_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(10) NOT NULL,
`INFO_BINARY` blob, `INFO_BINARY` blob,
`TID` bigint(4) NOT NULL `TID` bigint(10) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SHOW processlist; SHOW processlist;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id; SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID root HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID ID root HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id; SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
ID root HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id ID root HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
@@ -118,19 +119,20 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`STAGE` tinyint(2) NOT NULL, `STAGE` tinyint(2) NOT NULL,
`MAX_STAGE` tinyint(2) NOT NULL, `MAX_STAGE` tinyint(2) NOT NULL,
`PROGRESS` decimal(7,3) NOT NULL, `PROGRESS` decimal(7,3) NOT NULL,
`MEMORY_USED` bigint(7) NOT NULL, `MEMORY_USED` bigint(10) NOT NULL,
`MAX_MEMORY_USED` bigint(7) NOT NULL, `MAX_MEMORY_USED` bigint(10) NOT NULL,
`EXAMINED_ROWS` int(7) NOT NULL, `EXAMINED_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(4) NOT NULL, `SENT_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(10) NOT NULL,
`INFO_BINARY` blob, `INFO_BINARY` blob,
`TID` bigint(4) NOT NULL `TID` bigint(10) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SHOW processlist; SHOW processlist;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id; SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id; SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
@@ -196,8 +198,8 @@ SHOW processlist;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
#################################################################################### ####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege) 4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads. SHOW/SELECT shows all processes/threads.
@@ -213,10 +215,10 @@ ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
5 Grant PROCESS privilege to anonymous user. 5 Grant PROCESS privilege to anonymous user.
connection default (user=root) connection default (user=root)
@@ -240,11 +242,11 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
6 Revoke PROCESS privilege from ddicttestuser1 6 Revoke PROCESS privilege from ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -267,10 +269,10 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
7 Revoke PROCESS privilege from anonymous user 7 Revoke PROCESS privilege from anonymous user
connection default (user=root) connection default (user=root)
@@ -287,9 +289,9 @@ SHOW GRANTS FOR ''@'localhost';
Grants for @localhost Grants for @localhost
GRANT USAGE ON *.* TO ``@`localhost` GRANT USAGE ON *.* TO ``@`localhost`
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1 8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -312,11 +314,11 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
9 Revoke SUPER privilege from user ddicttestuser1 9 Revoke SUPER privilege from user ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -341,12 +343,12 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
10 Grant SUPER privilege with grant option to user ddicttestuser1. 10 Grant SUPER privilege with grant option to user ddicttestuser1.
connection default (user=root) connection default (user=root)
@@ -403,18 +405,18 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2 11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
connection ddicttestuser1; connection ddicttestuser1;
@@ -435,9 +437,9 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1 11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -467,15 +469,15 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
12 Revoke the SELECT privilege from user ddicttestuser1 12 Revoke the SELECT privilege from user ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -506,16 +508,16 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1. 12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
connection default (user=root) connection default (user=root)

View File

@@ -38,21 +38,22 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`STAGE` tinyint(2) NOT NULL, `STAGE` tinyint(2) NOT NULL,
`MAX_STAGE` tinyint(2) NOT NULL, `MAX_STAGE` tinyint(2) NOT NULL,
`PROGRESS` decimal(7,3) NOT NULL, `PROGRESS` decimal(7,3) NOT NULL,
`MEMORY_USED` bigint(7) NOT NULL, `MEMORY_USED` bigint(10) NOT NULL,
`MAX_MEMORY_USED` bigint(7) NOT NULL, `MAX_MEMORY_USED` bigint(10) NOT NULL,
`EXAMINED_ROWS` int(7) NOT NULL, `EXAMINED_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(4) NOT NULL, `SENT_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(10) NOT NULL,
`INFO_BINARY` blob, `INFO_BINARY` blob,
`TID` bigint(4) NOT NULL `TID` bigint(10) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SHOW processlist; SHOW processlist;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id; SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id; SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
@@ -118,19 +119,20 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`STAGE` tinyint(2) NOT NULL, `STAGE` tinyint(2) NOT NULL,
`MAX_STAGE` tinyint(2) NOT NULL, `MAX_STAGE` tinyint(2) NOT NULL,
`PROGRESS` decimal(7,3) NOT NULL, `PROGRESS` decimal(7,3) NOT NULL,
`MEMORY_USED` bigint(7) NOT NULL, `MEMORY_USED` bigint(10) NOT NULL,
`MAX_MEMORY_USED` bigint(7) NOT NULL, `MAX_MEMORY_USED` bigint(10) NOT NULL,
`EXAMINED_ROWS` int(7) NOT NULL, `EXAMINED_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(4) NOT NULL, `SENT_ROWS` bigint(10) NOT NULL,
`QUERY_ID` bigint(10) NOT NULL,
`INFO_BINARY` blob, `INFO_BINARY` blob,
`TID` bigint(4) NOT NULL `TID` bigint(10) NOT NULL
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SHOW processlist; SHOW processlist;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id; SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id; SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
@@ -196,8 +198,8 @@ SHOW processlist;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
#################################################################################### ####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege) 4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads. SHOW/SELECT shows all processes/threads.
@@ -213,10 +215,10 @@ ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
5 Grant PROCESS privilege to anonymous user. 5 Grant PROCESS privilege to anonymous user.
connection default (user=root) connection default (user=root)
@@ -240,11 +242,11 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
6 Revoke PROCESS privilege from ddicttestuser1 6 Revoke PROCESS privilege from ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -267,10 +269,10 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
7 Revoke PROCESS privilege from anonymous user 7 Revoke PROCESS privilege from anonymous user
connection default (user=root) connection default (user=root)
@@ -287,9 +289,9 @@ SHOW GRANTS FOR ''@'localhost';
Grants for @localhost Grants for @localhost
GRANT USAGE ON *.* TO ``@`localhost` GRANT USAGE ON *.* TO ``@`localhost`
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1 8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -312,11 +314,11 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
9 Revoke SUPER privilege from user ddicttestuser1 9 Revoke SUPER privilege from user ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -341,12 +343,12 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
10 Grant SUPER privilege with grant option to user ddicttestuser1. 10 Grant SUPER privilege with grant option to user ddicttestuser1.
connection default (user=root) connection default (user=root)
@@ -403,18 +405,18 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2 11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
connection ddicttestuser1; connection ddicttestuser1;
@@ -435,9 +437,9 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1 11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -467,15 +469,15 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
12 Revoke the SELECT privilege from user ddicttestuser1 12 Revoke the SELECT privilege from user ddicttestuser1
connection default (user=root) connection default (user=root)
@@ -506,16 +508,16 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist; SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS SENT_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY E_ROWS S_ROWS QUERY_ID NULL TID
#################################################################################### ####################################################################################
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1. 12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
connection default (user=root) connection default (user=root)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -548,7 +548,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
else else
thd->inc_status_sort_rows(num_rows); thd->inc_status_sort_rows(num_rows);
sort->examined_rows= param.examined_rows; sort->m_examined_rows= param.examined_rows;
sort->return_rows= num_rows; sort->return_rows= num_rows;
#ifdef SKIP_DBUG_IN_FILESORT #ifdef SKIP_DBUG_IN_FILESORT
DBUG_POP_EMPTY; /* Ok to DBUG */ DBUG_POP_EMPTY; /* Ok to DBUG */
@@ -556,7 +556,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
DBUG_PRINT("exit", DBUG_PRINT("exit",
("num_rows: %lld examined_rows: %lld found_rows: %lld", ("num_rows: %lld examined_rows: %lld found_rows: %lld",
(longlong) sort->return_rows, (longlong) sort->examined_rows, (longlong) sort->return_rows, (longlong) sort->m_examined_rows,
(longlong) sort->found_rows)); (longlong) sort->found_rows));
MYSQL_FILESORT_DONE(error, num_rows); MYSQL_FILESORT_DONE(error, num_rows);
@@ -985,6 +985,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
if (likely(error == 0)) if (likely(error == 0))
{ {
param->examined_rows++; param->examined_rows++;
thd->inc_examined_row_count_fast();
if (select && select->cond) if (select && select->cond)
{ {
/* /*

View File

@@ -157,7 +157,7 @@ public:
Also how many rows in record_pointers, if used Also how many rows in record_pointers, if used
*/ */
ha_rows return_rows; ha_rows return_rows;
ha_rows examined_rows; /* How many rows read */ ha_rows m_examined_rows; /* How many rows read. Already in thd */
ha_rows found_rows; /* How many rows was accepted */ ha_rows found_rows; /* How many rows was accepted */
/** Sort filesort_buffer */ /** Sort filesort_buffer */

View File

@@ -858,7 +858,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
if (query_cache_send_result_to_client(thd, thd->query(), if (query_cache_send_result_to_client(thd, thd->query(),
thd->query_length()) <= 0) thd->query_length()) <= 0)
{ {
thd->reset_slow_query_state(); thd->reset_slow_query_state(&backup_state);
res= m_lex_keeper.validate_lex_and_exec_core(thd, nextp, false, this); res= m_lex_keeper.validate_lex_and_exec_core(thd, nextp, false, this);
bool log_slow= !res && thd->enable_slow_log; bool log_slow= !res && thd->enable_slow_log;

View File

@@ -641,7 +641,10 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
current_stmt_binlog_format(BINLOG_FORMAT_MIXED), current_stmt_binlog_format(BINLOG_FORMAT_MIXED),
bulk_param(0), bulk_param(0),
table_map_for_update(0), table_map_for_update(0),
m_sent_row_count(0),
sent_row_count_for_statement(0),
m_examined_row_count(0), m_examined_row_count(0),
examined_row_count_for_statement(0),
accessed_rows_and_keys(0), accessed_rows_and_keys(0),
m_digest(NULL), m_digest(NULL),
m_statement_psi(NULL), m_statement_psi(NULL),
@@ -777,7 +780,6 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
my_hash_clear(&ull_hash); my_hash_clear(&ull_hash);
tmp_table=0; tmp_table=0;
cuted_fields= 0L; cuted_fields= 0L;
m_sent_row_count= 0L;
limit_found_rows= 0; limit_found_rows= 0;
m_row_count_func= -1; m_row_count_func= -1;
statement_id_counter= 0UL; statement_id_counter= 0UL;
@@ -5823,7 +5825,7 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup,
cuted_fields= 0; cuted_fields= 0;
transaction->savepoints= 0; transaction->savepoints= 0;
first_successful_insert_id_in_cur_stmt= 0; first_successful_insert_id_in_cur_stmt= 0;
reset_slow_query_state(); reset_slow_query_state(backup);
} }
void THD::restore_sub_statement_state(Sub_statement_state *backup) void THD::restore_sub_statement_state(Sub_statement_state *backup)
@@ -5865,11 +5867,14 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
first_successful_insert_id_in_cur_stmt= first_successful_insert_id_in_cur_stmt=
backup->first_successful_insert_id_in_cur_stmt; backup->first_successful_insert_id_in_cur_stmt;
limit_found_rows= backup->limit_found_rows; limit_found_rows= backup->limit_found_rows;
set_sent_row_count(backup->sent_row_count);
client_capabilities= backup->client_capabilities; client_capabilities= backup->client_capabilities;
/* Restore statistic needed for slow log */ /* Restore statistic needed for slow log */
add_slow_query_state(backup); add_slow_query_state(backup);
if (backup->sent_row_count)
MYSQL_SET_STATEMENT_ROWS_SENT(m_statement_psi, m_sent_row_count);
if (backup->examined_row_count)
MYSQL_SET_STATEMENT_ROWS_EXAMINED(m_statement_psi, m_examined_row_count);
/* /*
If we've left sub-statement mode, reset the fatal error flag. If we've left sub-statement mode, reset the fatal error flag.
@@ -5903,18 +5908,20 @@ void THD::store_slow_query_state(Sub_statement_state *backup)
backup->affected_rows= affected_rows; backup->affected_rows= affected_rows;
backup->bytes_sent_old= bytes_sent_old; backup->bytes_sent_old= bytes_sent_old;
backup->examined_row_count= m_examined_row_count; backup->examined_row_count= m_examined_row_count;
backup->examined_row_count_for_statement= examined_row_count_for_statement;
backup->query_plan_flags= query_plan_flags; backup->query_plan_flags= query_plan_flags;
backup->query_plan_fsort_passes= query_plan_fsort_passes; backup->query_plan_fsort_passes= query_plan_fsort_passes;
backup->sent_row_count= m_sent_row_count; backup->sent_row_count= m_sent_row_count;
backup->sent_row_count_for_statement= sent_row_count_for_statement;
backup->tmp_tables_disk_used= tmp_tables_disk_used; backup->tmp_tables_disk_used= tmp_tables_disk_used;
backup->tmp_tables_size= tmp_tables_size; backup->tmp_tables_size= tmp_tables_size;
backup->tmp_tables_used= tmp_tables_used; backup->tmp_tables_used= tmp_tables_used;
backup->handler_stats= handler_stats; backup->handler_stats= handler_stats;
} }
/* Reset variables related to slow query log */ /* Reset variables related to slow query log */
void THD::reset_slow_query_state() void THD::reset_slow_query_state(Sub_statement_state *backup)
{ {
affected_rows= 0; affected_rows= 0;
bytes_sent_old= status_var.bytes_sent; bytes_sent_old= status_var.bytes_sent;
@@ -5925,6 +5932,17 @@ void THD::reset_slow_query_state()
tmp_tables_disk_used= 0; tmp_tables_disk_used= 0;
tmp_tables_size= 0; tmp_tables_size= 0;
tmp_tables_used= 0; tmp_tables_used= 0;
if (backup && (backup->in_stored_procedure= in_stored_procedure()))
{
/*
For stored procedures, we want to see stats in show processlist
for the current statement, not for the call to stored procedure.
This is because 'show processlist' shows the stored procedure
query string, not the CALL query.
*/
examined_row_count_for_statement= 0;
sent_row_count_for_statement= 0;
}
if ((variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_ENGINE)) if ((variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_ENGINE))
handler_stats.reset(); handler_stats.reset();
} }
@@ -5945,6 +5963,17 @@ void THD::add_slow_query_state(Sub_statement_state *backup)
tmp_tables_disk_used+= backup->tmp_tables_disk_used; tmp_tables_disk_used+= backup->tmp_tables_disk_used;
tmp_tables_size+= backup->tmp_tables_size; tmp_tables_size+= backup->tmp_tables_size;
tmp_tables_used+= backup->tmp_tables_used; tmp_tables_used+= backup->tmp_tables_used;
if (backup->in_stored_procedure)
{
/*
For stored procedures, we want to see stats in show processlist
for the current statement, not for the call to stored procedure.
This is because 'show processlist' shows the stored procedure
query string, not the CALL query.
*/
examined_row_count_for_statement+= backup->examined_row_count_for_statement;
sent_row_count_for_statement+= backup->sent_row_count_for_statement;
}
if ((variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_ENGINE)) if ((variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_ENGINE))
handler_stats.add(&backup->handler_stats); handler_stats.add(&backup->handler_stats);
} }
@@ -5957,30 +5986,21 @@ void THD::set_statement(Statement *stmt)
mysql_mutex_unlock(&LOCK_thd_data); mysql_mutex_unlock(&LOCK_thd_data);
} }
/*
This functions is only called when we send the result from the query
cache or in case of select_export().
*/
void THD::set_sent_row_count(ha_rows count) void THD::set_sent_row_count(ha_rows count)
{ {
m_sent_row_count= count; m_sent_row_count= count;
sent_row_count_for_statement+= count;
MYSQL_SET_STATEMENT_ROWS_SENT(m_statement_psi, m_sent_row_count); MYSQL_SET_STATEMENT_ROWS_SENT(m_statement_psi, m_sent_row_count);
} }
void THD::set_examined_row_count(ha_rows count) void THD::ps_report_examined_row_count()
{ {
m_examined_row_count= count; if (m_examined_row_count)
MYSQL_SET_STATEMENT_ROWS_EXAMINED(m_statement_psi, m_examined_row_count); MYSQL_SET_STATEMENT_ROWS_EXAMINED(m_statement_psi, m_examined_row_count);
}
void THD::inc_sent_row_count(ha_rows count)
{
m_sent_row_count+= count;
DBUG_EXECUTE_IF("debug_huge_number_of_examined_rows",
m_examined_row_count= (ULONGLONG_MAX - 1000000););
MYSQL_SET_STATEMENT_ROWS_SENT(m_statement_psi, m_sent_row_count);
}
void THD::inc_examined_row_count(ha_rows count)
{
m_examined_row_count+= count;
MYSQL_SET_STATEMENT_ROWS_EXAMINED(m_statement_psi, m_examined_row_count);
} }
void THD::inc_status_created_tmp_disk_tables() void THD::inc_status_created_tmp_disk_tables()

View File

@@ -2033,6 +2033,7 @@ public:
ulonglong tmp_tables_size; ulonglong tmp_tables_size;
ulonglong client_capabilities; ulonglong client_capabilities;
ulonglong cuted_fields, sent_row_count, examined_row_count; ulonglong cuted_fields, sent_row_count, examined_row_count;
ulonglong sent_row_count_for_statement, examined_row_count_for_statement;
ulonglong affected_rows; ulonglong affected_rows;
ulonglong bytes_sent_old; ulonglong bytes_sent_old;
ha_handler_stats handler_stats; ha_handler_stats handler_stats;
@@ -2043,6 +2044,7 @@ public:
uint in_sub_stmt; /* 0, SUB_STMT_TRIGGER or SUB_STMT_FUNCTION */ uint in_sub_stmt; /* 0, SUB_STMT_TRIGGER or SUB_STMT_FUNCTION */
bool enable_slow_log; bool enable_slow_log;
bool last_insert_id_used; bool last_insert_id_used;
bool in_stored_procedure;
enum enum_check_fields count_cuted_fields; enum enum_check_fields count_cuted_fields;
}; };
@@ -3568,12 +3570,13 @@ public:
ha_rows cuted_fields; ha_rows cuted_fields;
private:
/* /*
number of rows we actually sent to the client, including "synthetic" number of rows we actually sent to the client, including "synthetic"
rows in ROLLUP etc. rows in ROLLUP etc.
*/ */
ha_rows m_sent_row_count; ha_rows m_sent_row_count;
/* Number of rows for the total statement */
ha_rows sent_row_count_for_statement;
/** /**
Number of rows read and/or evaluated for a statement. Used for Number of rows read and/or evaluated for a statement. Used for
@@ -3586,8 +3589,9 @@ private:
filesort() before reading it for e.g. update. filesort() before reading it for e.g. update.
*/ */
ha_rows m_examined_row_count; ha_rows m_examined_row_count;
/* Number of rows for the top level query */
ha_rows examined_row_count_for_statement;
public:
ha_rows get_sent_row_count() const ha_rows get_sent_row_count() const
{ return m_sent_row_count; } { return m_sent_row_count; }
@@ -3598,10 +3602,27 @@ public:
{ return affected_rows; } { return affected_rows; }
void set_sent_row_count(ha_rows count); void set_sent_row_count(ha_rows count);
void set_examined_row_count(ha_rows count);
void inc_sent_row_count(ha_rows count); inline void inc_sent_row_count(ha_rows count)
void inc_examined_row_count(ha_rows count); {
m_sent_row_count+= count;
sent_row_count_for_statement+= count;
MYSQL_SET_STATEMENT_ROWS_SENT(m_statement_psi, m_sent_row_count);
}
inline void inc_examined_row_count_fast()
{
m_examined_row_count++;
examined_row_count_for_statement++;
}
inline void inc_examined_row_count()
{
inc_examined_row_count_fast();
DBUG_EXECUTE_IF("debug_huge_number_of_examined_rows",
m_examined_row_count= (ULONGLONG_MAX - 1000000););
MYSQL_SET_STATEMENT_ROWS_EXAMINED(m_statement_psi, m_examined_row_count);
}
void ps_report_examined_row_count();
void inc_status_created_tmp_disk_tables(); void inc_status_created_tmp_disk_tables();
void inc_status_created_tmp_files(); void inc_status_created_tmp_files();
@@ -4728,7 +4749,7 @@ public:
void reset_sub_statement_state(Sub_statement_state *backup, uint new_state); void reset_sub_statement_state(Sub_statement_state *backup, uint new_state);
void restore_sub_statement_state(Sub_statement_state *backup); void restore_sub_statement_state(Sub_statement_state *backup);
void store_slow_query_state(Sub_statement_state *backup); void store_slow_query_state(Sub_statement_state *backup);
void reset_slow_query_state(); void reset_slow_query_state(Sub_statement_state *backup);
void add_slow_query_state(Sub_statement_state *backup); void add_slow_query_state(Sub_statement_state *backup);
void set_n_backup_active_arena(Query_arena *set, Query_arena *backup); void set_n_backup_active_arena(Query_arena *set, Query_arena *backup);
void restore_active_arena(Query_arena *set, Query_arena *backup); void restore_active_arena(Query_arena *set, Query_arena *backup);
@@ -5784,6 +5805,15 @@ public:
return false; return false;
return !is_set_timestamp_forbidden(this); return !is_set_timestamp_forbidden(this);
} }
/*
Return true if we are in stored procedure, not in a function or
trigger.
*/
bool in_stored_procedure()
{
return (lex->sphead != 0 &&
!(in_sub_stmt & (SUB_STMT_FUNCTION | SUB_STMT_TRIGGER)));
}
}; };

View File

@@ -226,7 +226,7 @@ static bool record_should_be_deleted(THD *thd, TABLE *table, SQL_SELECT *sel,
Explain_delete *explain, bool truncate_history) Explain_delete *explain, bool truncate_history)
{ {
explain->tracker.on_record_read(); explain->tracker.on_record_read();
thd->inc_examined_row_count(1); thd->inc_examined_row_count();
if (table->vfield) if (table->vfield)
(void) table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_DELETE); (void) table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_DELETE);
if (!sel || sel->skip_record(thd) > 0) if (!sel || sel->skip_record(thd) > 0)
@@ -662,7 +662,7 @@ bool Sql_cmd_delete::delete_from_single_table(THD *thd)
if (!(file_sort= filesort(thd, table, &fsort, fs_tracker))) if (!(file_sort= filesort(thd, table, &fsort, fs_tracker)))
goto got_error; goto got_error;
thd->inc_examined_row_count(file_sort->examined_rows); thd->ps_report_examined_row_count();
/* /*
Filesort has already found and selected the rows we want to delete, Filesort has already found and selected the rows we want to delete,
so we don't need the where clause so we don't need the where clause
@@ -1831,5 +1831,6 @@ bool Sql_cmd_delete::execute_inner(THD *thd)
delete result; delete result;
} }
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
return res; return res;
} }

View File

@@ -988,6 +988,7 @@ retry:
} }
goto ok; goto ok;
} }
thd->inc_examined_row_count();
if (cond && !cond->val_int()) if (cond && !cond->val_int())
{ {
if (thd->is_error()) if (thd->is_error())
@@ -1002,6 +1003,7 @@ retry:
goto err; goto err;
protocol->write(); protocol->write();
thd->inc_sent_row_count(1);
} }
num_rows++; num_rows++;
} }

View File

@@ -1413,6 +1413,7 @@ abort:
thd->abort_on_warning= 0; thd->abort_on_warning= 0;
if (readbuff) if (readbuff)
my_free(readbuff); my_free(readbuff);
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
DBUG_RETURN(retval); DBUG_RETURN(retval);
} }

View File

@@ -2433,7 +2433,8 @@ resume:
/* Performance Schema Interface instrumentation, end */ /* Performance Schema Interface instrumentation, end */
MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da()); MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
thd->set_examined_row_count(0); // For processlist /* Reset values shown in processlist */
thd->examined_row_count_for_statement= thd->sent_row_count_for_statement= 0;
thd->set_command(COM_SLEEP); thd->set_command(COM_SLEEP);
thd->m_statement_psi= NULL; thd->m_statement_psi= NULL;
@@ -4428,6 +4429,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
res= mysql_insert(thd, all_tables, lex->field_list, lex->many_values, res= mysql_insert(thd, all_tables, lex->field_list, lex->many_values,
lex->update_list, lex->value_list, lex->update_list, lex->value_list,
lex->duplicates, lex->ignore, sel_result); lex->duplicates, lex->ignore, sel_result);
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
if (save_protocol) if (save_protocol)
{ {
delete thd->protocol; delete thd->protocol;
@@ -4625,6 +4627,8 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
/* revert changes for SP */ /* revert changes for SP */
MYSQL_INSERT_SELECT_DONE(res, (ulong) thd->get_row_count_func()); MYSQL_INSERT_SELECT_DONE(res, (ulong) thd->get_row_count_func());
select_lex->table_list.first= first_table; select_lex->table_list.first= first_table;
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
} }
/* /*
If we have inserted into a VIEW, and the base table has If we have inserted into a VIEW, and the base table has
@@ -5924,6 +5928,8 @@ finish:
thd->wsrep_PA_safe= true; thd->wsrep_PA_safe= true;
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
if (lex->sql_command != SQLCOM_SET_OPTION)
DEBUG_SYNC(thd, "end_of_statement");
DBUG_RETURN(res || thd->is_error()); DBUG_RETURN(res || thd->is_error());
} }
@@ -7320,10 +7326,10 @@ void THD::reset_for_next_command(bool do_clear_error)
DBUG_ASSERT(user_var_events_alloc == &main_mem_root); DBUG_ASSERT(user_var_events_alloc == &main_mem_root);
enable_slow_log= true; enable_slow_log= true;
get_stmt_da()->reset_for_next_command(); get_stmt_da()->reset_for_next_command();
m_sent_row_count= m_examined_row_count= 0; sent_row_count_for_statement= examined_row_count_for_statement= 0;
accessed_rows_and_keys= 0; accessed_rows_and_keys= 0;
reset_slow_query_state(); reset_slow_query_state(0);
reset_current_stmt_binlog_format_row(); reset_current_stmt_binlog_format_row();
binlog_unsafe_warning_flags= 0; binlog_unsafe_warning_flags= 0;

View File

@@ -4770,7 +4770,6 @@ int JOIN::exec_inner()
if (procedure->change_columns(thd, procedure_fields_list) || if (procedure->change_columns(thd, procedure_fields_list) ||
result->prepare(procedure_fields_list, unit)) result->prepare(procedure_fields_list, unit))
{ {
thd->set_examined_row_count(0);
thd->limit_found_rows= 0; thd->limit_found_rows= 0;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@@ -4828,7 +4827,6 @@ int JOIN::exec_inner()
} }
/* Single select (without union) always returns 0 or 1 row */ /* Single select (without union) always returns 0 or 1 row */
thd->limit_found_rows= send_records; thd->limit_found_rows= send_records;
thd->set_examined_row_count(0);
DBUG_RETURN(error); DBUG_RETURN(error);
} }
@@ -4926,13 +4924,6 @@ int JOIN::exec_inner()
select_lex->mark_const_derived(zero_result_cause); select_lex->mark_const_derived(zero_result_cause);
} }
/*
Initialize examined rows here because the values from all join parts
must be accumulated in examined_row_count. Hence every join
iteration must count from zero.
*/
join_examined_rows= 0;
/* XXX: When can we have here thd->is_error() not zero? */ /* XXX: When can we have here thd->is_error() not zero? */
if (unlikely(thd->is_error())) if (unlikely(thd->is_error()))
{ {
@@ -4948,7 +4939,8 @@ int JOIN::exec_inner()
error= result->view_structure_only() ? false : do_select(this, procedure); error= result->view_structure_only() ? false : do_select(this, procedure);
/* Accumulate the counts from all join iterations of all join parts. */ /* Accumulate the counts from all join iterations of all join parts. */
thd->inc_examined_row_count(join_examined_rows); thd->ps_report_examined_row_count();
DBUG_PRINT("counts", ("thd->examined_row_count: %lu", DBUG_PRINT("counts", ("thd->examined_row_count: %lu",
(ulong) thd->get_examined_row_count())); (ulong) thd->get_examined_row_count()));
@@ -16990,7 +16982,6 @@ return_zero_rows(JOIN *join, select_result *result, List<TABLE_LIST> *tables,
/* Update results for FOUND_ROWS */ /* Update results for FOUND_ROWS */
if (!join->send_row_on_empty_set()) if (!join->send_row_on_empty_set())
{ {
join->thd->set_examined_row_count(0);
join->thd->limit_found_rows= 0; join->thd->limit_found_rows= 0;
} }
@@ -22961,8 +22952,7 @@ do_select(JOIN *join, Procedure *procedure)
here. join->send_records is increased on success in end_send(), here. join->send_records is increased on success in end_send(),
so we don't touch it here. so we don't touch it here.
*/ */
join->join_examined_rows++; join->thd->inc_examined_row_count_fast();
DBUG_ASSERT(join->join_examined_rows <= 1);
} }
else if (join->send_row_on_empty_set()) else if (join->send_row_on_empty_set())
{ {
@@ -23732,9 +23722,9 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
of the newly activated predicates is evaluated as false of the newly activated predicates is evaluated as false
(See above join->return_tab= tab). (See above join->return_tab= tab).
*/ */
join->join_examined_rows++; join->thd->inc_examined_row_count_fast();
DBUG_PRINT("counts", ("join->examined_rows++: %lu found: %d", DBUG_PRINT("counts", ("examined_rows: %llu found: %d",
(ulong) join->join_examined_rows, (int) found)); (ulonglong) join->thd->m_examined_row_count, (int) found));
if (found) if (found)
{ {
@@ -23770,7 +23760,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
The condition pushed down to the table join_tab rejects all rows The condition pushed down to the table join_tab rejects all rows
with the beginning coinciding with the current partial join. with the beginning coinciding with the current partial join.
*/ */
join->join_examined_rows++; join->thd->inc_examined_row_count_fast();
} }
join->thd->get_stmt_da()->inc_current_row_for_warning(); join->thd->get_stmt_da()->inc_current_row_for_warning();
@@ -26918,7 +26908,6 @@ create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort)
{ {
tab->records= join->select_options & OPTION_FOUND_ROWS ? tab->records= join->select_options & OPTION_FOUND_ROWS ?
file_sort->found_rows : file_sort->return_rows; file_sort->found_rows : file_sort->return_rows;
tab->join->join_examined_rows+= file_sort->examined_rows;
} }
if (quick_created) if (quick_created)

View File

@@ -1389,7 +1389,7 @@ public:
table_map eq_ref_tables; table_map eq_ref_tables;
table_map allowed_top_level_tables; table_map allowed_top_level_tables;
ha_rows send_records,found_records,join_examined_rows, accepted_rows; ha_rows send_records,found_records, accepted_rows;
/* /*
LIMIT for the JOIN operation. When not using aggregation or DISITNCT, this LIMIT for the JOIN operation. When not using aggregation or DISITNCT, this

View File

@@ -3390,11 +3390,11 @@ static my_bool processlist_callback(THD *tmp, processlist_callback_arg *arg)
arg->table->field[7]->set_notnull(); arg->table->field[7]->set_notnull();
/* INFO_BINARY */ /* INFO_BINARY */
arg->table->field[16]->store(tmp->query(), arg->table->field[17]->store(tmp->query(),
MY_MIN(PROCESS_LIST_INFO_WIDTH, MY_MIN(PROCESS_LIST_INFO_WIDTH,
tmp->query_length()), tmp->query_length()),
&my_charset_bin); &my_charset_bin);
arg->table->field[16]->set_notnull(); arg->table->field[17]->set_notnull();
} }
/* /*
@@ -3430,12 +3430,13 @@ static my_bool processlist_callback(THD *tmp, processlist_callback_arg *arg)
FALSE); FALSE);
arg->table->field[13]->store((longlong) tmp->status_var.max_local_memory_used, arg->table->field[13]->store((longlong) tmp->status_var.max_local_memory_used,
FALSE); FALSE);
arg->table->field[14]->store((longlong) tmp->get_examined_row_count(), TRUE); arg->table->field[14]->store((longlong) tmp->examined_row_count_for_statement, TRUE);
arg->table->field[15]->store((longlong) tmp->sent_row_count_for_statement, TRUE);
/* QUERY_ID */ /* QUERY_ID */
arg->table->field[15]->store(tmp->query_id, TRUE); arg->table->field[16]->store(tmp->query_id, TRUE);
arg->table->field[17]->store(tmp->os_thread_id); arg->table->field[18]->store(tmp->os_thread_id);
if (schema_table_store_record(arg->thd, arg->table)) if (schema_table_store_record(arg->thd, arg->table))
return 1; return 1;
@@ -9868,12 +9869,13 @@ ST_FIELD_INFO processlist_fields_info[]=
Column("STAGE", STiny(2), NOT_NULL, "Stage"), Column("STAGE", STiny(2), NOT_NULL, "Stage"),
Column("MAX_STAGE", STiny(2), NOT_NULL, "Max_stage"), Column("MAX_STAGE", STiny(2), NOT_NULL, "Max_stage"),
Column("PROGRESS", Decimal(703), NOT_NULL, "Progress"), Column("PROGRESS", Decimal(703), NOT_NULL, "Progress"),
Column("MEMORY_USED", SLonglong(7), NOT_NULL, "Memory_used"), Column("MEMORY_USED", SLonglong(10), NOT_NULL, "Memory_used"),
Column("MAX_MEMORY_USED",SLonglong(7), NOT_NULL, "Max_memory_used"), Column("MAX_MEMORY_USED",SLonglong(10), NOT_NULL, "Max_memory_used"),
Column("EXAMINED_ROWS", SLong(7), NOT_NULL, "Examined_rows"), Column("EXAMINED_ROWS", SLonglong(10), NOT_NULL, "Examined_rows"),
Column("QUERY_ID", SLonglong(4), NOT_NULL), Column("SENT_ROWS", SLonglong(10), NOT_NULL, "Sent_rows"),
Column("QUERY_ID", SLonglong(10), NOT_NULL),
Column("INFO_BINARY",Blob(PROCESS_LIST_INFO_WIDTH),NULLABLE, "Info_binary"), Column("INFO_BINARY",Blob(PROCESS_LIST_INFO_WIDTH),NULLABLE, "Info_binary"),
Column("TID", SLonglong(4), NOT_NULL, "Tid"), Column("TID", SLonglong(10), NOT_NULL, "Tid"),
CEnd() CEnd()
}; };

View File

@@ -2298,7 +2298,6 @@ bool st_select_lex_unit::exec_inner()
SELECT_LEX *lex_select_save= thd->lex->current_select; SELECT_LEX *lex_select_save= thd->lex->current_select;
SELECT_LEX *select_cursor=first_select(); SELECT_LEX *select_cursor=first_select();
ulonglong add_rows=0; ulonglong add_rows=0;
ha_rows examined_rows= 0;
bool first_execution= !executed; bool first_execution= !executed;
bool was_executed= executed; bool was_executed= executed;
@@ -2398,8 +2397,6 @@ bool st_select_lex_unit::exec_inner()
} }
if (likely(!saved_error)) if (likely(!saved_error))
{ {
examined_rows+= thd->get_examined_row_count();
thd->set_examined_row_count(0);
if (union_result->flush()) if (union_result->flush())
{ {
thd->lex->current_select= lex_select_save; thd->lex->current_select= lex_select_save;
@@ -2507,7 +2504,6 @@ bool st_select_lex_unit::exec_inner()
} }
else else
{ {
join->join_examined_rows= 0;
saved_error= join->reinit(); saved_error= join->reinit();
if (join->exec()) if (join->exec())
saved_error= 1; saved_error= 1;
@@ -2518,7 +2514,6 @@ bool st_select_lex_unit::exec_inner()
if (likely(!saved_error)) if (likely(!saved_error))
{ {
thd->limit_found_rows = (ulonglong)table->file->stats.records + add_rows; thd->limit_found_rows = (ulonglong)table->file->stats.records + add_rows;
thd->inc_examined_row_count(examined_rows);
} }
/* /*
Mark for slow query log if any of the union parts didn't use Mark for slow query log if any of the union parts didn't use
@@ -2564,7 +2559,6 @@ bool st_select_lex_unit::exec_recursive()
bool is_unrestricted= with_element->is_unrestricted(); bool is_unrestricted= with_element->is_unrestricted();
List_iterator_fast<TABLE_LIST> li(with_element->rec_result->rec_table_refs); List_iterator_fast<TABLE_LIST> li(with_element->rec_result->rec_table_refs);
TMP_TABLE_PARAM *tmp_table_param= &with_element->rec_result->tmp_table_param; TMP_TABLE_PARAM *tmp_table_param= &with_element->rec_result->tmp_table_param;
ha_rows examined_rows= 0;
bool was_executed= executed; bool was_executed= executed;
TABLE_LIST *rec_tbl; TABLE_LIST *rec_tbl;
@@ -2619,8 +2613,6 @@ bool st_select_lex_unit::exec_recursive()
} }
if (likely(!saved_error)) if (likely(!saved_error))
{ {
examined_rows+= thd->get_examined_row_count();
thd->set_examined_row_count(0);
if (unlikely(union_result->flush())) if (unlikely(union_result->flush()))
{ {
thd->lex->current_select= lex_select_save; thd->lex->current_select= lex_select_save;
@@ -2634,8 +2626,6 @@ bool st_select_lex_unit::exec_recursive()
} }
} }
thd->inc_examined_row_count(examined_rows);
incr_table->file->info(HA_STATUS_VARIABLE); incr_table->file->info(HA_STATUS_VARIABLE);
if (with_element->level && incr_table->file->stats.records == 0) if (with_element->level && incr_table->file->stats.records == 0)
with_element->set_as_stabilized(); with_element->set_as_stabilized();

View File

@@ -712,7 +712,6 @@ bool Sql_cmd_update::update_single_table(THD *thd)
if (!(file_sort= filesort(thd, table, &fsort, fs_tracker))) if (!(file_sort= filesort(thd, table, &fsort, fs_tracker)))
goto err; goto err;
thd->inc_examined_row_count(file_sort->examined_rows);
/* /*
Filesort has already found and selected the rows we want to update, Filesort has already found and selected the rows we want to update,
@@ -780,7 +779,7 @@ bool Sql_cmd_update::update_single_table(THD *thd)
while (likely(!(error=info.read_record())) && likely(!thd->killed)) while (likely(!(error=info.read_record())) && likely(!thd->killed))
{ {
explain->buf_tracker.on_record_read(); explain->buf_tracker.on_record_read();
thd->inc_examined_row_count(1); thd->inc_examined_row_count();
if (!select || (error= select->skip_record(thd)) > 0) if (!select || (error= select->skip_record(thd)) > 0)
{ {
if (table->file->ha_was_semi_consistent_read()) if (table->file->ha_was_semi_consistent_read())
@@ -917,7 +916,7 @@ update_begin:
while (!(error=info.read_record()) && !thd->killed) while (!(error=info.read_record()) && !thd->killed)
{ {
explain->tracker.on_record_read(); explain->tracker.on_record_read();
thd->inc_examined_row_count(1); thd->inc_examined_row_count();
if (!select || select->skip_record(thd) > 0) if (!select || select->skip_record(thd) > 0)
{ {
if (table->file->ha_was_semi_consistent_read()) if (table->file->ha_was_semi_consistent_read())
@@ -3103,5 +3102,6 @@ bool Sql_cmd_update::execute_inner(THD *thd)
delete result; delete result;
} }
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
return res; return res;
} }

View File

@@ -6485,7 +6485,7 @@ bool ha_rocksdb::should_hide_ttl_rec(const Rdb_key_def &kd,
/* increment examined row count when rows are skipped */ /* increment examined row count when rows are skipped */
THD *thd = ha_thd(); THD *thd = ha_thd();
thd->inc_examined_row_count(1); thd->inc_examined_row_count();
DEBUG_SYNC(thd, "rocksdb.ttl_rows_examined"); DEBUG_SYNC(thd, "rocksdb.ttl_rows_examined");
} }
return is_hide_ttl; return is_hide_ttl;