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
=== modified file 'src/main/java/com/persistit/KeyFilter.java'
--- src/main/java/com/persistit/KeyFilter.java 2012-10-15 18:08:24 +0000
+++ src/main/java/com/persistit/KeyFilter.java 2012-10-19 14:17:24 +0000
@@ -897,7 +897,7 @@
897 if (compare > 0) {897 if (compare > 0) {
898 System.arraycopy(_itemToBytes, 0, keyBytes, offset, _itemToBytes.length);898 System.arraycopy(_itemToBytes, 0, keyBytes, offset, _itemToBytes.length);
899 key.setEncodedSize(offset + _itemToBytes.length);899 key.setEncodedSize(offset + _itemToBytes.length);
900 keyBytes[offset + _itemFromBytes.length] = 0;900 keyBytes[offset + _itemToBytes.length] = 0;
901 return true;901 return true;
902 }902 }
903 return false;903 return false;
904904
=== modified file 'src/test/resources/com/persistit/KeyFilterTestScript1'
--- src/test/resources/com/persistit/KeyFilterTestScript1 2012-10-15 18:08:24 +0000
+++ src/test/resources/com/persistit/KeyFilterTestScript1 2012-10-19 14:17:24 +0000
@@ -194,3 +194,14 @@
194KF {:0}194KF {:0}
195KEY {-1}195KEY {-1}
196GT {-1}196GT {-1}
197
198#
199# Cases added for bug https://bugs.launchpad.net/akiban-persistit/+bug/1046049
200#
201KF {{:"abc"}}
202KEY {}
203NUDGE AFTER
204GT <false>
205GTEQ <false>
206LTEQ {"abc",{after}}
207LT {"abc",{after}}

Subscribers

People subscribed via source and target branches