From: drh Date: Sat, 21 Mar 2009 16:19:26 +0000 (+0000) Subject: Update comments in build.c to conform to the latest implementation. (CVS 6369) X-Git-Tag: version-3.6.15~381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fa991b9e32a471464081d92160df30d28ac2908;p=thirdparty%2Fsqlite.git Update comments in build.c to conform to the latest implementation. (CVS 6369) FossilOrigin-Name: a915e8e0a429ab6a10536c45264a790c2d076461 --- diff --git a/manifest b/manifest index 6639868479..73afc84c53 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Rig\sthe\sunix\sbackend\sto\suse\sfdatasync()\sby\sdefault,\swithout\shaving\sto\sset\sthe\nHAVE_FDATASYNC\smacro.\s\sSystems\sthat\sdo\snot\ssupport\sfdatasync()\scan\sbe\scompiled\nusing\s-Dfdatasync=fsync.\s(CVS\s6368) -D 2009-03-21T14:56:52 +C Update\scomments\sin\sbuild.c\sto\sconform\sto\sthe\slatest\simplementation.\s(CVS\s6369) +D 2009-03-21T16:19:26 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -106,7 +106,7 @@ F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab F src/btree.c 4fbb5f26f450bee7356ec63cb664c8d733e28d89 F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816 F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5 -F src/build.c c816377c118047418fda81edb8866b9c7a4e4031 +F src/build.c f217f9ce2528c5b968f77a11998948466ea81bc9 F src/callback.c 09c6fedc77a45db99ba25a75d61382830314b357 F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c F src/date.c 0d804df3bbda46329946a01ff5c75c3f4f135218 @@ -709,7 +709,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 0d6b11bcf67f86e5554806869d32338e5831833e -R 0bec67d81685c3152a1b50fee4db509f +P a331562727be465874a66c2c1d15ee070f96f7e0 +R 4402ba006efc4583ed7d0cf413c713f4 U drh -Z 7a8c6e147dafb29b1784fb5910b3e5cf +Z 38186ef5f341ca0ce183f01a326c1493 diff --git a/manifest.uuid b/manifest.uuid index 375120d36c..9911b68572 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a331562727be465874a66c2c1d15ee070f96f7e0 \ No newline at end of file +a915e8e0a429ab6a10536c45264a790c2d076461 \ No newline at end of file diff --git a/src/build.c b/src/build.c index c9bc0e25da..e9fcb27b66 100644 --- a/src/build.c +++ b/src/build.c @@ -22,7 +22,7 @@ ** COMMIT ** ROLLBACK ** -** $Id: build.c,v 1.524 2009/03/18 18:43:36 danielk1977 Exp $ +** $Id: build.c,v 1.525 2009/03/21 16:19:26 drh Exp $ */ #include "sqliteInt.h" @@ -891,9 +891,10 @@ void sqlite3StartTable( ** The record created does not contain anything yet. It will be replaced ** by the real entry in code generated at sqlite3EndTable(). ** - ** The rowid for the new entry is left on the top of the stack. - ** The rowid value is needed by the code that sqlite3EndTable will - ** generate. + ** The rowid for the new entry is left in register pParse->regRowid. + ** The root page number of the new table is left in reg pParse->regRoot. + ** The rowid and root page number values are needed by the code that + ** sqlite3EndTable will generate. */ #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) if( isView || isVirtual ){ @@ -1562,8 +1563,7 @@ void sqlite3EndTable( } /* If not initializing, then create a record for the new table - ** in the SQLITE_MASTER table of the database. The record number - ** for the new table entry should already be on the stack. + ** in the SQLITE_MASTER table of the database. ** ** If this is a TEMPORARY table, write the entry into the auxiliary ** file instead of into the main database file. @@ -1580,9 +1580,8 @@ void sqlite3EndTable( sqlite3VdbeAddOp1(v, OP_Close, 0); - /* Create the rootpage for the new table and push it onto the stack. - ** A view has no rootpage, so just push a zero onto the stack for - ** views. Initialize zType at the same time. + /* + ** Initialize zType for the new view or table. */ if( p->pSelect==0 ){ /* A regular table */ @@ -1598,7 +1597,7 @@ void sqlite3EndTable( /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT ** statement to populate the new table. The root-page number for the - ** new table is on the top of the vdbe stack. + ** new table is in register pParse->regRoot. ** ** Once the SELECT has been coded by sqlite3Select(), it is in a ** suitable state to query for the column names and types to be used @@ -1644,9 +1643,7 @@ void sqlite3EndTable( /* A slot for the record has already been allocated in the ** SQLITE_MASTER table. We just need to update that slot with all - ** the information we've collected. The rowid for the preallocated - ** slot is the 2nd item on the stack. The top of the stack is the - ** root page for the new table (or a 0 if this is a view). + ** the information we've collected. */ sqlite3NestedParse(pParse, "UPDATE %Q.%s " @@ -1965,8 +1962,8 @@ static void destroyRootPage(Parse *pParse, int iTable, int iDb){ ** location iTable. The following code modifies the sqlite_master table to ** reflect this. ** - ** The "#%d" in the SQL is a special constant that means whatever value - ** is on the top of the stack. See sqlite3RegisterExpr(). + ** The "#NNN" in the SQL is a special constant that means whatever value + ** is in register NNN. See sqlite3RegisterExpr(). */ sqlite3NestedParse(pParse, "UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d",