mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use 'INSERT OR IGNORE'
This commit is contained in:
@@ -86,7 +86,8 @@ void HashedObjectStore::bulkWrite()
|
|||||||
|
|
||||||
static boost::format fExists("SELECT ObjType FROM CommittedObjects WHERE Hash = '%s';");
|
static boost::format fExists("SELECT ObjType FROM CommittedObjects WHERE Hash = '%s';");
|
||||||
static boost::format
|
static boost::format
|
||||||
fAdd("INSERT INTO CommittedObjects (Hash,ObjType,LedgerIndex,Object) VALUES ('%s','%c','%u',%s);");
|
fAdd("INSERT OR IGNORE INTO CommittedObjects "
|
||||||
|
"(Hash,ObjType,LedgerIndex,Object) VALUES ('%s','%c','%u',%s);");
|
||||||
|
|
||||||
Database* db = theApp->getHashNodeDB()->getDB();
|
Database* db = theApp->getHashNodeDB()->getDB();
|
||||||
{ // FIXME: We're holding the lock too long!
|
{ // FIXME: We're holding the lock too long!
|
||||||
|
|||||||
Reference in New Issue
Block a user