diff options
Diffstat (limited to 'src/namestore/plugin_namestore_sqlite.c')
-rw-r--r-- | src/namestore/plugin_namestore_sqlite.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index d434abd94..c63339db7 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -755,7 +755,7 @@ namestore_sqlite_transaction_begin (void *cls, | |||
755 | char **emsg) | 755 | char **emsg) |
756 | { | 756 | { |
757 | struct Plugin *plugin = cls; | 757 | struct Plugin *plugin = cls; |
758 | return (SQLITE_BUSY == sqlite3_exec (plugin->dbh, "BEGIN TRANSACTION;", NULL, | 758 | return (SQLITE_BUSY == sqlite3_exec (plugin->dbh, "BEGIN IMMEDIATE TRANSACTION;", NULL, |
759 | NULL, emsg)) ? GNUNET_SYSERR : GNUNET_YES; | 759 | NULL, emsg)) ? GNUNET_SYSERR : GNUNET_YES; |
760 | } | 760 | } |
761 | 761 | ||
@@ -823,6 +823,12 @@ libgnunet_plugin_namestore_sqlite_init (void *cls) | |||
823 | api->transaction_begin = &namestore_sqlite_transaction_begin; | 823 | api->transaction_begin = &namestore_sqlite_transaction_begin; |
824 | api->transaction_commit = &namestore_sqlite_transaction_commit; | 824 | api->transaction_commit = &namestore_sqlite_transaction_commit; |
825 | api->transaction_rollback = &namestore_sqlite_transaction_rollback; | 825 | api->transaction_rollback = &namestore_sqlite_transaction_rollback; |
826 | /** | ||
827 | * NOTE: Since SQlite does not support SELECT ... FOR UPDATE this is | ||
828 | * just an alias to lookup_records. The BEGIN IMMEDIATE mechanic currently | ||
829 | * implicitly ensures this API behaves as it should | ||
830 | */ | ||
831 | api->edit_records = &namestore_sqlite_lookup_records; | ||
826 | LOG (GNUNET_ERROR_TYPE_INFO, | 832 | LOG (GNUNET_ERROR_TYPE_INFO, |
827 | _ ("Sqlite database running\n")); | 833 | _ ("Sqlite database running\n")); |
828 | return api; | 834 | return api; |