aboutsummaryrefslogtreecommitdiff
path: root/src/pragma.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-04-11 13:26:18 +0000
committerdrh <drh@noemail.net>2013-04-11 13:26:18 +0000
commitef8e986bde954308f2bcb951dfccd23c04809fc4 (patch)
tree9e3c07895b69f48fca745ce302ee1ba5b8c28d5d /src/pragma.c
parente3be8c86277b72d8ce281d347792c543f5084544 (diff)
downloadsqlite-ef8e986bde954308f2bcb951dfccd23c04809fc4.tar.gz
sqlite-ef8e986bde954308f2bcb951dfccd23c04809fc4.zip
Fix pragma code generation so that it always outputs an OP_Trace opcode so
that pragmas are shown in sqlite3_trace() output. FossilOrigin-Name: 663f04bd48bc6f302230a22bd22b82bde2353943
Diffstat (limited to 'src/pragma.c')
-rw-r--r--src/pragma.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pragma.c b/src/pragma.c
index 340e62d0d..f4fc73d29 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -319,7 +319,7 @@ void sqlite3Pragma(
int rc; /* return value form SQLITE_FCNTL_PRAGMA */
sqlite3 *db = pParse->db; /* The database connection */
Db *pDb; /* The specific database being pragmaed */
- Vdbe *v = pParse->pVdbe = sqlite3VdbeCreate(db); /* Prepared statement */
+ Vdbe *v = sqlite3GetVdbe(pParse); /* Prepared statement */
if( v==0 ) return;
sqlite3VdbeRunOnlyOnce(v);
@@ -402,11 +402,12 @@ void sqlite3Pragma(
static const VdbeOpList getCacheSize[] = {
{ OP_Transaction, 0, 0, 0}, /* 0 */
{ OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */
- { OP_IfPos, 1, 7, 0},
+ { OP_IfPos, 1, 8, 0},
{ OP_Integer, 0, 2, 0},
{ OP_Subtract, 1, 2, 1},
- { OP_IfPos, 1, 7, 0},
+ { OP_IfPos, 1, 8, 0},
{ OP_Integer, 0, 1, 0}, /* 6 */
+ { OP_Noop, 0, 0, 0},
{ OP_ResultRow, 1, 1, 0},
};
int addr;