Fix bug in split position handling
commit22b84f7181a37c8f71882a65a52d0ac4dec9dcc6
authorOlly Betts <olly@survex.com>
Tue, 30 Oct 2018 15:58:51 +0000 (31 04:58 +1300)
committerOlly Betts <olly@survex.com>
Tue, 30 Oct 2018 16:14:09 +0000 (31 05:14 +1300)
tree88459eea9d164f750230cbed3cc3f1403e167dba
parent95d29669971d50db0a2735eb3cbad8cc58b19463
Fix bug in split position handling

When we look to see in the new position is present before the split
we were only checking if the std::lower_bound() (binary chop) ended
up on a valid position, but we also need to check if that position
is the one we're trying to add.

This was leading to positions getting lost in this situation.

(cherry picked from commit edc381036725373818fa04d137a69f5941a95150)
xapian-core/api/omdocument.cc
xapian-core/tests/api_backend.cc