Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
Fix update bind vars as well
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsonja committed Mar 24, 2016
1 parent e5c3b8c commit a8d628d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vitess/src/main/java/com/yahoo/ycsb/db/QueryCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ public Query createUpdateQuery(String keyspace,

Query query = new Query(sqlBuilder.toString(), keyspace, tabletType, key, keyField);
for (Entry<String, ByteIterator> val : result.entrySet()) {
query.addBindVar(val.getKey(), val.getValue().toString());
if (val.getKey() != keyField) {
query.addBindVar(val.getKey(), val.getValue().toString());
}
}

return query;
Expand Down

0 comments on commit a8d628d

Please sign in to comment.