#28511 [Fbk->Opn]: MySQL seg faults through PHP
| From: | tim at timcrider dot com | Date: | Thu, 27 May 2004 15:20:11 +0000 |
| Subject: | #28511 [Fbk->Opn]: MySQL seg faults through PHP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60076@lists.php.net to get a copy of this message | ||
ID: 28511
User updated by: tim at timcrider dot com
Reported By: tim at timcrider dot com
-Status: Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: Fedora Core 2
PHP Version: 5.0.0RC2
New Comment:
PHP itself doesn't seg fault, it causes MySQL to seg fault.
Do you need an strace of MySQL as well as PHP? The PHP file does not
seg fault at all. It is MySQL seg faulting.
The reason I believe this is a PHP issue, is that if I try to run the
same query from the mysql monitor it works in both 4.0.20 and 4.1.1.
However when I run that query from php 5.0.0RC2, with the wrong DB
selected, it crashes MySQL, but the PHP script goes on just fine, all
of the queries just fail.
I hope this helps, if you have any other questions please let me
know.
Tim
Previous Comments:
------------------------------------------------------------------------
[2004-05-27 09:01:26] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2004-05-24 22:11:27] tim at timcrider dot com
Description:
------------
If mysql_select_db() fails to select a DB, either the DB is gone or it
has been renamed, and you try to run a LOAD DATA INFILE using PHP 5.0.0
RC2, it will seg fault and crash MySQL.
PHP continues to run fine, but MySQL crashes. Also, when trying to do
this task inside of the mysql monitor and typing in the command with no
database selected, it gives the standard:
ERROR 1046: No Database Selected
I have been able to reproduce this using MySQL 4.1.1 and MySQL 4.0.20.
After installing both versions, I recompiled php to use those specific
libararies.
Reproduce code:
---------------
mysql_query("LOAD DATA LOCAL INFILE
'/usr/local/data_processor/.working/30953/ALL_SORTED.30953' INTO TABLE
tDWD31HTva");
Expected result:
----------------
a mysql error, that does not seg fault MySQL.
Actual result:
--------------
MySQL Seg faults, no php error is produced, and MySQL doesn't log the
crash as an error.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28511&edit=1