Merge lp:~pbeaman/akiban-persistit/fix-1046049-keyfilter-wrong2 into lp:akiban-persistit

Proposed by Peter Beaman
Status: Merged
Approved by: Nathan Williams
Approved revision: 383
Merged at revision: 383
Proposed branch: lp:~pbeaman/akiban-persistit/fix-1046049-keyfilter-wrong2
Merge into: lp:akiban-persistit
Diff against target: 31 lines (+12/-1)
2 files modified
src/main/java/com/persistit/KeyFilter.java (+1/-1)
src/test/resources/com/persistit/KeyFilterTestScript1 (+11/-0)
To merge this branch: bzr merge lp:~pbeaman/akiban-persistit/fix-1046049-keyfilter-wrong2
Reviewer Review Type Date Requested Status
Nathan Williams Approve
Review via email: mp+130558@code.launchpad.net

Description of the change

Another attempt at proposing the small KeyFilter fix for https://bugs.launchpad.net/akiban-persistit/+bug/1046049

To post a comment you must log in.
Revision history for this message
Nathan Williams (nwilliams) wrote :

Looks good again.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/main/java/com/persistit/KeyFilter.java'
2--- src/main/java/com/persistit/KeyFilter.java 2012-10-15 18:08:24 +0000
3+++ src/main/java/com/persistit/KeyFilter.java 2012-10-19 14:17:24 +0000
4@@ -897,7 +897,7 @@
5 if (compare > 0) {
6 System.arraycopy(_itemToBytes, 0, keyBytes, offset, _itemToBytes.length);
7 key.setEncodedSize(offset + _itemToBytes.length);
8- keyBytes[offset + _itemFromBytes.length] = 0;
9+ keyBytes[offset + _itemToBytes.length] = 0;
10 return true;
11 }
12 return false;
13
14=== modified file 'src/test/resources/com/persistit/KeyFilterTestScript1'
15--- src/test/resources/com/persistit/KeyFilterTestScript1 2012-10-15 18:08:24 +0000
16+++ src/test/resources/com/persistit/KeyFilterTestScript1 2012-10-19 14:17:24 +0000
17@@ -194,3 +194,14 @@
18 KF {:0}
19 KEY {-1}
20 GT {-1}
21+
22+#
23+# Cases added for bug https://bugs.launchpad.net/akiban-persistit/+bug/1046049
24+#
25+KF {{:"abc"}}
26+KEY {}
27+NUDGE AFTER
28+GT <false>
29+GTEQ <false>
30+LTEQ {"abc",{after}}
31+LT {"abc",{after}}

Subscribers

People subscribed via source and target branches