- simplify parameters
[oweals/gnunet.git] / src / datastore / plugin_datastore_mysql.c
index b92877d9809e7eb7a1e9c6a78b56d1ac2b8c0305..ad70e73d46bbe8552a40f755278f5413d28da76c 100644 (file)
@@ -176,7 +176,7 @@ struct Plugin
 #define UPDATE_ENTRY "UPDATE gn090 SET prio=prio+?,expire=IF(expire>=?,expire,?) WHERE uid=?"
   struct GNUNET_MYSQL_StatementHandle *update_entry;
 
-#define DEC_REPL "UPDATE gn090 SET repl=GREATEST (0, repl - 1) WHERE uid=?"
+#define DEC_REPL "UPDATE gn090 SET repl=GREATEST (1, repl) - 1 WHERE uid=?"
   struct GNUNET_MYSQL_StatementHandle *dec_repl;
 
 #define SELECT_SIZE "SELECT SUM(BIT_LENGTH(value) DIV 8) FROM gn090"