Missing startIterRows.

This commit is contained in:
JoelKatz
2011-12-30 18:48:29 -08:00
parent 983f4560f3
commit 5a38a71382
4 changed files with 7 additions and 7 deletions

View File

@@ -89,8 +89,8 @@ HashedObject::pointer HashedObject::retrieve(const uint256& hash)
ScopedLock sl(theApp->getHashNodeDB()->getDBLock());
Database* db=theApp->getHashNodeDB()->getDB();
if(!db->executeSQL(sql.c_str())) return HashedObject::pointer();
if(!db->getNextRow()) return HashedObject::pointer();
if(!db->executeSQL(sql.c_str()) || !db->startIterRows() || !db->getNextRow())
return HashedObject::pointer();
std::string type;
db->getStr("ObjType", type);

View File

@@ -343,7 +343,7 @@ Ledger::pointer Ledger::getSQL(const std::string& sql)
{
ScopedLock sl(theApp->getLedgerDB()->getDBLock());
Database *db=theApp->getLedgerDB()->getDB();
if(!db->executeSQL(sql.c_str()) || !db->getNextRow())
if(!db->executeSQL(sql.c_str()) || !db->startIterRows() || !db->getNextRow())
return Ledger::pointer();
db->getStr("LedgerHash", hash);

View File

@@ -23,8 +23,8 @@ CKey::pointer PubKeyCache::locate(const uint160& id)
{ // is it in the database
ScopedLock sl(theApp->getTxnDB()->getDBLock());
Database* db=theApp->getTxnDB()->getDB();
if(!db->executeSQL(sql.c_str())) return CKey::pointer();
if(!db->getNextRow()) return CKey::pointer();
if(!db->executeSQL(sql.c_str()) || !db->startIterRows() || !db->getNextRow())
return CKey::pointer();
pkSize=db->getBinary("PubKey", &(data.front()), data.size());
db->endIterRows();
}

View File

@@ -175,8 +175,8 @@ Transaction::pointer Transaction::transactionFromSQL(const std::string& sql)
ScopedLock sl(theApp->getTxnDB()->getDBLock());
Database* db=theApp->getTxnDB()->getDB();
if(!db->executeSQL(sql.c_str())) return Transaction::pointer();
if(!db->getNextRow()) return Transaction::pointer();
if(!db->executeSQL(sql.c_str()) || !db->startIterRows() || !db->getNextRow())
return Transaction::pointer();
db->getStr("TransID", transID);
db->getStr("FromID", fromID);