mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Continuing work toward converting the VM into a register machine. (CVS 4707)
FossilOrigin-Name: a6dddebcc5ccbbf3009c9d06163a8b59036331de
This commit is contained in:
14
src/vtab.c
14
src/vtab.c
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to help implement virtual tables.
|
||||
**
|
||||
** $Id: vtab.c,v 1.60 2008/01/03 00:01:25 drh Exp $
|
||||
** $Id: vtab.c,v 1.61 2008/01/12 12:48:08 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
#include "sqliteInt.h"
|
||||
@@ -259,20 +259,20 @@ void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
|
||||
** SQLITE_MASTER table. We just need to update that slot with all
|
||||
** the information we've collected.
|
||||
**
|
||||
** The top of the stack is the rootpage allocated by sqlite3StartTable().
|
||||
** This value is always 0 and is ignored, a virtual table does not have a
|
||||
** rootpage. The next entry on the stack is the rowid of the record
|
||||
** in the sqlite_master table.
|
||||
** The VM register number pParse->regRowid holds the rowid of an
|
||||
** entry in the sqlite_master table tht was created for this vtab
|
||||
** by sqlite3StartTable().
|
||||
*/
|
||||
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
|
||||
sqlite3NestedParse(pParse,
|
||||
"UPDATE %Q.%s "
|
||||
"SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q "
|
||||
"WHERE rowid=#1",
|
||||
"WHERE rowid=#%d",
|
||||
db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
|
||||
pTab->zName,
|
||||
pTab->zName,
|
||||
zStmt
|
||||
zStmt,
|
||||
pParse->regRowid
|
||||
);
|
||||
sqlite3_free(zStmt);
|
||||
v = sqlite3GetVdbe(pParse);
|
||||
|
Reference in New Issue
Block a user