diff options
author | Christophe Genevey Metat <genevey.christophe@gmail.com> | 2016-07-20 13:05:12 +0000 |
---|---|---|
committer | Christophe Genevey Metat <genevey.christophe@gmail.com> | 2016-07-20 13:05:12 +0000 |
commit | 3aab63d5c50db0eb784d3b65b2bd989d3458c960 (patch) | |
tree | c258e4a14aaf6a9da14045cc655b2891886df8ac /src/psycstore | |
parent | 562d3a22d7882660b5b0f805f6b98e0b2814d9b8 (diff) | |
download | gnunet-3aab63d5c50db0eb784d3b65b2bd989d3458c960.tar.gz gnunet-3aab63d5c50db0eb784d3b65b2bd989d3458c960.zip |
start to fix psycstore mysql
Diffstat (limited to 'src/psycstore')
-rw-r--r-- | src/psycstore/plugin_psycstore_mysql.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/psycstore/plugin_psycstore_mysql.c b/src/psycstore/plugin_psycstore_mysql.c index 6b2acbc07..5cb15ff6e 100644 --- a/src/psycstore/plugin_psycstore_mysql.c +++ b/src/psycstore/plugin_psycstore_mysql.c | |||
@@ -307,7 +307,7 @@ database_setup (struct Plugin *plugin) | |||
307 | "psycstore-mysql", "FILENAME"); | 307 | "psycstore-mysql", "FILENAME"); |
308 | return GNUNET_SYSERR; | 308 | return GNUNET_SYSERR; |
309 | } | 309 | } |
310 | //ERROR | 310 | |
311 | if (GNUNET_OK != GNUNET_DISK_file_test (filename)) | 311 | if (GNUNET_OK != GNUNET_DISK_file_test (filename)) |
312 | { | 312 | { |
313 | if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (filename)) | 313 | if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (filename)) |
@@ -330,24 +330,6 @@ database_setup (struct Plugin *plugin) | |||
330 | return GNUNET_SYSERR; | 330 | return GNUNET_SYSERR; |
331 | } | 331 | } |
332 | 332 | ||
333 | /* | ||
334 | #if DEBUG_PSYCSTORE | ||
335 | sqlite3_trace (plugin->dbh, &sql_trace, NULL); | ||
336 | #endif | ||
337 | |||
338 | sql_exec (plugin->dbh, "PRAGMA temp_store=MEMORY"); | ||
339 | sql_exec (plugin->dbh, "PRAGMA synchronous=NORMAL"); | ||
340 | sql_exec (plugin->dbh, "PRAGMA legacy_file_format=OFF"); | ||
341 | sql_exec (plugin->dbh, "PRAGMA auto_vacuum=INCREMENTAL"); | ||
342 | sql_exec (plugin->dbh, "PRAGMA encoding=\"UTF-8\""); | ||
343 | #if ! DEBUG_PSYCSTORE | ||
344 | sql_exec (plugin->dbh, "PRAGMA locking_mode=EXCLUSIVE"); | ||
345 | #endif | ||
346 | sql_exec (plugin->dbh, "PRAGMA page_size=4096"); | ||
347 | |||
348 | sqlite3_busy_timeout (plugin->dbh, BUSY_TIMEOUT_MS); | ||
349 | |||
350 | */ | ||
351 | /* Create tables */ | 333 | /* Create tables */ |
352 | 334 | ||
353 | GNUNET_MYSQL_statement_run (plugin->mc, | 335 | GNUNET_MYSQL_statement_run (plugin->mc, |
@@ -862,9 +844,6 @@ mysql_membership_store (void *cls, | |||
862 | struct Plugin *plugin = cls; | 844 | struct Plugin *plugin = cls; |
863 | 845 | ||
864 | uint32_t idid_join = (uint32_t)did_join; | 846 | uint32_t idid_join = (uint32_t)did_join; |
865 | uint64_t iannounced_at = (uint64_t)announced_at; | ||
866 | uint64_t ieffective_since = (uint64_t)effective_since; | ||
867 | uint64_t igroup_generation = (uint64_t)group_generation; | ||
868 | 847 | ||
869 | struct GNUNET_MYSQL_StatementHandle *stmt = plugin->insert_membership; | 848 | struct GNUNET_MYSQL_StatementHandle *stmt = plugin->insert_membership; |
870 | 849 | ||
@@ -886,9 +865,9 @@ mysql_membership_store (void *cls, | |||
886 | GNUNET_MY_query_param_auto_from_type (channel_key), | 865 | GNUNET_MY_query_param_auto_from_type (channel_key), |
887 | GNUNET_MY_query_param_auto_from_type (slave_key), | 866 | GNUNET_MY_query_param_auto_from_type (slave_key), |
888 | GNUNET_MY_query_param_uint32 (&idid_join), | 867 | GNUNET_MY_query_param_uint32 (&idid_join), |
889 | GNUNET_MY_query_param_uint64 (&iannounced_at), | 868 | GNUNET_MY_query_param_uint64 (&announced_at), |
890 | GNUNET_MY_query_param_uint64 (&ieffective_since), | 869 | GNUNET_MY_query_param_uint64 (&effective_since), |
891 | GNUNET_MY_query_param_uint64 (&igroup_generation), | 870 | GNUNET_MY_query_param_uint64 (&group_generation), |
892 | GNUNET_MY_query_param_end | 871 | GNUNET_MY_query_param_end |
893 | }; | 872 | }; |
894 | 873 | ||