Skip to content

Commit

Permalink
Fixed the ConflictSetCalculator for tables with no primary key. This …
Browse files Browse the repository at this point in the history
…is for @hawkwang
  • Loading branch information
apavlo committed Oct 23, 2013
1 parent fc472d5 commit 15b851d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ private boolean alwaysWriteConflicting(Statement stmt,

// Any UPDATE or DELETE statement that does not use a primary key in its WHERE
// clause should be marked as always conflicting.
// Note that pkeys will be null here if there is no primary key for the table
Collection<Column> pkeys = this.pkeysCache.get(CollectionUtil.first(tables));
if (cols.containsAll(pkeys) == false) {
if (pkeys == null || cols.containsAll(pkeys) == false) {
return (true);
}
// Or any UPDATE or DELETE with a range predicate in its WHERE clause always conflicts
Expand Down

0 comments on commit 15b851d

Please sign in to comment.