Bug #37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust
Submitted: 10 Jun 2008 15:19 Modified: 21 Jun 2010 0:59
Reporter: Vasil Dimov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[10 Jun 2008 15:19] Vasil Dimov
Description:
binlog_row_innodb_stat and binlog_stm_innodb_stat mysql-tests expect the output from:

  show status like "Innodb_buffer_pool_pages_total";

to be

  Innodb_buffer_pool_pages_total	512

but for the InnoDB Plugin the number is 511 without this being a bug. The tests should not fail if something else than 512 is printed, this could change in the builtin InnoDB too.

How to repeat:
Run the above tests with the InnoDB Plugin and observe the failures.

Suggested fix:
Support either 511 or 512 in the output, here is a patch:

--- patch begins here ---
--- mysql-test/extra/binlog_tests/innodb_stat.test.orig	2008-06-10 15:12:02.000000000 +0300
+++ mysql-test/extra/binlog_tests/innodb_stat.test	2008-06-10 15:12:06.000000000 +0300
@@ -41,6 +41,7 @@
 
 # Test for testable InnoDB status variables. This test
 # uses previous ones(pages_created, rows_deleted, ...).
+-- replace_regex /51[12]/51_/
 show status like "Innodb_buffer_pool_pages_total";
 show status like "Innodb_page_size";
 show status like "Innodb_rows_deleted";
--- mysql-test/suite/binlog/r/binlog_row_innodb_stat.result.orig	2008-06-10 15:29:44.000000000 +0300
+++ mysql-test/suite/binlog/r/binlog_row_innodb_stat.result	2008-06-10 15:30:04.000000000 +0300
@@ -24,7 +24,7 @@
 drop table t1;
 show status like "Innodb_buffer_pool_pages_total";
 Variable_name	Value
-Innodb_buffer_pool_pages_total	512
+Innodb_buffer_pool_pages_total	51_
 show status like "Innodb_page_size";
 Variable_name	Value
 Innodb_page_size	16384
--- mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result.orig	2008-06-10 15:33:43.000000000 +0300
+++ mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result	2008-06-10 15:33:55.000000000 +0300
@@ -24,7 +24,7 @@
 drop table t1;
 show status like "Innodb_buffer_pool_pages_total";
 Variable_name	Value
-Innodb_buffer_pool_pages_total	512
+Innodb_buffer_pool_pages_total	51_
 show status like "Innodb_page_size";
 Variable_name	Value
 Innodb_page_size	16384
--- patch ends here ---
[10 Jun 2008 15:20] Vasil Dimov
patch

Attachment: patch (application/octet-stream, text), 1.36 KiB.

[10 Jun 2008 15:27] Vasil Dimov
Probably it makes sense to remove this whole Innodb_buffer_pool_pages_total inspection, e.g. delete the line that does show status like 'Innodb_buffer_pool_pages_total'; and the correspoding lines in the results.
[10 Jun 2008 20:42] Sveta Smirnova
Thank you for the report.

Verified as described using code analysis.
[3 Sep 2008 14:30] Chad MILLER
There is still an error:

$ ./mtr binlog_row_innodb_stat 

binlog.binlog_row_innodb_stat 'row' [ pass ]           1317
binlog.binlog_row_innodb_stat 'stmt' [ fail ]

--- /home/cmiller/work/mysqlbzr/mysql-6.0-bugteam/mysql-test/suite/binlog/r/binlog_row_innodb_stat.result       2008-09-03 17:27:26.000000000 +0300
+++ /home/cmiller/work/mysqlbzr/mysql-6.0-bugteam/mysql-test/suite/binlog/r/binlog_row_innodb_stat.reject       2008-09-03 17:29:17.000000000 +0300
@@ -1,36 +1,36 @@
 show status like "binlog_cache_use";
 Variable_name  Value
-Binlog_cache_use       0
+Binlog_cache_use       2
 show status like "binlog_cache_disk_use";
 Variable_name  Value
-Binlog_cache_disk_use  0
+Binlog_cache_disk_use  1
 drop table if exists t1;
 create table t1 (a int) engine=innodb;
 show status like "binlog_cache_use";
 Variable_name  Value
-Binlog_cache_use       1
+Binlog_cache_use       3
 show status like "binlog_cache_disk_use";
 Variable_name  Value
-Binlog_cache_disk_use  1
+Binlog_cache_disk_use  2
 begin;
 delete from t1;
 commit;
 show status like "binlog_cache_use";
 Variable_name  Value
-Binlog_cache_use       2
+Binlog_cache_use       4
 show status like "binlog_cache_disk_use";
 Variable_name  Value
-Binlog_cache_disk_use  1
+Binlog_cache_disk_use  2
 drop table t1;
 show status like "Innodb_page_size";
 Variable_name  Value
 Innodb_page_size       16384
 show status like "Innodb_rows_deleted";
 Variable_name  Value
-Innodb_rows_deleted    2000
+Innodb_rows_deleted    4000
 show status like "Innodb_rows_inserted";
 Variable_name  Value
-Innodb_rows_inserted   2000
+Innodb_rows_inserted   4000
 show status like "Innodb_rows_updated";
 Variable_name  Value
 Innodb_rows_updated    0
[3 Sep 2008 14:31] Chad MILLER
That last result confirmed on OSX and Linux.
[8 Sep 2008 20:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/53549

2733 Chad MILLER	2008-09-08
      Bug#37312: Make test binlog_{row,stm}_innodb_stat more robust
      
      The size of the Innodb_buffer_pool_pages differs by one byte on row versus statement
      log, so neuter the last position of the stringified decimal representation.  Innobase
      says the size isn't very important in any case.
      
      Also, split out the "mixed" format to its own file, as mtr seems to dislike having only 
      stm and row but not mix.
[8 Sep 2008 23:20] Patrick Crews
Ok to push.
[18 Sep 2008 7:41] Chad MILLER
Reviewed over my shoulder in Riga/Latvija.
[18 Sep 2008 7:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54270

2741 Chad MILLER	2008-09-18 [merge]
      Merge Bug#37312.
[18 Sep 2008 8:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54271

2818 Chad MILLER	2008-09-18 [merge]
      Merge Bug#37312.
[18 Sep 2008 8:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54272

2818 Chad MILLER	2008-09-18 [merge]
      Merge Bug#37312.
[18 Sep 2008 8:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54273

2741 Chad MILLER	2008-09-18 [merge]
      Merge Bug#37312.
[18 Sep 2008 12:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54290
[18 Sep 2008 13:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54300
[22 Sep 2008 19:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54460

2744 Patrick Crews	2008-09-22
      Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust
      
      Trimmed some error-prone and variable portions of the test and added 'flush status' to ensure deterministic test
[22 Sep 2008 19:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54461

2821 Patrick Crews	2008-09-22 [merge]
      Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust
      
      Upmerge 5.1-> 6.0
[22 Sep 2008 19:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54462

2821 Patrick Crews	2008-09-22 [merge]
      Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust
      
      Upmerge 5.1-> 6.0
[9 Oct 2008 18:08] Bugs System
Pushed into 5.1.30  (revid:msvensson@mysql.com-20080922090300-g502675tuw4ytn33) (version source revid:kpettersson@mysql.com-20080925170846-pq6nrweqvm2yfiym) (pib:4)
[15 Oct 2008 15:05] Paul DuBois
This is actually pushed to 5.1.29, not 5.1.30.
[15 Oct 2008 17:32] Paul DuBois
Test case changes. No changelog entry needed.

Setting report to NDI pending push into 6.0.x.
[17 Oct 2008 16:45] Bugs System
Pushed into 6.0.8-alpha  (revid:msvensson@mysql.com-20080922090300-g502675tuw4ytn33) (version source revid:mattias.jonsson@sun.com-20080923130815-s8m77qazkowf0oc0) (pib:5)
[17 Oct 2008 17:34] Paul DuBois
No changelog entry needed.
[28 Oct 2008 21:04] Bugs System
Pushed into 5.1.29-ndb-6.2.17  (revid:msvensson@mysql.com-20080922090300-g502675tuw4ytn33) (version source revid:tomas.ulin@sun.com-20081028140209-u4emkk1xphi5tkfb) (pib:5)
[28 Oct 2008 22:23] Bugs System
Pushed into 5.1.29-ndb-6.3.19  (revid:msvensson@mysql.com-20080922090300-g502675tuw4ytn33) (version source revid:tomas.ulin@sun.com-20081028194045-0353yg8cvd2c7dd1) (pib:5)
[1 Nov 2008 9:49] Bugs System
Pushed into 5.1.29-ndb-6.4.0  (revid:msvensson@mysql.com-20080922090300-g502675tuw4ytn33) (version source revid:jonas@mysql.com-20081101082305-qx5a1bj0z7i8ueys) (pib:5)
[5 May 2010 15:19] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 15:53] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[28 May 2010 5:50] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:19] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:47] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 2:55] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[15 Jun 2010 8:17] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100615080459-smuswd9ooeywcxuc) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (merge vers: 5.1.47) (pib:16)
[15 Jun 2010 8:34] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615080558-cw01bzdqr1bdmmec) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (pib:16)
[17 Jun 2010 11:49] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:27] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:14] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)