php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46964 PDO MySQL requires #define MYSQL_OPT_LOCAL_INFILE
Submitted: 2008-12-29 20:14 UTC Modified: 2008-12-30 19:11 UTC
From: jo at feuersee dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.2.8 OS: Linux
Private report: No CVE-ID:
 [2008-12-29 20:14 UTC] jo at feuersee dot de
Description:
------------
Compiling PDO MySQL with ancient MySQL fails because the code 
assumes that MYSQL_OPT_LOCAL_INFILE has been defined. This isn't the 
case with MySQL 3.* and IIRC 4.0 and some early 4.1 versions.

AFAICS it's pretty easy to fix this: tell the compiler to test via 
#ifdef

In file etc/pdo_mysql/mysql_driver.c ad line 500:
#ifdef MYSQL_OPT_LOCAL_INFILE
                if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, 
(const char *)&local_infile)) {
                        pdo_mysql_error(dbh);
                        goto cleanup;
                }
#endif



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-30 19:11 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 07:02:14 2014 UTC