mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Bug fix associated with OP_SetNumColumns in insert.c. Also changed a
variable name in OP_Column. (CVS 1413) FossilOrigin-Name: bf2181f13fdad72d8c90eccc2d29034178181731
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C VACUUM\sworks\sagain.\s(CVS\s1412)
|
C Bug\sfix\sassociated\swith\sOP_SetNumColumns\sin\sinsert.c.\s\sAlso\schanged\sa\nvariable\sname\sin\sOP_Column.\s(CVS\s1413)
|
||||||
D 2004-05-20T02:01:27
|
D 2004-05-20T02:42:16
|
||||||
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
||||||
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
||||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||||
@@ -35,7 +35,7 @@ F src/expr.c 34fceec0ae7d9108d6cf98b0685d3d2afa962728
|
|||||||
F src/func.c cfbb7096efb58e2857e3b312a8958a12774b625a
|
F src/func.c cfbb7096efb58e2857e3b312a8958a12774b625a
|
||||||
F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
||||||
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
||||||
F src/insert.c 0ee4c4039fede2b9ab594c4d2db24c9b22e0fbc5
|
F src/insert.c 04865f0a8a5cbc81eab7ca7406498d5356ef0763
|
||||||
F src/main.c 2bfbddaea0a1db592967f4b0844473a24adce2fe
|
F src/main.c 2bfbddaea0a1db592967f4b0844473a24adce2fe
|
||||||
F src/md5.c 8e39fdae6d8776b87558e91dcc94740c9b635a9c
|
F src/md5.c 8e39fdae6d8776b87558e91dcc94740c9b635a9c
|
||||||
F src/os.c ddcda92f7fd71b4513c57c1ec797917f206d504e
|
F src/os.c ddcda92f7fd71b4513c57c1ec797917f206d504e
|
||||||
@@ -63,7 +63,7 @@ F src/update.c 1f6687f8d1085f896a24c0fa13d802223ed55539
|
|||||||
F src/utf.c 72a9843000985d11100e711e0ef06ff4b8946057
|
F src/utf.c 72a9843000985d11100e711e0ef06ff4b8946057
|
||||||
F src/util.c 35d20bd8d467861747262d12b87045d937781d93
|
F src/util.c 35d20bd8d467861747262d12b87045d937781d93
|
||||||
F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476
|
F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476
|
||||||
F src/vdbe.c 973ffe763e40b0a5c993d5f5632de58a37c411db
|
F src/vdbe.c fe412966e48948b680a5bc25796e6e9727174b4b
|
||||||
F src/vdbe.h 314e9c07db73a42a6ba91ab7539e27652fc88870
|
F src/vdbe.h 314e9c07db73a42a6ba91ab7539e27652fc88870
|
||||||
F src/vdbeInt.h 97b95c622ea467d39879ae97d07732ebb4891b76
|
F src/vdbeInt.h 97b95c622ea467d39879ae97d07732ebb4891b76
|
||||||
F src/vdbeaux.c 0039a786c6d1c1eeff36f50ad2c528de70e11b26
|
F src/vdbeaux.c 0039a786c6d1c1eeff36f50ad2c528de70e11b26
|
||||||
@@ -193,7 +193,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
|
|||||||
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
|
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
|
||||||
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
|
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
|
||||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||||
P 46b0942239dde9982abaaa7f77d5cf8375eb4209
|
P c4e1d02ffded1421c09b0c8e45954e69f3583297
|
||||||
R edbaa540380795e64aea48f7af64d6d8
|
R 00efca936dc0d4e7252b5e6e6ac01b8b
|
||||||
U drh
|
U drh
|
||||||
Z f1811767ec20f90795abc445172ab0b2
|
Z f146143edcb95dd51e33c2460fa9add3
|
||||||
|
@@ -1 +1 @@
|
|||||||
c4e1d02ffded1421c09b0c8e45954e69f3583297
|
bf2181f13fdad72d8c90eccc2d29034178181731
|
@@ -12,7 +12,7 @@
|
|||||||
** This file contains C code routines that are called by the parser
|
** This file contains C code routines that are called by the parser
|
||||||
** to handle INSERT statements in SQLite.
|
** to handle INSERT statements in SQLite.
|
||||||
**
|
**
|
||||||
** $Id: insert.c,v 1.103 2004/05/19 14:56:56 drh Exp $
|
** $Id: insert.c,v 1.104 2004/05/20 02:42:16 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@@ -307,7 +307,7 @@ void sqlite3Insert(
|
|||||||
*/
|
*/
|
||||||
sqlite3VdbeChangeP2(v, iInitCode, sqlite3VdbeCurrentAddr(v));
|
sqlite3VdbeChangeP2(v, iInitCode, sqlite3VdbeCurrentAddr(v));
|
||||||
sqlite3VdbeAddOp(v, OP_OpenTemp, srcTab, 0);
|
sqlite3VdbeAddOp(v, OP_OpenTemp, srcTab, 0);
|
||||||
sqlite3VdbeAddOp(v, OP_SetNumColumns, srcTab, pTab->nCol);
|
sqlite3VdbeAddOp(v, OP_SetNumColumns, srcTab, nColumn);
|
||||||
sqlite3VdbeAddOp(v, OP_Goto, 0, iSelectLoop);
|
sqlite3VdbeAddOp(v, OP_Goto, 0, iSelectLoop);
|
||||||
sqlite3VdbeResolveLabel(v, iCleanup);
|
sqlite3VdbeResolveLabel(v, iCleanup);
|
||||||
}else{
|
}else{
|
||||||
|
27
src/vdbe.c
27
src/vdbe.c
@@ -43,7 +43,7 @@
|
|||||||
** in this file for details. If in doubt, do not deviate from existing
|
** in this file for details. If in doubt, do not deviate from existing
|
||||||
** commenting and indentation practices when changing or adding code.
|
** commenting and indentation practices when changing or adding code.
|
||||||
**
|
**
|
||||||
** $Id: vdbe.c,v 1.306 2004/05/20 01:12:35 danielk1977 Exp $
|
** $Id: vdbe.c,v 1.307 2004/05/20 02:42:17 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -500,6 +500,13 @@ static void applyAffinity(Mem *pRec, char affinity){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Move data out of a btree key or data field and into a Mem structure.
|
||||||
|
** The data or key is taken from the entry that pCur is currently pointing
|
||||||
|
** to. offset and amt determine what portion of the data or key to retrieve.
|
||||||
|
** key is true to get the key or false to get data. The result is written
|
||||||
|
** into the pMem element.
|
||||||
|
*/
|
||||||
static int getBtreeMem(
|
static int getBtreeMem(
|
||||||
BtCursor *pCur, /* Cursor pointing at record to retrieve. */
|
BtCursor *pCur, /* Cursor pointing at record to retrieve. */
|
||||||
int offset, /* Offset from the start of data to return bytes from. */
|
int offset, /* Offset from the start of data to return bytes from. */
|
||||||
@@ -1972,8 +1979,8 @@ case OP_Column: {
|
|||||||
int nn;
|
int nn;
|
||||||
|
|
||||||
char *zData;
|
char *zData;
|
||||||
Mem zMem;
|
Mem sMem;
|
||||||
zMem.flags = 0;
|
sMem.flags = 0;
|
||||||
|
|
||||||
assert( i<p->nCursor );
|
assert( i<p->nCursor );
|
||||||
pTos++;
|
pTos++;
|
||||||
@@ -2087,11 +2094,11 @@ case OP_Column: {
|
|||||||
max_space = payloadSize;
|
max_space = payloadSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = getBtreeMem(pCrsr, 0, max_space, pC->keyAsData, &zMem);
|
rc = getBtreeMem(pCrsr, 0, max_space, pC->keyAsData, &sMem);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
goto abort_due_to_error;
|
goto abort_due_to_error;
|
||||||
}
|
}
|
||||||
zData = zMem.z;
|
zData = sMem.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read all the serial types for the record. At the end of this block
|
/* Read all the serial types for the record. At the end of this block
|
||||||
@@ -2103,8 +2110,8 @@ case OP_Column: {
|
|||||||
pC->nHeader = offset;
|
pC->nHeader = offset;
|
||||||
pC->cacheValid = 1;
|
pC->cacheValid = 1;
|
||||||
|
|
||||||
Release(&zMem);
|
Release(&sMem);
|
||||||
zMem.flags = 0;
|
sMem.flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compute the offset from the beginning of the record to the beginning
|
/* Compute the offset from the beginning of the record to the beginning
|
||||||
@@ -2119,12 +2126,12 @@ case OP_Column: {
|
|||||||
zData = &zRec[offset];
|
zData = &zRec[offset];
|
||||||
}else{
|
}else{
|
||||||
len = sqlite3VdbeSerialTypeLen(pC->aType[p2]);
|
len = sqlite3VdbeSerialTypeLen(pC->aType[p2]);
|
||||||
getBtreeMem(pCrsr, offset, len, pC->keyAsData, &zMem);
|
getBtreeMem(pCrsr, offset, len, pC->keyAsData, &sMem);
|
||||||
zData = zMem.z;
|
zData = sMem.z;
|
||||||
}
|
}
|
||||||
sqlite3VdbeSerialGet(zData, pC->aType[p2], pTos);
|
sqlite3VdbeSerialGet(zData, pC->aType[p2], pTos);
|
||||||
|
|
||||||
Release(&zMem);
|
Release(&sMem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user