Change to OP_PutIntKey to use new btree API. (CVS 1346)
FossilOrigin-Name: c080fed7b58e754bb34afe597ff3b2f399c7d313
This commit is contained in:
parent
f328bc80ce
commit
5f8d8a844c
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Work\stoward\sgetting\sthe\snew\sbtree.c\sintegrated\swith\svdbe.c.\s(CVS\s1345)
|
||||
D 2004-05-10T23:29:49
|
||||
C Change\sto\sOP_PutIntKey\sto\suse\snew\sbtree\sAPI.\s(CVS\s1346)
|
||||
D 2004-05-11T00:28:43
|
||||
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
||||
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||
@ -63,7 +63,7 @@ F src/update.c 6ca82fc4a0fb4d7f134e961921c906f6f3c8bc74
|
||||
F src/utf.c fc799748d43fe1982d157b871e3e420a19c85d4f
|
||||
F src/util.c 74ee316594f68c41aed1884d737ab4085d479455
|
||||
F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476
|
||||
F src/vdbe.c 24a2dbe73ad2f283e70fda6f2ce74ac146239005
|
||||
F src/vdbe.c c6c763868eec22a5d7b23357a89fa7792cc9575b
|
||||
F src/vdbe.h 2dc4d1161b64f5684faa6a2d292e318a185ecb2e
|
||||
F src/vdbeInt.h d5786e1c4f7dadac24e3baeed9847dbfed3016de
|
||||
F src/vdbeaux.c 943484a2437b6cf40d1ffd3d62e48b5c9a043c5a
|
||||
@ -188,7 +188,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
|
||||
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
|
||||
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
|
||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||
P 84506b23365933383397e02a8ec5a980c57c80fc
|
||||
R 00b64215240cbce0ff6f014e73120057
|
||||
U drh
|
||||
Z 014c7bdc3d67480b085cd3793f146069
|
||||
P bc5a2dafa1df74ba6403b4751ac1c33b0fee2884
|
||||
R 8e699e3ea26654772e1f0482b7621587
|
||||
U danielk1977
|
||||
Z e970f7cae661bb80a4780d6bbbd8aa7f
|
||||
|
@ -1 +1 @@
|
||||
bc5a2dafa1df74ba6403b4751ac1c33b0fee2884
|
||||
c080fed7b58e754bb34afe597ff3b2f399c7d313
|
23
src/vdbe.c
23
src/vdbe.c
@ -43,7 +43,7 @@
|
||||
** in this file for details. If in doubt, do not deviate from existing
|
||||
** commenting and indentation practices when changing or adding code.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.274 2004/05/10 23:29:50 drh Exp $
|
||||
** $Id: vdbe.c,v 1.275 2004/05/11 00:28:43 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -3198,16 +3198,29 @@ case OP_PutStrKey: {
|
||||
assert( i>=0 && i<p->nCursor );
|
||||
if( ((pC = &p->aCsr[i])->pCursor!=0 || pC->pseudoTable) ){
|
||||
char *zKey;
|
||||
int nKey, iKey;
|
||||
i64 nKey;
|
||||
int iKey;
|
||||
if( pOp->opcode==OP_PutStrKey ){
|
||||
Stringify(pNos);
|
||||
nKey = pNos->n;
|
||||
zKey = pNos->z;
|
||||
}else{
|
||||
assert( pNos->flags & MEM_Int );
|
||||
nKey = sizeof(int);
|
||||
iKey = intToKey(pNos->i);
|
||||
zKey = (char*)&iKey;
|
||||
|
||||
/* If the table is an INTKEY table, set nKey to the value of
|
||||
** the integer key, and zKey to NULL.
|
||||
*/
|
||||
if( pC->intKey ){
|
||||
nKey = pNos->i;
|
||||
zKey = 0;
|
||||
}else{
|
||||
/* TODO: can this happen? zKey is not correctly byte-ordered here! */
|
||||
assert(!"TODO");
|
||||
nKey = sizeof(i64);
|
||||
zKey = (char*)&iKey;
|
||||
}
|
||||
iKey = pNos->i;
|
||||
|
||||
if( pOp->p2 & OPFLAG_NCHANGE ) db->nChange++;
|
||||
if( pOp->p2 & OPFLAG_LASTROWID ) db->lastRowid = pNos->i;
|
||||
if( pOp->p2 & OPFLAG_CSCHANGE ) db->csChange++;
|
||||
|
Loading…
Reference in New Issue
Block a user