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: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jo at feuersee dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC