Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 32334
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: fdintino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.006
Fixed in: (no value)



Subject: mysql_server_init and mysql_server_end link errors with mysql 3.23.xx
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1200422462-13442-4"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 1508
Download (untitled) / with headers
text/plain 1.4k
In dbdimp.c, mysql_server_init and mysql_server_end are called when DBD_MYSQL_EMBEDDED is not defined. For the client/server version of mysql these are dummy functions, but they aren't defined in mysql.h for mysql <= 3.23.58, so it produces linker errors. When I run it currently (perl v5.6.1, linked against mysql-3.23-sun-solaris2.9-sparc), I get the following warnings on make: "dbdimp.c", line 464: warning: implicit function declaration: parse_number "dbdimp.c", line 1456: warning: implicit function declaration: mysql_server_init "dbdimp.c", line 1970: warning: implicit function declaration: mysql_server_end and this error in make test: /00base............ok 3/5install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_server_init: referenced symbol not found at /usr/perl5/5.6.1/lib/sun4-solaris-64int/DynaLoader.pm line 206. Compilation failed in require at (eval 1) line 3. If I comment out the lines in dbdimp.c for mysql_server_init on non-embedded server: #else mysql_server_init(-1, NULL, NULL); I get the same thing, only with mysql_server_end. Removing the lines #else mysql_server_end(); leads to a successful test. Since these functions don't do anything in client/server mysql, and they break it for mysql-3.23.xx (including the most recent), they should probably be removed. I've attached a patch for dbdimp.c which does this.
Subject: dbdimp.c.patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1200422462-13442-3"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; name="dbdimp.c.patch"
Content-Disposition: inline; filename="dbdimp.c.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 380
Download dbdimp.c.patch
text/x-diff 380b
--- dbdimp.c 2007-12-11 16:41:50.000000000 -0500 +++ dbdimp.c.new 2008-01-15 12:13:49.612496000 -0500 @@ -1452,8 +1452,6 @@ } } } -#else - mysql_server_init(-1, NULL, NULL); #endif #ifdef MYSQL_NO_CLIENT_FOUND_ROWS @@ -1966,8 +1964,6 @@ } -#else - mysql_server_end(); #endif /* The disconnect_all concept is flawed and needs more work */
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-2053-1200622606-1141.32334-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
From: CAPTTOFU [...] cpan.org
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1746
Download (untitled) / with headers
text/plain 1.7k
Thank you very much for this patch! I'll be putting out a release soon to include this fix. Thanks again! On Tue Jan 15 13:41:07 2008, fdintino wrote: Show quoted text
> In dbdimp.c, mysql_server_init and mysql_server_end are called when > DBD_MYSQL_EMBEDDED is not defined. For the client/server version of > mysql these are > dummy functions, but they aren't defined in mysql.h for mysql <= > 3.23.58, so it produces > linker errors. > > When I run it currently (perl v5.6.1, linked against mysql-3.23-sun- > solaris2.9-sparc), I get > the following warnings on make: > "dbdimp.c", line 464: warning: implicit function declaration: > parse_number > "dbdimp.c", line 1456: warning: implicit function declaration: > mysql_server_init > "dbdimp.c", line 1970: warning: implicit function declaration: > mysql_server_end > > and this error in make test: > > /00base............ok 3/5install_driver(mysql) failed: Can't load > 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: > perl: fatal: relocation > error: file blib/arch/auto/DBD/mysql/mysql.so: symbol > mysql_server_init: referenced symbol > not found at /usr/perl5/5.6.1/lib/sun4-solaris-64int/DynaLoader.pm > line 206. > Compilation failed in require at (eval 1) line 3. > > If I comment out the lines in dbdimp.c for mysql_server_init on non- > embedded server: > > #else > mysql_server_init(-1, NULL, NULL); > > I get the same thing, only with mysql_server_end. Removing the lines > > #else > mysql_server_end(); > > leads to a successful test. Since these functions don't do anything in > client/server mysql, and > they break it for mysql-3.23.xx (including the most recent), they > should probably be > removed. I've attached a patch for dbdimp.c which does this.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-23414-1379026049-1501.32334-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 8
Closing.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.