dovecot-2.2: dict-sql: If DICT_ITERATE_FLAG_EXACT_KEY is used, u...
dovecot at dovecot.org
dovecot at dovecot.org
Mon May 11 18:50:50 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/7abdcf42b63b
changeset: 18639:7abdcf42b63b
user: Timo Sirainen <tss at iki.fi>
date: Mon May 11 21:48:45 2015 +0300
description:
dict-sql: If DICT_ITERATE_FLAG_EXACT_KEY is used, use only the first found map.
diffstat:
src/lib-dict/dict-sql.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r bb7d35fa9b43 -r 7abdcf42b63b src/lib-dict/dict-sql.c
--- a/src/lib-dict/dict-sql.c Mon May 11 19:12:45 2015 +0300
+++ b/src/lib-dict/dict-sql.c Mon May 11 21:48:45 2015 +0300
@@ -447,8 +447,11 @@
}
while ((ret = sql_result_next_row(ctx->result)) == 0) {
- /* see if there are more results in the next map */
- if (!sql_dict_iterate_next_query(ctx))
+ /* see if there are more results in the next map.
+ don't do it if we're looking for an exact match, since we
+ already should have handled it. */
+ if ((ctx->flags & DICT_ITERATE_FLAG_EXACT_KEY) != 0 ||
+ !sql_dict_iterate_next_query(ctx))
return FALSE;
}
if (ret < 0) {
More information about the dovecot-cvs
mailing list