[patches] [PATCH V2 2/9] sql: remove P4_TABLE type from 4th vdbe arg
Bulat Niatshin
niatshin at tarantool.org
Tue Feb 27 16:54:47 MSK 2018
Remove P4_Table type from 4th VDBE argument, because there are no tables
anymore
For #3119
---
src/box/sql/delete.c | 1 -
src/box/sql/update.c | 3 ---
src/box/sql/vdbe.h | 8 +++-----
src/box/sql/vdbeaux.c | 4 ----
4 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/box/sql/delete.c b/src/box/sql/delete.c
index 832af89fd..d87b75436 100644
--- a/src/box/sql/delete.c
+++ b/src/box/sql/delete.c
@@ -813,7 +813,6 @@ sqlite3GenerateRowDelete(Parse * pParse, /* Parsing context */
/* sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,iIdxNoSeek); */
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur,
(count ? OPFLAG_NCHANGE : 0));
- sqlite3VdbeAppendP4(v, (char *)pTab, P4_TABLE);
if (eMode != ONEPASS_OFF) {
sqlite3VdbeChangeP5(v, OPFLAG_AUXDELETE);
}
diff --git a/src/box/sql/update.c b/src/box/sql/update.c
index 85d18cbde..9a86589ac 100644
--- a/src/box/sql/update.c
+++ b/src/box/sql/update.c
@@ -628,9 +628,6 @@ sqlite3Update(Parse * pParse, /* The parser context */
((hasFK || chngKey
|| pPk != 0) ? 0 : OPFLAG_ISNOOP),
regNewRowid);
- if (!pParse->nested) {
- sqlite3VdbeAppendP4(v, pTab, P4_TABLE);
- }
#else
if (hasFK || chngPk || pPk != 0) {
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);
diff --git a/src/box/sql/vdbe.h b/src/box/sql/vdbe.h
index 5c40e3f72..7241963e4 100644
--- a/src/box/sql/vdbe.h
+++ b/src/box/sql/vdbe.h
@@ -80,7 +80,6 @@ struct VdbeOp {
KeyInfo *pKeyInfo; /* Used when p4type is P4_KEYINFO */
int *ai; /* Used when p4type is P4_INTARRAY */
SubProgram *pProgram; /* Used when p4type is P4_SUBPROGRAM */
- Table *pTab; /* Used when p4type is P4_TABLE */
Index *pIndex; /* Used when p4type is P4_INDEX */
#ifdef SQLITE_ENABLE_CURSOR_HINTS
Expr *pExpr; /* Used when p4type is P4_EXPR */
@@ -142,10 +141,9 @@ typedef struct VdbeOpList VdbeOpList;
#define P4_INTARRAY (-12) /* P4 is a vector of 32-bit integers */
#define P4_SUBPROGRAM (-13) /* P4 is a pointer to a SubProgram structure */
#define P4_ADVANCE (-14) /* P4 is a pointer to BtreeNext() or BtreePrev() */
-#define P4_TABLE (-15) /* P4 is a pointer to a Table structure */
-#define P4_INDEX (-16) /* P4 is a pointer to a Index structure */
-#define P4_FUNCCTX (-17) /* P4 is a pointer to an sqlite3_context object */
-#define P4_BOOL (-18) /* P4 is a bool value */
+#define P4_INDEX (-15) /* P4 is a pointer to a Index structure */
+#define P4_FUNCCTX (-16) /* P4 is a pointer to an sqlite3_context object */
+#define P4_BOOL (-17) /* P4 is a bool value */
/* Error message codes for OP_Halt */
diff --git a/src/box/sql/vdbeaux.c b/src/box/sql/vdbeaux.c
index d7546ab43..4802e69d7 100644
--- a/src/box/sql/vdbeaux.c
+++ b/src/box/sql/vdbeaux.c
@@ -1629,10 +1629,6 @@ displayP4(Op * pOp, char *zTemp, int nTemp)
zTemp[0] = 0;
break;
}
- case P4_TABLE:{
- sqlite3XPrintf(&x, "%s", pOp->p4.pTab->zName);
- break;
- }
default:{
zP4 = pOp->p4.z;
if (zP4 == 0) {
--
2.14.1
More information about the Tarantool-patches
mailing list