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

Commit

Permalink
Merge pull request #16 from thompsonja/master
Browse files Browse the repository at this point in the history
Add check for the key field when adding bind vars for updates as well.
  • Loading branch information
enisoc committed Mar 30, 2016
2 parents 0c33030 + a8d628d commit a57d914
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 a57d914

Please sign in to comment.