[dovecot-cvs] dovecot/src/lib-dict dict-sql.c,1.14,1.15

cras at dovecot.org cras at dovecot.org
Sun Sep 10 15:46:14 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-dict
In directory talvi:/tmp/cvs-serv8691

Modified Files:
	dict-sql.c 
Log Message:
Fixed atomic_inc() to work correctly with shared keys.



Index: dict-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-dict/dict-sql.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- dict-sql.c	28 Aug 2006 16:54:55 -0000	1.14
+++ dict-sql.c	10 Sep 2006 12:46:11 -0000	1.15
@@ -411,7 +411,7 @@
                         dict->select_field, dict->select_field, diff);
 	} else {
 		query = t_strdup_printf(
-			"INSERT INTO %s (%s, %s) VALUES (%s, %lld) "
+			"INSERT INTO %s (%s, %s) VALUES (%lld, '%s') "
 			"ON DUPLICATE KEY UPDATE %s = %s + %lld",
 			dict->table, dict->select_field, dict->where_field,
                         diff, sql_escape_string(dict->db, key),



More information about the dovecot-cvs mailing list