commit:     7b6db3c69be46456e84788a875bc7fb8eb09e16f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 00:06:46 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 00:24:35 2018 +0000
URL:        https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=7b6db3c6

Add patch to fix monitor.test in MySQL 5.6

Bug: https://bugs.gentoo.org/645838

 20031_all_mysql-5.6-fix-monitor.test.patch | 129 +++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)

diff --git a/20031_all_mysql-5.6-fix-monitor.test.patch 
b/20031_all_mysql-5.6-fix-monitor.test.patch
new file mode 100644
index 0000000..14825ff
--- /dev/null
+++ b/20031_all_mysql-5.6-fix-monitor.test.patch
@@ -0,0 +1,129 @@
+From 
https://github.com/MariaDB/server/commit/07977c13e71a9fc4a7695facff5fac9d7ff1e870
+From: Monty <mo...@mariadb.org>
+Date: Tue, 5 Sep 2017 16:24:29 +0300
+Subject: [PATCH] Fixed monitor.test to handle statistics >= 10
+
+Bug: https://bugs.gentoo.org/645838
+---
+ mysql-test/suite/innodb/r/monitor.result | 30 +++++++++++++++---------------
+ mysql-test/suite/innodb/t/monitor.test   | 18 ++++++------------
+ 2 files changed, 21 insertions(+), 27 deletions(-)
+
+diff --git a/mysql-test/suite/innodb/r/monitor.result 
b/mysql-test/suite/innodb/r/monitor.result
+index 33a09a553b98..2700479e7f73 100644
+--- a/mysql-test/suite/innodb/r/monitor.result
++++ b/mysql-test/suite/innodb/r/monitor.result
+@@ -622,46 +622,46 @@ set global innodb_monitor_reset_all = default;
+ # MONITORS
+ #
+ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+-NAME  COUNT
++NAME  COUNT > 0
+ buffer_page_written_index_leaf        0
+ SET GLOBAL innodb_monitor_enable='module_buffer_page';
+ INSERT INTO t1 VALUES (1), (2), (3), (4);
+ FLUSH TABLES t1 FOR EXPORT;
+ UNLOCK TABLES;
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+-NAME  COUNT
+-buffer_page_written_index_leaf        NNNN
++NAME  COUNT > 0
++buffer_page_written_index_leaf        1
+ SET GLOBAL innodb_monitor_disable='module_buffer_page';
+ SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+-NAME  COUNT
++NAME  COUNT > 0
+ buffer_page_written_index_leaf        0
+ SET GLOBAL innodb_monitor_enable='%';
+ INSERT INTO t1 VALUES (5), (6), (7), (8);
+ FLUSH TABLES t1 FOR EXPORT;
+ UNLOCK TABLES;
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+-NAME  COUNT
+-buffer_page_written_index_leaf        NNNN
++NAME  COUNT > 0
++buffer_page_written_index_leaf        1
+ SET GLOBAL innodb_monitor_disable='%';
+ SET GLOBAL innodb_monitor_reset_all='%';
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+-NAME  COUNT
++NAME  COUNT > 0
+ buffer_page_written_index_leaf        0
+ SET GLOBAL innodb_monitor_enable='ALL';
+ INSERT INTO t1 VALUES (9), (10), (11), (12);
+ FLUSH TABLES t1 FOR EXPORT;
+ UNLOCK TABLES;
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+-NAME  COUNT
+-buffer_page_written_index_leaf        NNNN
++NAME  COUNT > 0
++buffer_page_written_index_leaf        1
+ SET GLOBAL innodb_monitor_enable=default;
+ SET GLOBAL innodb_monitor_disable=default;
+ SET GLOBAL innodb_monitor_reset_all=default;
+diff --git a/mysql-test/suite/innodb/t/monitor.test 
b/mysql-test/suite/innodb/t/monitor.test
+index 98aa4505e341..dfae93694bff 100644
+--- a/mysql-test/suite/innodb/t/monitor.test
++++ b/mysql-test/suite/innodb/t/monitor.test
+@@ -391,41 +391,35 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+ 
+ let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`;
+ 
+---replace_regex /[1-9]/NNNN/
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+ 
+ SET GLOBAL innodb_monitor_enable='module_buffer_page';
+ INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT;
+ UNLOCK TABLES;
+---replace_regex /[1-9]/NNNN/
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+ 
+ SET GLOBAL innodb_monitor_disable='module_buffer_page';
+ SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
+---replace_regex /[1-9]/NNNN/
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+ 
+ SET GLOBAL innodb_monitor_enable='%';
+ INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT;
+ UNLOCK TABLES;
+---replace_regex /[1-9]/NNNN/
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+ 
+ SET GLOBAL innodb_monitor_disable='%';
+ SET GLOBAL innodb_monitor_reset_all='%';
+---replace_regex /[1-9]/NNNN/
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+ 
+ SET GLOBAL innodb_monitor_enable='ALL';
+ INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT;
+ UNLOCK TABLES;
+---replace_regex /[1-9]/NNNN/
+-SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
++SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+ LIKE 'buffer_page_written_index_leaf';
+ 
+ --disable_warnings

Reply via email to