aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2004-05-18 01:23:38 +0000
committerdanielk1977 <danielk1977@noemail.net>2004-05-18 01:23:38 +0000
commitb4964b723c3642dccb530a0ca7af06213c38efd5 (patch)
treec8a55418ab180fe7d22a6a68898d350a4eaafd1f /src/insert.c
parente014a83880e3064cbc202de5ff92a4059faa274c (diff)
downloadsqlite-b4964b723c3642dccb530a0ca7af06213c38efd5.tar.gz
sqlite-b4964b723c3642dccb530a0ca7af06213c38efd5.zip
Omit the '\0' at the end of UTF-8 strings on disk (it is implied). Also
don't store the number of rows at the beginning of each table record. (CVS 1390) FossilOrigin-Name: 202a470f2c1804a96e69f16709d1a92e405971f0
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c
index fd73dbba8..f572bb893 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -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.100 2004/05/17 10:48:58 danielk1977 Exp $
+** $Id: insert.c,v 1.101 2004/05/18 01:23:38 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -307,6 +307,7 @@ void sqlite3Insert(
*/
sqlite3VdbeChangeP2(v, iInitCode, sqlite3VdbeCurrentAddr(v));
sqlite3VdbeAddOp(v, OP_OpenTemp, srcTab, 0);
+ sqlite3VdbeAddOp(v, OP_SetNumColumns, srcTab, pTab->nCol);
sqlite3VdbeAddOp(v, OP_Goto, 0, iSelectLoop);
sqlite3VdbeResolveLabel(v, iCleanup);
}else{
@@ -1001,6 +1002,7 @@ int sqlite3OpenTableAndIndices(Parse *pParse, Table *pTab, int base){
assert( v!=0 );
sqlite3VdbeAddOp(v, OP_Integer, pTab->iDb, 0);
sqlite3VdbeOp3(v, OP_OpenWrite, base, pTab->tnum, pTab->zName, P3_STATIC);
+ sqlite3VdbeAddOp(v, OP_SetNumColumns, base, pTab->nCol);
for(i=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
sqlite3VdbeAddOp(v, OP_Integer, pIdx->iDb, 0);
sqlite3VdbeOp3(v, OP_OpenWrite, i+base, pIdx->tnum, pIdx->zName, P3_STATIC);