mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Make all ephemeral tables built to hold the RHS of an IN operator be
index-btrees, never table-btrees, regardless of whether or not they are used as IN_INDEX_LOOP or IN_INDEX_MEMBERSHIP. That way, the same ephmerial table can be reused for both cases. FossilOrigin-Name: c2d50df8fd1a1fdae6226a3e77296ded09b53a74540caedd4868e686a93cbc10
This commit is contained in:
24
src/vdbe.c
24
src/vdbe.c
@@ -4569,14 +4569,7 @@ case OP_NewRowid: { /* out2 */
|
||||
** This instruction only works on tables. The equivalent instruction
|
||||
** for indices is OP_IdxInsert.
|
||||
*/
|
||||
/* Opcode: InsertInt P1 P2 P3 P4 P5
|
||||
** Synopsis: intkey=P3 data=r[P2]
|
||||
**
|
||||
** This works exactly like OP_Insert except that the key is the
|
||||
** integer value P3, not the value of the integer stored in register P3.
|
||||
*/
|
||||
case OP_Insert:
|
||||
case OP_InsertInt: {
|
||||
case OP_Insert: {
|
||||
Mem *pData; /* MEM cell holding data for the record to be inserted */
|
||||
Mem *pKey; /* MEM cell holding key for the record */
|
||||
VdbeCursor *pC; /* Cursor to table into which insert is written */
|
||||
@@ -4597,16 +4590,11 @@ case OP_InsertInt: {
|
||||
REGISTER_TRACE(pOp->p2, pData);
|
||||
sqlite3VdbeIncrWriteCounter(p, pC);
|
||||
|
||||
if( pOp->opcode==OP_Insert ){
|
||||
pKey = &aMem[pOp->p3];
|
||||
assert( pKey->flags & MEM_Int );
|
||||
assert( memIsValid(pKey) );
|
||||
REGISTER_TRACE(pOp->p3, pKey);
|
||||
x.nKey = pKey->u.i;
|
||||
}else{
|
||||
assert( pOp->opcode==OP_InsertInt );
|
||||
x.nKey = pOp->p3;
|
||||
}
|
||||
pKey = &aMem[pOp->p3];
|
||||
assert( pKey->flags & MEM_Int );
|
||||
assert( memIsValid(pKey) );
|
||||
REGISTER_TRACE(pOp->p3, pKey);
|
||||
x.nKey = pKey->u.i;
|
||||
|
||||
if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){
|
||||
assert( pC->iDb>=0 );
|
||||
|
Reference in New Issue
Block a user