Bug #40546 Debug server in RPM is built with compiler optimization
Submitted: 6 Nov 2008 11:34 Modified: 6 Nov 2008 17:46
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.0, 5.1, 6.0 OS:Linux (RPM, all CPUs)
Assigned to: Joerg Bruehe CPU Architecture:Any

[6 Nov 2008 11:34] Joerg Bruehe
Description:
The spec files which control the RPM builds use CFLAGS and CXXFLAGS from the environment.

Currently, these flags are used identical for both the debug and the optimized server, so even the debug server is compiled with optimization.

1) This deviates from our tar.gz packages, which contain a debug server compiled without optimization.

2) We had crashes with the debug server in RPM builds which did not happen in a test build where optimization was switched off (bug#38095 and bug#40379).

Because of this positive effect, version 5.0.72 will contain these RPM packages whose debug server is compiled without optimization.

So we should change the RPM spec files permanently and compile the debug server without optimization.

How to repeat:
See description.

Suggested fix:
When compiling the debug server, remove all optimization flags from the CFLAGS and CXXFLAGS variables. See the tar.gz build tools for which flags to change.

Ensure this is temporary only, it must not affect the optimized server built later.
[6 Nov 2008 15:25] 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/58034

2704 Joerg Bruehe	2008-11-06
      Bug #40546  Debug server in RPM is built with compiler optimization
      
      Prevent this by modifying CFLAGS and CXXFLAGS.
[6 Nov 2008 16:10] 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/58043

2771 Joerg Bruehe	2008-11-06 [merge]
      Bug #40546  Debug server in RPM is built with compiler optimization
      
      Prevent this by modifying CFLAGS and CXXFLAGS.
      
      Upmerge from 5.0, modified according to the different spec file structure.
[6 Nov 2008 16: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/58051

2772 Joerg Bruehe	2008-11-06 [merge]
      Merge main 5.1 and the 5.1 version of the fix for bug#40546
[6 Nov 2008 16:40] Bugs System
Pushed into 5.1.30  (revid:joerg@mysql.com-20081106163033-w2ii57qve93u0r7e) (version source revid:joerg@mysql.com-20081106163033-w2ii57qve93u0r7e) (pib:5)
[6 Nov 2008 16:42] Bugs System
Pushed into 6.0.9-alpha  (revid:joerg@mysql.com-20081106160914-atlfofqa560561ed) (version source revid:joerg@mysql.com-20081106161804-aycyai3q91ua484n) (pib:5)
[6 Nov 2008 16: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/58060

2705 Joerg Bruehe	2008-11-06 [merge]
      Merge current 5.0 main tree and fix for bug#40546
[6 Nov 2008 16:46] Bugs System
Pushed into 5.0.74  (revid:joerg@mysql.com-20081106164204-4sbq0eoq1w62y10y) (version source revid:joerg@mysql.com-20081106164204-4sbq0eoq1w62y10y) (pib:5)
[6 Nov 2008 17:04] Joerg Bruehe
All changes available in the main trees.

The change will take effect for 5.0.74, 5.1.30, and 6.0.9.
A similar fix is applied to the 5.0.72 packages already.
[6 Nov 2008 17:46] Paul DuBois
No changelog entry needed.
[7 Nov 2008 17:39] 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/58211

2705 Joerg Bruehe	2008-11-07
      "spec" file for RPM builds:
      Fix yesterday's patch so that it also works for the last flag.
      Still part of the fix for bug#40546.
[7 Nov 2008 18:12] 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/58216

2772 Joerg Bruehe	2008-11-07 [merge]
      Upmerge the second fix for bug#40546 from 5.0 to 5.1
      and fix a defect specific to 5.1 (wrong quoting).
[7 Nov 2008 18:23] 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/58217

2702 Joerg Bruehe	2008-11-07 [merge]
      Upmerge the second fix for bug#40546 from 5.1 to 6.0
[7 Nov 2008 19:10] 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/58219

2774 Joerg Bruehe	2008-11-07 [merge]
      Merge second fix for bug#40546 to the 5.1.30 tree.
[7 Nov 2008 19:39] Bugs System
Pushed into 6.0.9-alpha  (revid:joerg@mysql.com-20081107181930-ph8hbglabx1y26v7) (version source revid:joerg@mysql.com-20081107181930-ph8hbglabx1y26v7) (pib:5)
[10 Nov 2008 10:53] Bugs System
Pushed into 6.0.9-alpha  (revid:joerg@mysql.com-20081106164204-4sbq0eoq1w62y10y) (version source revid:kgeorge@mysql.com-20081106190503-lx2wkduzs1igte9q) (pib:5)
[10 Nov 2008 11:36] Bugs System
Pushed into 5.1.31  (revid:joerg@mysql.com-20081106164204-4sbq0eoq1w62y10y) (version source revid:kgeorge@mysql.com-20081106190051-5lgbnrion3xsyxqk) (pib:5)
[21 Nov 2008 21:01] Bugs System
Pushed into 5.1.30-ndb-6.2.17  (revid:joerg@mysql.com-20081107190837-n25sfs17j3tjz7rw) (version source revid:tomas.ulin@sun.com-20081121161314-jhz3twf5xjt8stnh) (pib:5)
[21 Nov 2008 23:45] Bugs System
Pushed into 5.1.30-ndb-6.3.20  (revid:joerg@mysql.com-20081107190837-n25sfs17j3tjz7rw) (version source revid:tomas.ulin@sun.com-20081121210644-zas6e9wa5kuj7d6f) (pib:5)
[27 Nov 2008 14:52] Bugs System
Pushed into 5.1.30-ndb-6.4.0  (revid:joerg@mysql.com-20081107190837-n25sfs17j3tjz7rw) (version source revid:tomas.ulin@sun.com-20081126125835-5sohkzk2jjwpq1wp) (pib:5)
[12 Dec 2008 23:25] Bugs System
Pushed into 6.0.9-alpha  (revid:joerg@mysql.com-20081107190837-n25sfs17j3tjz7rw) (version source revid:tomas.ulin@sun.com-20081209185954-9svcixh2p5hsfi6w) (pib:5)
[28 Dec 2008 21:46] Bugs System
Pushed into 5.1.31 (revid:joerg@mysql.com-20081228151808-aou2s7esrmastj3e) (version source revid:bteam@astra04-20081126230210-d08cnsctdfsvfag8) (merge vers: 5.1.31) (pib:6)
[19 Jan 2009 11:23] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:01] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:07] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)
[5 May 2009 18:52] Bugs System
Pushed into 5.0.82 (revid:davi.arnaut@sun.com-20090505184158-dvmedh8n472y8np5) (version source revid:davi.arnaut@sun.com-20090505184158-dvmedh8n472y8np5) (merge vers: 5.0.82) (pib:6)