mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-10486 MariaDB 10.x does not update rows_examined in performance_schema tables.
Save the rows_examined counter before it gets emptied.
This commit is contained in:
parent
ef9e78c9d4
commit
6ee9cba745
3 changed files with 34 additions and 2 deletions
|
@ -118,3 +118,19 @@ B
|
|||
select count(*) from events_statements_history where sql_text like "%...";
|
||||
count(*)
|
||||
2
|
||||
use test;
|
||||
create table t1 (id int);
|
||||
insert into t1 values (1), (2), (3);
|
||||
truncate performance_schema.events_statements_history;
|
||||
select * from t1;
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
insert into t1 select RAND()*10000 from t1;
|
||||
select sql_text, rows_examined from performance_schema.events_statements_history;
|
||||
sql_text rows_examined
|
||||
truncate performance_schema.events_statements_history 0
|
||||
select * from t1 3
|
||||
insert into t1 select RAND()*10000 from t1 6
|
||||
drop table t1;
|
||||
|
|
|
@ -207,3 +207,18 @@ select 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|||
select _utf8mb4 'ваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑ' as B;
|
||||
|
||||
select count(*) from events_statements_history where sql_text like "%...";
|
||||
|
||||
|
||||
#
|
||||
# MDEV-10486 MariaDB 10.x does not update rows_examined in performance_schema tables
|
||||
# Verify that the rows_examined counter is set properly.
|
||||
|
||||
use test;
|
||||
create table t1 (id int);
|
||||
insert into t1 values (1), (2), (3);
|
||||
truncate performance_schema.events_statements_history;
|
||||
select * from t1;
|
||||
insert into t1 select RAND()*10000 from t1;
|
||||
select sql_text, rows_examined from performance_schema.events_statements_history;
|
||||
drop table t1;
|
||||
|
||||
|
|
|
@ -1957,11 +1957,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
|
||||
THD_STAGE_INFO(thd, stage_cleaning_up);
|
||||
thd->reset_query();
|
||||
thd->set_examined_row_count(0); // For processlist
|
||||
thd->set_command(COM_SLEEP);
|
||||
|
||||
/* Performance Schema Interface instrumentation, end */
|
||||
MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
|
||||
thd->set_examined_row_count(0); // For processlist
|
||||
thd->set_command(COM_SLEEP);
|
||||
|
||||
thd->m_statement_psi= NULL;
|
||||
thd->m_digest= NULL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue