Skip to content

Commit

Permalink
dict-sql: Fix setting $variables to iteration key when map had multip…
Browse files Browse the repository at this point in the history
…le values
  • Loading branch information
sirainen committed Apr 7, 2017
1 parent e93d643 commit 573db93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-dict/dict-sql.c
Expand Up @@ -757,7 +757,8 @@ static bool sql_dict_iterate(struct dict_iterate_context *_ctx,
str_append_c(ctx->key, '/');

count = sql_result_get_fields_count(ctx->result);
i = (ctx->flags & DICT_ITERATE_FLAG_NO_VALUE) != 0 ? 0 : 1;
i = (ctx->flags & DICT_ITERATE_FLAG_NO_VALUE) != 0 ? 0 :
ctx->map->values_count;
sql_field_i = ctx->sql_fields_start_idx;
for (p = ctx->map->pattern + ctx->pattern_prefix_len; *p != '\0'; p++) {
if (*p != '$')
Expand Down

0 comments on commit 573db93

Please sign in to comment.