[dovecot-cvs] dovecot/src/lib-dict dict-sql.c,1.8.2.3,1.8.2.4

cras at dovecot.org cras at dovecot.org
Sun Sep 10 16:12:01 EEST 2006


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

Modified Files:
      Tag: branch_1_0
	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.8.2.3
retrieving revision 1.8.2.4
diff -u -d -r1.8.2.3 -r1.8.2.4
--- dict-sql.c	28 Aug 2006 16:54:54 -0000	1.8.2.3
+++ dict-sql.c	10 Sep 2006 13:11:58 -0000	1.8.2.4
@@ -353,7 +353,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