Skip to content

Commit

Permalink
Fix unquoted binary String
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjiangling committed Jan 24, 2022
1 parent cf59d7e commit 22a36ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void setBytes(int parameterIndex, byte[] x) throws SQLException {
ensureOpen();

int idx = toArrayIndex(parameterIndex);
values[idx].update(new String(x, StandardCharsets.UTF_8));
values[idx].update(ClickHouseValues.convertToQuotedString(new String(x, StandardCharsets.UTF_8)));
flags[idx] = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public void setBytes(int parameterIndex, byte[] x) throws SQLException {
value.update(x);
values[idx] = value.toSqlExpression();
} else {
values[idx] = new String(x, StandardCharsets.UTF_8);
values[idx] = ClickHouseValues.convertToQuotedString(new String(x, StandardCharsets.UTF_8));
}
}

Expand Down

0 comments on commit 22a36ca

Please sign in to comment.