ID:               28511
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tim at timcrider dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Reproducible crash
 Operating System: Fedora Core 2
 PHP Version:      5.0.0RC2
 New Comment:

If MySQL segfaults, it's MySQLs problem and you should 
submit a bug to them.  Since PHP and MySQL dont' share 
the same address space, there's nothing that PHP can do 
that can crash MySQL and have it be PHP's 'fault'.


Previous Comments:
------------------------------------------------------------------------

[2004-05-27 17:20:07] tim at timcrider dot com

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

------------------------------------------------------------------------

[2004-05-27 09:01:26] [EMAIL PROTECTED]

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

Reply via email to