Bug #4206 net_buffer_length never defined in mysql.h
Submitted: 18 Jun 2004 16:04 Modified: 3 Sep 2004 22:53
Reporter: Nick Leverton Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.20 and 4.1.2 OS:Linux (Linux RH7.3)
Assigned to: Bugs System

[18 Jun 2004 16:04] Nick Leverton
Description:
mysql.h defines net_buffer_length in a conditional at line 327, 
#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) 
&& !defined(EMBEDDED_LIBRARY) 
 
However either MYSQL_CLIENT or MYSQL_SERVER is guaranteed to be defined due to 
the statement at line 300, 
#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) 
#define MYSQL_CLIENT 
#endif 
 
This means that net_buffer_length is never available to user programs which 
include mysql.h.  This problem is currently preventing me installing 
DBD::mysql with MySQL 4.1.2. 
 
This file was installed from the 4.1.2 RPMS on MySQL.com 

How to repeat:
Download current (MySQL 4.1-aware) DBD::mysql 2.9003 from CPAN 
http://search.cpan.org/CPAN/authors/id/R/RU/RUDY/DBD-mysql-2.9003.tar.gz 
 
untar 
perl Makefile.pl 
make 
 
Compilation will abort with 
gcc -c -I/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBI 
-I/usr/include/mysql -mcpu=i486 -fno-strength-reduce -fno-strict-aliasing 
-I/usr/local/include -O2 -march=i386 -mcpu=i686   -DVERSION=\"2.9003\" 
-DXS_VERSION=\"2.9003\" -fPIC -I/usr/lib/perl5/5.6.1/i386-linux/CORE  mysql.c 
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info': 
mysql.xs:356: `net_buffer_length' undeclared (first use in this function) 
mysql.xs:356: (Each undeclared identifier is reported only once 
mysql.xs:356: for each function it appears in.) 
make: *** [mysql.o] Error 1
[19 Jun 2004 11:33] Sergey Glukhov
ChangeSet
  1.1943 04/06/19
[23 Jun 2004 8:48] Sergey Glukhov
ChangeSet
  1.1941 04/06/23
[23 Jun 2004 11:08] Michael Widenius
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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Fix will be in 4.0.21 and 4.1.3

Note that 4.1.3 has a now prototype for mysql_shutdown(), which means that the current DBD::perl will not compile without adding SHUTDOWN_DEFAULT as a last argument to mysql_shutdown(). We will update DBD:MySQL regarding this as soon as possible.

Regards,
Monty
[2 Sep 2004 17:28] Patrick Galbraith
I will take over this bug. I will test with latest code to verify the fix.
[3 Sep 2004 22:53] Patrick Galbraith
tested and verified that this does indeed work now with 4.0.21 and 4.1.3.