Bug #51295 Build warnings in mdl.cc

Submitted: 18 Feb 2010 20:27 Modified: 10 Mar 2010 18:19
Reporter: Marc ALFF Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S2 (Serious)
Version:mysql-next-mr, 5.5.99-m3 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[18 Feb 2010 20:27] Marc ALFF
Description:
Reported privately by a customer trying mysql-next-mr.

The file mdl.cc does not build correctly, the performance schema instrumentation implemented there is incorrect.

Details:

mdl.cc: In member function ‘void MDL_map::init()’:
mdl.cc:369: warning: passing NULL to non-pointer argument 1 of ‘int
inline_mysql_mutex_init(PSI_mutex_key, mysql_mutex_t*, const
pthread_mutexattr_t*)’
mdl.cc: In constructor ‘MDL_context::MDL_context()’:
mdl.cc:563: warning: passing NULL to non-pointer argument 1 of ‘int
inline_mysql_mutex_init(PSI_mutex_key, mysql_mutex_t*, const
pthread_mutexattr_t*)’
mdl.cc:564: warning: passing NULL to non-pointer argument 1 of ‘int
inline_mysql_cond_init(PSI_cond_key, mysql_cond_t*, const
pthread_condattr_t*)’

There are 2 issues there:
- partial instrumentation should use a key of 0, not NULL
- the code should be instrumented anyway and declare keys properly.

How to repeat:
Read the compiler warnings, or better, use -Werror
[2 Mar 2010 17:04] 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/102089

3123 Marc Alff	2010-03-02
      Bug#51295 Build warnings in mdl.cc
      
      Before this fix, the performance schema instrumentation in mdl.h / mdl.cc was incomplete, causing:
      - build warnings,
      - no data collection for the performance schema
      
      This fix:
      - added instrumentation helpers for the new prefered reader read write lock, mysql_prlock_*
      - implemented completly the performance schema instrumentation of mdl.h / mdl.cc
[4 Mar 2010 14:22] Jon Olav Hauglid
Patch approved with minor comments sent by e-mail.
[4 Mar 2010 14:46] 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/102329

3127 Marc Alff	2010-03-04
      Bug#51295 Build warnings in mdl.cc
      
      Before this fix, the performance schema instrumentation
      in mdl.h / mdl.cc was incomplete, causing:
      - build warnings,
      - no data collection for the performance schema
      
      This fix:
      - added instrumentation helpers for the new preferred
        reader read write lock, mysql_prlock_*
      - implemented completely the performance schema
        instrumentation of mdl.h / mdl.cc
[7 Mar 2010 17:54] 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/102522

3124 Marc Alff	2010-03-07
      Bug#51295 Build warnings in mdl.cc
      
      Before this fix, the performance schema instrumentation
      in mdl.h / mdl.cc was incomplete, causing:
      - build warnings,
      - no data collection for the performance schema
      
      This fix:
      - added instrumentation helpers for the new preferred
        reader read write lock, mysql_prlock_*
      - implemented completely the performance schema
        instrumentation of mdl.h / mdl.cc
[7 Mar 2010 19:07] Marc ALFF
Queued in:
- mysql-next-mr-bugfixing (5.6.99-m4)
- mysql-6.0-codebase-bugfixing
[10 Mar 2010 13:37] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100310133305-0jdlngbtrkoqzckh) (version source revid:alik@sun.com-20100310132404-uqarl0o0vlra2kjx) (merge vers: 6.0.14-alpha) (pib:16)
[10 Mar 2010 13:38] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100310132634-zpyjzn346sgrm59u) (version source revid:alik@sun.com-20100310132634-zpyjzn346sgrm59u) (merge vers: 5.5.3-m3) (pib:16)
[10 Mar 2010 13:39] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100310132718-l0tegumhbg8umgjd) (version source revid:alik@sun.com-20100310132252-kpi29r22kjtl493x) (pib:16)
[10 Mar 2010 15:06] Marc ALFF
Doc team:
- fix merged in 5.5.3 and 6.0
- first P_S release, nothing to document
[10 Mar 2010 18:19] Paul DuBois
Not in any released version. No changelog entry needed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.067 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.