Bug #42120 mysql-connector-odbc fails to build with mysql 5.1.30 because of "bool" breakage
Submitted: 14 Jan 2009 22:04 Modified: 28 Jan 2009 13:52
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1.5r1144 OS:Any
Assigned to: Tony Bedford CPU Architecture:Any

[14 Jan 2009 22:04] [ name withheld ]
The mysql 5.1.30 headers intentionally break usage of "bool" by #define'ing it as something that causes a syntax error.  I'm fairly dubious that that's a good plan to begin with, but if you're going to do that you ought to make your own client software deal with it ... there are half a dozen uses of plain bool in the myodbc sources.

How to repeat:
1. Install mysql 5.1.30

2. Try to compile mysql-connector-odbc

Suggested fix:
Either take out that #define or change bool to my_bool everywhere in myodbc.
[15 Jan 2009 8:29] Tonci Grgin
Thanks for your report.

I believe this problem is already fixed:
revno: 806
committer: Jess Balint <jbalint@mysql.com>
branch nick: odbc51_merge
timestamp: Tue 2008-10-28 13:52:50 -0500
  use my_bool instead of bool to comply with MySQL 5.1 headers

Now I'm wondering what sources do you use and about other little info missing from this report... My "bzr log" shows rev. 822 as the last one, how come you have r1144?
Officially, c/ODBC 5.1 is built against MySQL server 5.0.67 libraries so you might wish to rebuild with latest c/ODBC sources against both server versions.
[15 Jan 2009 14:39] [ name withheld ]
I'm using the currently released sources available from the bottom of this page:

What else should I be using?  If there isn't an official release that works with mysql 5.1, why not?
[15 Jan 2009 16:21] Tonci Grgin
Hi. Sources are hosted in Launchpad, namely http://bazaar.launchpad.net/~myodbc-developers/myodbc/5.1/
[15 Jan 2009 16:28] [ name withheld ]
Thanks, but I'm looking for the latest released version, not the bleeding-edge development tip.  Maybe I should explain that I'm trying to package this for Fedora, and distro policy encourages use of stable upstream releases.
[15 Jan 2009 18:09] Jess Balint
This is fixed in the 5.1.6 tree and will be included in the next release.
[15 Jan 2009 19:30] Tonci Grgin
I still fail to see what do you think we're doing wrong? Your particular problem *is* solved but not released yet. So, as Jess already confirmed, it will be in next release.
Revision mismatch is probably due to SVN -> BZR switch. Tony please fix this if you can.
[15 Jan 2009 19:45] [ name withheld ]
The only thing wrong is that the released version of myodbc still doesn't build against mysql 5.1, two months after 5.1 went GA.  I'd have expected somebody to test the combination long ago ...

Anyway, that's water over the dam, and you might as well close this as "fixed in SCM".  (And get on with pushing 5.1.6 out the door ;-))
[28 Jan 2009 13:52] Tony Bedford
An entry was added to the 5.1.6 changelog:

Connector/ODBC failed to build with MySQL 5.1.30 due to incorrect use of the data type bool.