Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix problem with mismatched number of parameters

  • Loading branch information...
commit 7cbbbf5cd76e7be5243cba7c080d43759c137703 1 parent 313b73d
Brian Bruns authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/db.c
View
3  src/db.c
@@ -581,11 +581,12 @@ dbrelay_resolve_params(dbrelay_request_t *request, char *sql)
}
while (request->params[i]) {
prevpos = pos;
- pos += dbrelay_find_placeholder(&tmpsql[pos]);
+ pos = dbrelay_find_placeholder(&tmpsql[pos]);
if (pos==-1) {
// ignore missing placeholders
pos = prevpos;
} else {
+ pos = prevpos + pos;
tmpsql[pos]='\0';
sb_append(sb, &tmpsql[prevpos]);
if (is_quoted_param(request->params[i])) sb_append(sb, "'");
Please sign in to comment.
Something went wrong with that request. Please try again.