Bug #49130 Running mtr tests with valgrind and debug produces lots of warnings
Submitted: 26 Nov 2009 10:16 Modified: 7 Mar 2010 1:31
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Tor Didriksen CPU Architecture:Any

[26 Nov 2009 10:16] Tor Didriksen
Description:
./mtr --valgrind-mysqld --debug --force --suite=main
produces lots of warnings, and even some core dumps

Some places we use '%s' rather than '%*.s'
Other places we use '%g' which is not implemented
(and thus produces undefined behaviour, e.g. coredump)

How to repeat:
./mtr --valgrind-mysqld --debug --force --suite=main
[1 Dec 2009 11:55] 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/92259

2910 Tor Didriksen	2009-12-01
      Bug #49130 Running mtr tests with valgrind and debug produces lots of warnings
      
      Use safe output formats for strings that are not null terminated.
     @ sql/item_func.cc
        Use c_ptr_safe() when outputting String.
     @ sql/protocol.cc
        Use "%*.s" rather than "%s" format.
     @ sql/sql_test.cc
        Improve output from print_where()
         - output (nil) predicate if predicate is null
         - also output pointer value, for tracing of assignment and copying of predicates
     @ sql/sql_view.cc
        Use "%*.s" rather than "%s" format.
[1 Dec 2009 13:47] Guilhem Bichot
approved with comments sent by mail
[2 Dec 2009 7:41] 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/92386

2913 Tor Didriksen	2009-12-02
      Bug #49130 Running mtr tests with valgrind and debug produces lots of warnings
      
      Use safe output formats for strings that are not null terminated.
     @ sql/item_func.cc
        Use c_ptr_safe() when outputting String.
     @ sql/protocol.cc
        Use "%*.s" rather than "%s" format.
     @ sql/sql_test.cc
        Improve output from print_where()
         - output (nil) predicate if predicate is null
         - also output pointer value, for tracing of assignment and copying of predicates
     @ sql/sql_view.cc
        Use "%*.s" rather than "%s" format.
[2 Dec 2009 10:01] 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/92417

2913 Tor Didriksen	2009-12-02
      Bug #49130 Running mtr tests with valgrind and debug produces lots of warnings
      
      Use safe output formats for strings that are not null terminated.
     @ sql/item_func.cc
        Use "%*.s" rather than "%s" format.
     @ sql/protocol.cc
        Use "%*.s" rather than "%s" format.
     @ sql/sql_test.cc
        Improve output from print_where()
         - output (nil) predicate if predicate is null
         - also output pointer value, for tracing of assignment and copying of predicates
     @ sql/sql_view.cc
        Use "%*.s" rather than "%s" format.
[2 Dec 2009 15:06] Tor Didriksen
pushed to
bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-next-mr-bugfixing
bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-6.0-codebase-bugfixing/
[11 Dec 2009 6:01] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091211055901-yp18b3c7xuhl87rf) (version source revid:alik@sun.com-20091211055401-43rjwq7gjed6ds83) (merge vers: 6.0.14-alpha) (pib:13)
[11 Dec 2009 6:04] Bugs System
Pushed into 5.6.0-beta (revid:alik@sun.com-20091211055628-ltr7fero363uev7r) (version source revid:alik@sun.com-20091211055453-717czhtezc74u8db) (merge vers: 5.6.0-beta) (pib:13)
[15 Dec 2009 3:22] Paul DuBois
Noted in 5.6.0, 6.0.14 changelogs.

Valgrind warnings for several logging messages were corrected.
[6 Mar 2010 11:09] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20091211201717-03qf8ckwiw0np80p) (merge vers: 5.6.0-beta) (pib:16)
[7 Mar 2010 1:31] Paul DuBois
Move 5.6.0 changelog entry to 5.5.3.