From 1ca9b7ee09328a33f5f428ee3c37acc8479e31fa Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Mon, 15 Oct 2018 23:26:58 +0900 Subject: NAMESTORE: sqlite plugins cleanup --- src/namestore/plugin_namestore_sqlite.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/namestore/plugin_namestore_sqlite.c') diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index a47121082..d9bc5b212 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c @@ -152,13 +152,13 @@ database_setup (struct Plugin *plugin) &plugin->zone_to_name), GNUNET_SQ_make_prepare ("SELECT uid,record_count,record_data,label" " FROM ns098records" - " WHERE zone_private_key=? AND uid >= ?" + " WHERE zone_private_key=? AND uid > ?" " ORDER BY uid ASC" " LIMIT ?", &plugin->iterate_zone), GNUNET_SQ_make_prepare ("SELECT uid,record_count,record_data,label,zone_private_key" " FROM ns098records" - " WHERE uid >= ?" + " WHERE uid > ?" " ORDER BY uid ASC" " LIMIT ?", &plugin->iterate_all_zones), @@ -627,12 +627,11 @@ namestore_sqlite_iterate_records (void *cls, struct Plugin *plugin = cls; sqlite3_stmt *stmt; int err; - uint64_t rowid = serial + 1; //SQLite starts counting at 1 if (NULL == zone) { struct GNUNET_SQ_QueryParam params[] = { - GNUNET_SQ_query_param_uint64 (&rowid), + GNUNET_SQ_query_param_uint64 (&serial), GNUNET_SQ_query_param_uint64 (&limit), GNUNET_SQ_query_param_end }; @@ -645,7 +644,7 @@ namestore_sqlite_iterate_records (void *cls, { struct GNUNET_SQ_QueryParam params[] = { GNUNET_SQ_query_param_auto_from_type (zone), - GNUNET_SQ_query_param_uint64 (&rowid), + GNUNET_SQ_query_param_uint64 (&serial), GNUNET_SQ_query_param_uint64 (&limit), GNUNET_SQ_query_param_end }; -- cgit v1.2.3