New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: verify if legacy hints are useful #3121
Comments
The only place where pCursor->hint is set NOW is OP_ReopenIdx, OP_OpenRead, OP_OpenWrite
With @Korablev77 patch 7a56118 So, BTREE_BULKLOAD, same as OPFLAG_BULKCSR could be deleted. a) First of all, part of code is wrapped in SQLITE_ENABLE_CURSOR_HINTS that is disabled in tarantool build. I've dropped all the code in such sections and going to review the remaining one. b) The flag is used in sqlite3CursorMovetoUnpacked (OP_SeekLE and OP_SeekGE) to setup iter_type, in (OP_SeekLT, OP_SeekLE, OP_SeekGE, OP_SeekGT), (OP_NoConflict, OP_NotFound, OP_Found), (OP_IdxDelete) c) The VDBE P5 argument is setted OPFLAG_SEEKEQ by (1)sql_create_index, (2)sqlite3WhereBegin.
This means that new cursor would have BTREE_SEEK_EQ==OPFLAG_SEEKEQ and then on lookup with OP_SeekLE (in getNewIid) that allows choose correct behavior on find and iter_type. In other words, this match flag description
and this scenario is still in use. We should keep it. ==================== |
Deleted BTREE_BULKLOAD and OPFLAG_BULKCSR as there become useless since btree.c was dropped as a part of #2419. Removed SQLITE_ENABLE_CURSOR_HINTS sections as this code has never been in use. Start use OPFLAG_SEEKEQ instead of equal BTREE_SEEK_EQ as this macro name has no sense since no btree present in SQL. Resolves #3121.
Deleted BTREE_BULKLOAD and OPFLAG_BULKCSR as there become useless since btree.c was dropped as a part of #2419. Removed SQLITE_ENABLE_CURSOR_HINTS sections as this code has never been in use. Start use OPFLAG_SEEKEQ instead of equal BTREE_SEEK_EQ as this macro name has no sense since no btree present in SQL. Resolves #3121.
Deleted BTREE_BULKLOAD and OPFLAG_BULKCSR as there become useless since btree.c was dropped as a part of #2419. Removed SQLITE_ENABLE_CURSOR_HINTS sections as this code has never been in use. Start use OPFLAG_SEEKEQ instead of equal BTREE_SEEK_EQ as this macro name has no sense since no btree present in SQL. Resolves #3121.
Deleted BTREE_BULKLOAD and OPFLAG_BULKCSR as they become useless since btree.c was dropped as a part of #2419. Removed SQLITE_ENABLE_CURSOR_HINTS sections as this code has never been in use. Start use OPFLAG_SEEKEQ instead of equal BTREE_SEEK_EQ as this macro name has no sense since no btree present in SQL. Resolves #3121.
There're two different things here:
hints
are useful for Tarantool (values are BTREE_BULKLOAD and BTREE_SEEK_EQ) and adopt it if so. Remove all traces otherwisestatus
flag in cursor structurer (VALID/INVALID). Need to check if this flag can be used w/ Tarantool backend. Remove all traces otherwiseThe text was updated successfully, but these errors were encountered: