[patches] [PATCH 6/8] sql: refactor CursorPayload structure
Bulat Niatshin
niatshin at tarantool.org
Wed Feb 21 15:33:19 MSK 2018
Refactor CursorPayload structure. Remove all the fields except
pKey and nKey, because only them are actually used in sql.c
For #3119
---
src/box/sql/cursor.h | 4 ----
src/box/sql/vdbe.c | 2 --
2 files changed, 6 deletions(-)
diff --git a/src/box/sql/cursor.h b/src/box/sql/cursor.h
index e89ee10d7..4ae455e99 100644
--- a/src/box/sql/cursor.h
+++ b/src/box/sql/cursor.h
@@ -92,10 +92,6 @@ int sqlite3CursorMovetoUnpacked(BtCursor *, UnpackedRecord * pUnKey, int *pRes);
struct CursorPayload {
const void *pKey; /* Key content for indexes. NULL for tables */
sqlite3_int64 nKey; /* Size of pKey for indexes. PRIMARY KEY for tabs */
- const void *pData; /* Data for tables. NULL for indexes */
- struct Mem *aMem; /* First of nMem value in the unpacked pKey */
- u16 nMem; /* Number of aMem[] value. Might be zero */
- int nData; /* Size of pData. 0 if none. */
};
int sqlite3CursorNext(BtCursor *, int *pRes);
diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
index 5dc66b147..910e7f681 100644
--- a/src/box/sql/vdbe.c
+++ b/src/box/sql/vdbe.c
@@ -4474,8 +4474,6 @@ case OP_IdxInsert: { /* in2 */
} else {
x.nKey = pIn2->n;
x.pKey = pIn2->z;
- x.aMem = aMem + pOp->p3;
- x.nMem = (u16)pOp->p4.i;
BtCursor *pBtCur = pC->uc.pCursor;
assert((x.pKey == 0) == (pBtCur->pKeyInfo == 0));
--
2.14.1
More information about the Tarantool-patches
mailing list