Home Patches

Bug in Freeze::MapI.cpp

Edwin RodriguezEdwin Rodriguez Member Edwin RodriguezOrganization: Bright Systems, Inc.Project: DDR
Found an issue with the implementation of Freeze::MapIndexI::untypedCount where a cursor is created outside the current transaction context. This problem will manifest itself in a self-deadlock if you attempt to get a count of the number of records in a table while updating the table. And because the thread is blocking itself, there is no recovery possible.

--- c:\Ice-3.2.0\src\Freeze\MapI.cpp 2007-02-01 10:40:28.000000000 -0800
+++ Ice-3.2.0\src\Freeze\MapI.cpp 2007-05-10 12:08:35.289093700 -0700

// Move to the first record
- _db->cursor(0, &dbc, 0);
+ DbTxn * txn = connection->dbTxn();
+ _db->cursor(txn, &dbc, 0);
bool found = (dbc->get(&dbKey, &dbValue, DB_SET) == 0);

Sign In or Register to comment.