sql: [#2300] Fix opmitizer to conform Tarantool fields layout.
src/lib/sqlite/src/ * expr.c (sqlite3SetHasNullFlag): Add column to check for null, as Tarantool doesn't change order of fields in index. So, first key field in index has no number 0. (sqlite3FindInIndex): Pass column number of first key in index to check for null. (sqlite3CodeSubselect): Pass 0, as first column of table is always first. (sqlite3ExprCodeIN): 1. Comment. Check that aiMap containst integers between 0 and nVector-1 is not relevant for Tarantool. As index keys are references to original table columns. 2. Check for (aiMap[i] == i) is not relevant since order of column numbers are original. Comment whole loop, which allocates new register range. 3. Fix column fetch: take into account Tarantool column order.
Loading
Please register or sign in to comment