php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13924 PEAR erroneously thinks LOCK TABLES queries return errors
Submitted: 2001-11-04 18:17 UTC Modified: 2001-11-04 21:56 UTC
From: vigna at dsi dot unimi dot it Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.0.6 OS: Red Hat Linux 7.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
18 + 14 = ?
Subscribe to this entry?

 
 [2001-11-04 18:17 UTC] vigna at dsi dot unimi dot it
When a query using the LOCK TABLES MySQL command is issued through PEAR, it believes it returns an error even if this is not true. For instance,

<?
require_once("DB.php");
$db = DB::connect("mysql://root@localhost/DSI");
$rs = $db->query("LOCK TABLE persona READ");
print_r($rs);
?>

leaves in the log

[04-Nov-2001 23:14:17] PHP Warning:  Undefined offset:  0 in /usr/share/php/DB/common.php on line 126
and outputs

db_error Object
(
    [error_message_prefix] => 
    [error_prepend] => 
    [error_append] => 
    [mode] => 1
    [level] => 1024
    [code] => -1
    [message] => DB Error: unknown error
    [debuginfo] => 
    [userinfo] => LOCK TABLE persona READ
    [callback] => 
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 23:01:30 2024 UTC