Remove redundant opcodes OP_MakeKey and OP_MakeIdxKey. (CVS 1612)

FossilOrigin-Name: a71a9ff114f2162696d8d37fbc87b315568f6dcb
This commit is contained in:
danielk1977
2004-06-17 07:53:01 +00:00
parent f736b77160
commit ededfd5e83
8 changed files with 67 additions and 117 deletions
+4 -3
View File
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.111 2004/06/16 12:00:54 danielk1977 Exp $
** $Id: insert.c,v 1.112 2004/06/17 07:53:03 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -867,7 +867,7 @@ void sqlite3GenerateConstraintChecks(
sqlite3VdbeAddOp(v, OP_Dup, i+extra+nCol-idx, 1);
}
}
jumpInst1 = sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0);
jumpInst1 = sqlite3VdbeAddOp(v, OP_MakeRecord, pIdx->nColumn, (1<<24));
sqlite3IndexAffinityStr(v, pIdx);
/* Find out what action to take in case there is an indexing conflict */
@@ -936,8 +936,9 @@ void sqlite3GenerateConstraintChecks(
default: assert(0);
}
contAddr = sqlite3VdbeCurrentAddr(v);
assert( contAddr<(1<<24) );
#if NULL_DISTINCT_FOR_UNIQUE
sqlite3VdbeChangeP2(v, jumpInst1, contAddr);
sqlite3VdbeChangeP2(v, jumpInst1, contAddr | (1<<24));
#endif
sqlite3VdbeChangeP2(v, jumpInst2, contAddr);
}