ID:               43870
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tbrasta at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: Ubuntu 7.10
 PHP Version:      5.2.5
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

If the file does not exist or cannot be read because one of the
preceding conditions is not satisfied, the function returns NULL.

So it won't return an error.


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

[2008-01-16 19:13:24] tbrasta at gmail dot com

Description:
------------
It doesn't matter if a $file variable contains valid file name or just
a string of no sense, in both cases mysql_query() returns 'true'. When
the valid file name is being used the load is successful.


Reproduce code:
---------------
mysql_query("INSERT INTO ssert(id, file) VALUES(NULL, '')", $link);
$id = mysql_insert_id($link);
$file = "/no/such/file";
if(mysql_query("UPDATE ssert SET file=LOAD_FILE('$file') WHERE id=$id",
$link))
{
  echo 'Success';
}
else
{
  echo 'False';
}

Expected result:
----------------
Expected 'False' on file not loaded into the database since
/no/such/file does not exist.

Actual result:
--------------
mysql_query("UPDATE ssert SET file=LOAD_FILE('$file') WHERE id=$id",
$link) returns true although the file does not exist.


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


-- 
Edit this bug report at http://bugs.php.net/?id=43870&edit=1

Reply via email to