Bug #21253 NdbApi.h should not include my_config.h
Submitted: 24 Jul 2006 15:32 Modified: 2 Nov 2006 14:14
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Stewart Smith CPU Architecture:Any
Tags: cluster ndbapi autoconf

[24 Jul 2006 15:32] Hartmut Holzgraefe
Description:
When using autoconf/autotools for NDBAPI projects i always see compiler warnings like:

  In file included from [...] storage/ndb/ndb_types.h:25,
                   from [...] storage/ndb/ndbapi/ndb_cluster_connection.hpp:20,
                   from [...] storage/ndb/ndbapi/NdbApi.hpp:21,
                   from example.cpp:12:
  [...]my_config.h:994:1: warning: "PACKAGE" redefined
  In file included from example.cpp:10:
  config.h:38:1: warning: this is the location of the previous definition

Obviously the two autotools generated config.h files collide here. 
As i built MySQL from sources on the same box the only conflicts here
are the PACKAGE* and VERSION definitions, but i'm pretty sure that when
using official MySQL packages there'll be more conflicting definitions.

See also bug #2389 "one is not expected to include my_config.h"

How to repeat:
try to compile the attached sample project with 

  configure --with-mysql=/install/prefix/of/mysql-5.1
  make

Suggested fix:
do not include my_config.h anywhere (wasn't done in 4.1 or 5.0 either, so why now all of a sudden?)
[24 Jul 2006 15:34] Hartmut Holzgraefe
simple test project

Attachment: ndbapi_minimal-1.0.tar.bz2 (application/x-tar, text), 191.46 KiB.

[4 Aug 2006 18:53] Jonas Oreland
assign to acurtis who made the change (when doing "plugin"-stuff)
antony, you can call/irc me if you have questions.

and this needs to be fixed before GA
  or actually asap, as ndbapi is useless in 5.1 currently...
  (unless having entire bk-tree)
[4 Aug 2006 18:53] Jonas Oreland
also raising prio as it renders ndbapi useless
[15 Sep 2006 21:58] Jonas Oreland
this also affect this issue...
(and all ndbapi users in 5.1)
[16 Oct 2006 7: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/13715

ChangeSet@1.2311, 2006-10-16 17:01:01+10:00, stewart@willster.(none) +2 -0
  BUG#21253 NdbApi.h should not include my_config.h
[18 Oct 2006 8:47] Stewart Smith
Martin approved, pushed to 5.1-ndb
[1 Nov 2006 14:54] Jonas Oreland
pushed into 5.1.13
[2 Nov 2006 14:14] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix for 5.1.13.