|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-09-02 12:32 UTC] vrana@php.net
Description:
------------
LOAD DATA LOCAL INFILE query together with connecting by mysqli_real_connect() causes PHP crash. Maybe it is not the single crashing query but common queries like SELECT or INSERT work.
When I replace mysqli_init() + mysqli_real_connect() by mysqli_connect() then everything works (no crash).
Reproduce code:
---------------
<?php
$dbh = mysqli_init();
$dbh->real_connect("", "ODBC", "", "cds");
$dbh->query("LOAD DATA LOCAL INFILE 'songs.csv' INTO TABLE songs");
?>
Expected result:
----------------
Query executed OK.
Actual result:
--------------
PHP crashes.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
A patch has been committed to fix the problem. Please try the latest SVN snapshots. The bug affects all operating systems. It is a mysqlnd bug. In theory it should be possible to cause the crash using any MySQL API that uses mysqlnd: ext/mysql, ext/mysqli, PDO_MYSQL. The crash happens both with connections created using mysqli_init() + mysqli_real_connect() and mysqli_connect("p:<host>", ...).