On 12.10.2008, Timo Sirainen wrote: > I did several fixes to dict iteration. Now it should work as I intended > (which is also hopefully how you want to use it): > http://hg.dovecot.org/dovecot-1.2/rev/72b7277aefb3
Thanks. The dict-sql code needed the attached change to build the correct order by clause. After that it worked fine. Regards, Bernhard -- Bernhard Herzog | ++49-541-335 08 30 | http://www.intevation.de/ Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998 Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
diff -r 3a579de74dae src/lib-dict/dict-sql.c
--- a/src/lib-dict/dict-sql.c Sun Oct 12 14:48:18 2008 +0300
+++ b/src/lib-dict/dict-sql.c Mon Oct 13 17:47:48 2008 +0200
@@ -349,7 +349,7 @@ static bool sql_dict_iterate_next_query(
if ((ctx->flags & DICT_ITERATE_FLAG_SORT_BY_KEY) != 0) {
str_append(query, " ORDER BY ");
- for (i = array_count(&values); i < count; i++) {
+ for (i = 0; i < count; i++) {
str_printfa(query, "%s", sql_fields[i]);
if (i < count-1)
str_append_c(query, ',');
signature.asc
Description: This is a digitally signed message part.
