Bug #21217 "mysqltest" client is inconsistent when to log a line number
Submitted: 21 Jul 2006 16:11 Modified: 3 Aug 2006 17:08
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:all OS:Any (all)
Assigned to: Magnus Blåudd CPU Architecture:Any

[21 Jul 2006 16:11] Joerg Bruehe
When running the test suite, the "mysqltest" client will write differences between the expected and the actual result to the test log.

Sometimes, this writing will contain the line number, and sometimes it will not, and I have not discovered any rule controlling this.

As an example, take version 4.1.21 on Windows (win2003-x86) and test "mysqldump":
In almost all builds, the line will be
   mysqltest: Result length mismatch
but in the "classic" build, it is
   mysqltest: At line 1: Result length mismatch

Same effect in tests "cast", "fulltext" (all Windows as described above),

"func_misc" (embedded: only s390 will give the line number),

"func_misc", "heap_auto_increment", "innodb" on a case-insensitive file system:
   -mysqltest: Result length mismatch
   +mysqltest: At line NNN: Result length mismatch
   -osx-imac-x86-4.1-standard.log   embedded
   +osx-tiger-ppc-4.1-standard.log   embedded
   +osx-tiger-ppc-64bit-4.1-standard.log   embedded
   +powermacg5-4.1-standard.log   embedded

"myisam" on aix52-64bit (no line number in "normal" run, but given in "ps-protocol" run, for all products),

and many other tests.

How to repeat:
Run a failing test on several platforms,
in several products,
or using both protocols
and compare the files.

The cited examples will be archived with the 4.1.21 release build.
[27 Jul 2006 15:38] Joerg Bruehe
I checked saved test failure reports, and I could not yet find an occurrence in 5.0 or 5.1 builds, only in 4.1.

I will check again with the next 5.0 build series.
[31 Jul 2006 8:39] Magnus Blåudd
Ok, 5.0++ has a little different logic for this.

But I found that the variable "start_lineno" probably should be initialized to zero in initializer and also a quick backport from 5.0, setting "start_lineno" back to 0 before diffing the result file. Hope this helps.
[31 Jul 2006 8:42] 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:


ChangeSet@1.2471, 2006-07-30 19:30:20+02:00, msvensson@shellback.(none) +1 -0
  BUG#21217 "mysqltest" client is inconsistent when to log a line number
   - Init start_lineno to 0
[3 Aug 2006 8:56] Magnus Blåudd
Pushed to 5.1.12, 5.0 and 4.1 a fix that initalizes the variable start_lineno to 0 in initializer. Not much to document I guess.
[3 Aug 2006 17:08] Paul DuBois
No changelog entry needed.