summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-12-18 15:21:50 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-12-18 15:21:50 +0400
commit6ee9cba74502e2da628ac72b21ce42570ff361b9 (patch)
treee66fbd85b9513035eca06662a4ad59c4bf0596bc /mysql-test/suite/perfschema
parentef9e78c9d41a5ac644f08068e3dabad948b0e30a (diff)
downloadmariadb-git-6ee9cba74502e2da628ac72b21ce42570ff361b9.tar.gz
MDEV-10486 MariaDB 10.x does not update rows_examined in performance_schema tables.
Save the rows_examined counter before it gets emptied.
Diffstat (limited to 'mysql-test/suite/perfschema')
-rw-r--r--mysql-test/suite/perfschema/r/misc.result16
-rw-r--r--mysql-test/suite/perfschema/t/misc.test15
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index 2adf2cba851..7a097a27576 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -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;
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index bf3e8afffdc..c9f7dc6bfc0 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -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;
+