PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #4552

LOCK TABLES WRITE causes notices

Details

Submitted2005-06-08 14:58 UTC
Fromrobert dot munteanu at betbrain dot com
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version5.0.3
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-06-08 14:58 UTC] robert dot munteanu at betbrain dot com

Description:
------------
DB_DataObject version: 1.7.13

If MySQL tables are locked with a 'LOCK TABLES WRITE' statement, and ignore_sequence_keys is not set for those tables, the errors raised for those tables' sequence table not being locked cause notices which are not handled as PEAR_Errors.

DB_DataObject version: 1.7.13

Reproduce code:
---------------
$do = DB_DataObject::factory('a');
$do->id = 1;

$do->query('LOCK TABLES a WRITE');
$do->insert();
$do->query('UNLOCK TABLES');

printf('Done');

Expected result:
----------------
Done

Actual result:
--------------
Notice: Object of class DB_Error to string conversion in c:\php\PEAR\DB\DataObje
ct.php on line 930
PHP Notice: Object of class DB_Error to string conversion in c:\php\PEAR\DB\Dat
aObject.php on line 930