Bug #25118 ATTRIBUTE_FORMAT_FPTR undeclared in m_ctype.h
Submitted: 17 Dec 2006 12:25 Modified: 26 Apr 2007 16:54
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.0.30 OS:Linux (Debian GNU/Linux Sid)
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: qc

[17 Dec 2006 12:25] Christian Hammers
Description:
As reported in the Debian Bug Tracking system:

It seems that there's a regression between 5.0.27 and 5.0.30 (Enterprise Edition). Some applications fail to build. The source of the problem seems to be a macro that is used in
m_ctype.h and defined in my_global.h. Including my_global.h leads to more compile errors.

How to repeat:
Attached you find a build log for mysql-admin-1.2.5rc. Further build logs are available:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403081 (mysql-admin)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403082 (mysql-query-browser)

Suggested fix:
In 5.0.27 the macro ATTRIBUTE_FORMAT_FPTR was not used in m_ctype.h...
[17 Dec 2006 12:26] Christian Hammers
Build log

Attachment: log (application/octet-stream, text), 19.68 KiB.

[20 Dec 2006 0:31] Christian Hammers
Debian's patch

Attachment: 88_mctype_attrib.dpatch (application/octet-stream, text), 1.71 KiB.

[20 Dec 2006 0:32] Christian Hammers
I've added the patch I've received from a Debian user. It seems to work at least for our current compiler version.

bye,

-christian-
[11 Apr 2007 18:18] Magnus Blåudd
I would suggest extracting those ATRIBUTE_FORMAT* macros into include/my_attribute.h and then include that file from both m_ctype.h and my_global.h
[11 Apr 2007 22:43] 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/24337

ChangeSet@1.2447, 2007-04-12 00:43:25+02:00, msvensson@pilot.blaudden +5 -0
  Bug#25118 ATTRIBUTE_FORMAT_FPTR undeclared in m_ctype.h
   - Move marcos for __attribute__ usage to my_attribute.h and
     include that file where needed
[26 Apr 2007 11:36] Bugs System
Pushed into 5.1.18-beta
[26 Apr 2007 11:37] Bugs System
Pushed into 5.0.42
[26 Apr 2007 16:54] Paul DuBois
No changelog entry needed.
[19 Jan 2009 12:32] 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/63539

2748 Serge Kozlov	2009-01-19
      Bug#25118:
      1. Added waiting proper state of slave for start/stop commands
      2. Fixed wrong name of binlog file.
      3. Updated result file.