Bug #48636 I_S.global_status.innodb_buffer_pool_pages_total returns different values
Submitted: 9 Nov 2009 11:55 Modified: 24 Jun 2010 8:47
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.5.0 (mysql-trunk) OS:Linux
Assigned to: Vasil Dimov CPU Architecture:Any
Triage: Triaged: D3 (Medium) / R1 (None/Negligible) / E1 (None/Negligible)

[9 Nov 2009 11:55] Alexander Nozdrin
Description:
innodb.test fails sporadically on Linux because
the following statement returns different values:

SELECT variable_value
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';

Depending on the load (?) it may return 511 or 512.

Adding '--replace_result 511 512' to make the test pass
(before this patch the line had '--replace_result 8192 8191').

How to repeat:
> uname -a
Linux quad 2.6.27-15-generic #1 SMP Tue Oct 20 06:50:36 UTC 2009
x86_64 GNU/Linux

> cat /proc/cpuinfo | grep processor | wc -l
4

[mysql-test]> ./mtr --mem --parallel=5 innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb innodb

main.innodb                              w2 [ fail ]
        Test ended at 2009-11-09 14:46:36

CURRENT_TEST: main.innodb
--- /mnt/raid/alik/MySQL/bzr/00.merges/mysql-trunk-merge/mysql-test/r/innodb.result	2009-11-09 14:37:07.000000000 +0300
+++ /mnt/raid/alik/MySQL/bzr/00.merges/mysql-trunk-merge/mysql-test/r/innodb.reject	2009-11-09 14:46:36.000000000 +0300
@@ -1738,7 +1738,7 @@
 drop table t1;
 SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
 variable_value
-512
+511
 SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
 variable_value
 16384

mysqltest: Result content mismatch
[9 Nov 2009 11:57] 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/89781

2926 Alexander Nozdrin	2009-11-09
      Fix innodb.test due to Bug#48636.
[11 Nov 2009 6:52] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091110093407-rw5g8dys2baqkt67) (version source revid:alik@sun.com-20091109152008-xg8oj70lass1kd79) (merge vers: 6.0.14-alpha) (pib:13)
[11 Nov 2009 7:00] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091109115615-nuohp02h8mdrz8m2) (version source revid:alik@sun.com-20091109115615-nuohp02h8mdrz8m2) (merge vers: 5.5.0-beta) (pib:13)
[24 Jun 2010 8:47] Vasil Dimov
This has been fixed first by alik@ in late 2009 and then, when innodb.test was imported from SVN was fixed in this changeset:

------------------------------------------------------------
revno: 3008.2.82
revision-id: vasil.dimov@oracle.com-20100512091350-idbzw2ihdqlgkfch
parent: vasil.dimov@oracle.com-20100512075638-dw3iwsimxuvmfr5o
committer: Vasil Dimov <vasil.dimov@oracle.com>
branch nick: mysql-trunk-innodb
timestamp: Wed 2010-05-12 12:13:50 +0300
message:
  Fix the failing innodb.innodb test.
  
  Support returning 512 and 511 pages for the buffer pool size, this
  is undeterministic and probably depends on alignment issues.
  
  The default buffer pool size is 8M (512) pages, which is set in
  include/default_mysqld.cnf. So the previous "replace_result 8192 8191"
  had no effect.