Bug #7134 "heap" test fails to pass
Submitted: 9 Dec 2004 16:32 Modified: 29 Sep 2008 20:56
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0-current OS:Linux (Linux/ppc)
Assigned to: Sergey Petrunya CPU Architecture:Any

[9 Dec 2004 16:32] Lenz Grimmer
Description:
Last ChangeSet in tree:

ChangeSet@1.1720.1.1, 2004-12-09 04:22:28+03:00, petr@mysql.com
  merge

The tree was compiled on Linux/ppc (Debian 3.1) with BUILD/compile-ppc-debug

The "heap" test fails with the following diff:

TEST                            RESULT
-------------------------------------------------------
heap                           [ fail ]

Errors are (from /home/lenz/my/mysql-5.0-build/mysql-test/var/log/mysqltest-time) :
/home/lenz/my/mysql-5.0-build/client/.libs/mysqltest: At line 407: Result length mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/heap.result       Wed Dec  8 14:13:21 2004
--- r/heap.reject       Thu Dec  9 19:29:15 2004
***************
*** 622,628 ****
  *a         *a*a         *
  explain select * from t1 where v='a';
  id    select_type     table   type    possible_keys   key     key_len ref     rows    Extra
! 1     SIMPLE  t1      ref     v       v       13      const   7       Using where
  drop table t1;
  create table t1 (a char(10), unique using btree (a)) engine=heap;
  insert into t1 values ('a');
--- 622,628 ----
  *a         *a*a         *
  explain select * from t1 where v='a';
  id    select_type     table   type    possible_keys   key     key_len ref     rows    Extra
! 1     SIMPLE  t1      ref     v       v       13      const   14      Using where
  drop table t1;
  create table t1 (a char(10), unique using btree (a)) engine=heap;
  insert into t1 values ('a');
-------------------------------------------------------
Please follow the instructions outlined at
http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html
to find the reason to this problem and how to report this.

How to repeat:
Run the "heap" test on Linux/ppc
[9 Dec 2004 16:38] Lenz Grimmer
Tarball inlcuding the master.{log,err,trace} files

Attachment: logs.tar.bz2 (application/x-bzip2, text), 200.26 KiB.

[9 Dec 2004 17:58] Sergei Golubchik
Sergey, I think it's normal (something is different on ppc and you get different number of buckets for cardinality estimations). Could you check it (and add --replace-result 14 7 if it is the case) ?
[12 Dec 2004 18:08] Sergey Petrunya
Happens on x86 too. 
heap.test passes if I run it with --debug, and fails without --debug. 
More, adding printf calls can make the test pass without --debug.
With --debug the tree built seems not to be a valid R-B tree. (test_rb_tree doesn't bark though)
[14 Dec 2004 8:22] Sergey Petrunya
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[14 Dec 2004 8:23] Sergey Petrunya
Was changing a wrong bug
[28 Jan 2005 14:05] Sergey Petrunya
The problem doesn't affect the query results. Changing to "To be fixed later"
[28 Jan 2005 14:06] Sergey Petrunya
And tests pass now because of --replace-column added by Monty
[29 Sep 2008 20:56] Konstantin Osipov
Not relevant any more.