No-op GlassTable::readahead_key for overlong keys
commit99cf5e2ce928d3afc44422740dec907dab56642b
authorRobert Stepanek <rsto@paranoia.at>
Mon, 17 Aug 2020 13:18:36 +0000 (17 15:18 +0200)
committerOlly Betts <olly@survex.com>
Thu, 14 Jul 2022 02:54:25 +0000 (14 14:54 +1200)
treece7291f7f99258495425a4b75e7bcc9204704407
parent62d804e2ee11f7ce6450b304847714883f059487
No-op GlassTable::readahead_key for overlong keys

Currently, a query may abort with an InvalidArgument error if one of
the terms exceeds the maximum allowed length for glass btree keys.
However, this error is thrown only if the query triggers a readahead_key
call on the glass table.

This patch updates readahead_key to report overlong keys as not found,
rather than aborting the whole query.

Closes https://github.com/xapian/xapian/pull/313

(cherry picked from commit e2c644d915d9eac0e975b5ed03ec51c49a43efd9)
xapian-core/backends/chert/chert_table.cc
xapian-core/backends/glass/glass_table.cc
xapian-core/tests/api_backend.cc