FoundationDB/sql-layer — pull request #1440 by nathanlws (2014-09-03 23:14:36+00:00)
Title: Fix mixed mode index interation

A number of problems (described below). Everything, including the new null tests, now pass. I've gone over it all very carefully but that doesn't change that it is extremely delicate. It probably couldn't hurt to sit and think about additional cases that could be missed.

PersistitIndexRow:
- Fix compareTo behavior when underlying arrays sizes don't match
- Allow specification maximum fieldCount
- Always used the given ascending array

IndexCursorMixedOrder:
- Start and end keys always need computed, not just for unique indexes
- Obey the full IndexBound contract
- All key columns need to be in ascending array
- Pass proper bound size and full ascending array when comparing rows

MixedOrderScanStateSingleSegment:
- Remove invalid attempts at enforcing null KeyRange API (handled prior)
- Fix incorrect handling of singleValue (non-last column) segements