OLD | NEW |
1 /* | 1 /* |
2 ** 2003 September 6 | 2 ** 2003 September 6 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
11 ************************************************************************* | 11 ************************************************************************* |
12 ** This is the header file for information that is private to the | 12 ** This is the header file for information that is private to the |
13 ** VDBE. This information used to all be at the top of the single | 13 ** VDBE. This information used to all be at the top of the single |
14 ** source code file "vdbe.c". When that file became too big (over | 14 ** source code file "vdbe.c". When that file became too big (over |
15 ** 6000 lines long) it was split up into several smaller files and | 15 ** 6000 lines long) it was split up into several smaller files and |
16 ** this header information was factored out. | 16 ** this header information was factored out. |
17 ** | |
18 ** $Id: vdbeInt.h,v 1.174 2009/06/23 14:15:04 drh Exp $ | |
19 */ | 17 */ |
20 #ifndef _VDBEINT_H_ | 18 #ifndef _VDBEINT_H_ |
21 #define _VDBEINT_H_ | 19 #define _VDBEINT_H_ |
22 | 20 |
23 /* | 21 /* |
24 ** SQL is translated into a sequence of instructions to be | 22 ** SQL is translated into a sequence of instructions to be |
25 ** executed by a virtual machine. Each instruction is an instance | 23 ** executed by a virtual machine. Each instruction is an instance |
26 ** of the following structure. | 24 ** of the following structure. |
27 */ | 25 */ |
28 typedef struct VdbeOp Op; | 26 typedef struct VdbeOp Op; |
(...skipping 23 matching lines...) Expand all Loading... |
52 int iDb; /* Index of cursor database in db->aDb[] (or -1) */ | 50 int iDb; /* Index of cursor database in db->aDb[] (or -1) */ |
53 i64 lastRowid; /* Last rowid from a Next or NextIdx operation */ | 51 i64 lastRowid; /* Last rowid from a Next or NextIdx operation */ |
54 Bool zeroed; /* True if zeroed out and ready for reuse */ | 52 Bool zeroed; /* True if zeroed out and ready for reuse */ |
55 Bool rowidIsValid; /* True if lastRowid is valid */ | 53 Bool rowidIsValid; /* True if lastRowid is valid */ |
56 Bool atFirst; /* True if pointing to first entry */ | 54 Bool atFirst; /* True if pointing to first entry */ |
57 Bool useRandomRowid; /* Generate new record numbers semi-randomly */ | 55 Bool useRandomRowid; /* Generate new record numbers semi-randomly */ |
58 Bool nullRow; /* True if pointing to a row with no data */ | 56 Bool nullRow; /* True if pointing to a row with no data */ |
59 Bool deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */ | 57 Bool deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */ |
60 Bool isTable; /* True if a table requiring integer keys */ | 58 Bool isTable; /* True if a table requiring integer keys */ |
61 Bool isIndex; /* True if an index containing keys only - no data */ | 59 Bool isIndex; /* True if an index containing keys only - no data */ |
| 60 Bool isOrdered; /* True if the underlying table is BTREE_UNORDERED */ |
62 i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */ | 61 i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */ |
63 Btree *pBt; /* Separate file holding temporary table */ | 62 Btree *pBt; /* Separate file holding temporary table */ |
64 int pseudoTableReg; /* Register holding pseudotable content. */ | 63 int pseudoTableReg; /* Register holding pseudotable content. */ |
65 KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */ | 64 KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */ |
66 int nField; /* Number of fields in the header */ | 65 int nField; /* Number of fields in the header */ |
67 i64 seqCount; /* Sequence counter */ | 66 i64 seqCount; /* Sequence counter */ |
68 sqlite3_vtab_cursor *pVtabCursor; /* The cursor for a virtual table */ | 67 sqlite3_vtab_cursor *pVtabCursor; /* The cursor for a virtual table */ |
69 const sqlite3_module *pModule; /* Module for cursor pVtabCursor */ | 68 const sqlite3_module *pModule; /* Module for cursor pVtabCursor */ |
70 | 69 |
71 /* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or | 70 /* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 RowSet *pRowSet; /* Used only when flags==MEM_RowSet */ | 145 RowSet *pRowSet; /* Used only when flags==MEM_RowSet */ |
147 VdbeFrame *pFrame; /* Used when flags==MEM_Frame */ | 146 VdbeFrame *pFrame; /* Used when flags==MEM_Frame */ |
148 } u; | 147 } u; |
149 double r; /* Real value */ | 148 double r; /* Real value */ |
150 sqlite3 *db; /* The associated database connection */ | 149 sqlite3 *db; /* The associated database connection */ |
151 char *z; /* String or BLOB value */ | 150 char *z; /* String or BLOB value */ |
152 int n; /* Number of characters in string value, excluding '\0' */ | 151 int n; /* Number of characters in string value, excluding '\0' */ |
153 u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */ | 152 u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */ |
154 u8 type; /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */ | 153 u8 type; /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */ |
155 u8 enc; /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */ | 154 u8 enc; /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */ |
| 155 #ifdef SQLITE_DEBUG |
| 156 Mem *pScopyFrom; /* This Mem is a shallow copy of pScopyFrom */ |
| 157 void *pFiller; /* So that sizeof(Mem) is a multiple of 8 */ |
| 158 #endif |
156 void (*xDel)(void *); /* If not null, call this function to delete Mem.z */ | 159 void (*xDel)(void *); /* If not null, call this function to delete Mem.z */ |
157 char *zMalloc; /* Dynamic buffer allocated by sqlite3_malloc() */ | 160 char *zMalloc; /* Dynamic buffer allocated by sqlite3_malloc() */ |
158 }; | 161 }; |
159 | 162 |
160 /* One or more of the following flags are set to indicate the validOK | 163 /* One or more of the following flags are set to indicate the validOK |
161 ** representations of the value stored in the Mem struct. | 164 ** representations of the value stored in the Mem struct. |
162 ** | 165 ** |
163 ** If the MEM_Null flag is set, then the value is an SQL NULL value. | 166 ** If the MEM_Null flag is set, then the value is an SQL NULL value. |
164 ** No other flags may be set in this case. | 167 ** No other flags may be set in this case. |
165 ** | 168 ** |
166 ** If the MEM_Str flag is set then Mem.z points at a string representation. | 169 ** If the MEM_Str flag is set then Mem.z points at a string representation. |
167 ** Usually this is encoded in the same unicode encoding as the main | 170 ** Usually this is encoded in the same unicode encoding as the main |
168 ** database (see below for exceptions). If the MEM_Term flag is also | 171 ** database (see below for exceptions). If the MEM_Term flag is also |
169 ** set, then the string is nul terminated. The MEM_Int and MEM_Real | 172 ** set, then the string is nul terminated. The MEM_Int and MEM_Real |
170 ** flags may coexist with the MEM_Str flag. | 173 ** flags may coexist with the MEM_Str flag. |
171 ** | 174 ** |
172 ** Multiple of these values can appear in Mem.flags. But only one | 175 ** Multiple of these values can appear in Mem.flags. But only one |
173 ** at a time can appear in Mem.type. | 176 ** at a time can appear in Mem.type. |
174 */ | 177 */ |
175 #define MEM_Null 0x0001 /* Value is NULL */ | 178 #define MEM_Null 0x0001 /* Value is NULL */ |
176 #define MEM_Str 0x0002 /* Value is a string */ | 179 #define MEM_Str 0x0002 /* Value is a string */ |
177 #define MEM_Int 0x0004 /* Value is an integer */ | 180 #define MEM_Int 0x0004 /* Value is an integer */ |
178 #define MEM_Real 0x0008 /* Value is a real number */ | 181 #define MEM_Real 0x0008 /* Value is a real number */ |
179 #define MEM_Blob 0x0010 /* Value is a BLOB */ | 182 #define MEM_Blob 0x0010 /* Value is a BLOB */ |
180 #define MEM_RowSet 0x0020 /* Value is a RowSet object */ | 183 #define MEM_RowSet 0x0020 /* Value is a RowSet object */ |
181 #define MEM_Frame 0x0040 /* Value is a VdbeFrame object */ | 184 #define MEM_Frame 0x0040 /* Value is a VdbeFrame object */ |
| 185 #define MEM_Invalid 0x0080 /* Value is undefined */ |
182 #define MEM_TypeMask 0x00ff /* Mask of type bits */ | 186 #define MEM_TypeMask 0x00ff /* Mask of type bits */ |
183 | 187 |
184 /* Whenever Mem contains a valid string or blob representation, one of | 188 /* Whenever Mem contains a valid string or blob representation, one of |
185 ** the following flags must be set to determine the memory management | 189 ** the following flags must be set to determine the memory management |
186 ** policy for Mem.z. The MEM_Term flag tells us whether or not the | 190 ** policy for Mem.z. The MEM_Term flag tells us whether or not the |
187 ** string is \000 or \u0000 terminated | 191 ** string is \000 or \u0000 terminated |
188 */ | 192 */ |
189 #define MEM_Term 0x0200 /* String rep is nul terminated */ | 193 #define MEM_Term 0x0200 /* String rep is nul terminated */ |
190 #define MEM_Dyn 0x0400 /* Need to call sqliteFree() on Mem.z */ | 194 #define MEM_Dyn 0x0400 /* Need to call sqliteFree() on Mem.z */ |
191 #define MEM_Static 0x0800 /* Mem.z points to a static string */ | 195 #define MEM_Static 0x0800 /* Mem.z points to a static string */ |
192 #define MEM_Ephem 0x1000 /* Mem.z points to an ephemeral string */ | 196 #define MEM_Ephem 0x1000 /* Mem.z points to an ephemeral string */ |
193 #define MEM_Agg 0x2000 /* Mem.z points to an agg function context */ | 197 #define MEM_Agg 0x2000 /* Mem.z points to an agg function context */ |
194 #define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */ | 198 #define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */ |
195 | |
196 #ifdef SQLITE_OMIT_INCRBLOB | 199 #ifdef SQLITE_OMIT_INCRBLOB |
197 #undef MEM_Zero | 200 #undef MEM_Zero |
198 #define MEM_Zero 0x0000 | 201 #define MEM_Zero 0x0000 |
199 #endif | 202 #endif |
200 | 203 |
201 | |
202 /* | 204 /* |
203 ** Clear any existing type flags from a Mem and replace them with f | 205 ** Clear any existing type flags from a Mem and replace them with f |
204 */ | 206 */ |
205 #define MemSetTypeFlag(p, f) \ | 207 #define MemSetTypeFlag(p, f) \ |
206 ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f) | 208 ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f) |
207 | 209 |
| 210 /* |
| 211 ** Return true if a memory cell is not marked as invalid. This macro |
| 212 ** is for use inside assert() statements only. |
| 213 */ |
| 214 #ifdef SQLITE_DEBUG |
| 215 #define memIsValid(M) ((M)->flags & MEM_Invalid)==0 |
| 216 #endif |
| 217 |
208 | 218 |
209 /* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains | 219 /* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains |
210 ** additional information about auxiliary information bound to arguments | 220 ** additional information about auxiliary information bound to arguments |
211 ** of the function. This is used to implement the sqlite3_get_auxdata() | 221 ** of the function. This is used to implement the sqlite3_get_auxdata() |
212 ** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data | 222 ** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data |
213 ** that can be associated with a constant argument to a function. This | 223 ** that can be associated with a constant argument to a function. This |
214 ** allows functions such as "regexp" to compile their constant regular | 224 ** allows functions such as "regexp" to compile their constant regular |
215 ** expression argument once and reused the compiled code for multiple | 225 ** expression argument once and reused the compiled code for multiple |
216 ** invocations. | 226 ** invocations. |
217 */ | 227 */ |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 int nLabelAlloc; /* Number of slots allocated in aLabel[] */ | 293 int nLabelAlloc; /* Number of slots allocated in aLabel[] */ |
284 int *aLabel; /* Space to hold the labels */ | 294 int *aLabel; /* Space to hold the labels */ |
285 Mem **apArg; /* Arguments to currently executing user function */ | 295 Mem **apArg; /* Arguments to currently executing user function */ |
286 Mem *aColName; /* Column names to return */ | 296 Mem *aColName; /* Column names to return */ |
287 Mem *pResultSet; /* Pointer to an array of results */ | 297 Mem *pResultSet; /* Pointer to an array of results */ |
288 u16 nResColumn; /* Number of columns in one row of the result set */ | 298 u16 nResColumn; /* Number of columns in one row of the result set */ |
289 u16 nCursor; /* Number of slots in apCsr[] */ | 299 u16 nCursor; /* Number of slots in apCsr[] */ |
290 VdbeCursor **apCsr; /* One element of this array for each open cursor */ | 300 VdbeCursor **apCsr; /* One element of this array for each open cursor */ |
291 u8 errorAction; /* Recovery action to do in case of an error */ | 301 u8 errorAction; /* Recovery action to do in case of an error */ |
292 u8 okVar; /* True if azVar[] has been initialized */ | 302 u8 okVar; /* True if azVar[] has been initialized */ |
293 u16 nVar; /* Number of entries in aVar[] */ | 303 ynVar nVar; /* Number of entries in aVar[] */ |
294 Mem *aVar; /* Values for the OP_Variable opcode. */ | 304 Mem *aVar; /* Values for the OP_Variable opcode. */ |
295 char **azVar; /* Name of variables */ | 305 char **azVar; /* Name of variables */ |
296 u32 magic; /* Magic number for sanity checking */ | 306 u32 magic; /* Magic number for sanity checking */ |
297 int nMem; /* Number of memory locations currently allocated */ | 307 int nMem; /* Number of memory locations currently allocated */ |
298 Mem *aMem; /* The memory locations */ | 308 Mem *aMem; /* The memory locations */ |
299 u32 cacheCtr; /* VdbeCursor row cache generation counter */ | 309 u32 cacheCtr; /* VdbeCursor row cache generation counter */ |
300 int pc; /* The program counter */ | 310 int pc; /* The program counter */ |
301 int rc; /* Value to return */ | 311 int rc; /* Value to return */ |
302 char *zErrMsg; /* Error message written here */ | 312 char *zErrMsg; /* Error message written here */ |
303 u8 explain; /* True if EXPLAIN present on SQL command */ | 313 u8 explain; /* True if EXPLAIN present on SQL command */ |
304 u8 changeCntOn; /* True to update the change-counter */ | 314 u8 changeCntOn; /* True to update the change-counter */ |
305 u8 expired; /* True if the VM needs to be recompiled */ | 315 u8 expired; /* True if the VM needs to be recompiled */ |
| 316 u8 runOnlyOnce; /* Automatically expire on reset */ |
306 u8 minWriteFileFormat; /* Minimum file format for writable database files */ | 317 u8 minWriteFileFormat; /* Minimum file format for writable database files */ |
307 u8 inVtabMethod; /* See comments above */ | 318 u8 inVtabMethod; /* See comments above */ |
308 u8 usesStmtJournal; /* True if uses a statement journal */ | 319 u8 usesStmtJournal; /* True if uses a statement journal */ |
309 u8 readOnly; /* True for read-only statements */ | 320 u8 readOnly; /* True for read-only statements */ |
310 u8 isPrepareV2; /* True if prepared with prepare_v2() */ | 321 u8 isPrepareV2; /* True if prepared with prepare_v2() */ |
311 int nChange; /* Number of db changes made since last reset */ | 322 int nChange; /* Number of db changes made since last reset */ |
312 int btreeMask; /* Bitmask of db->aDb[] entries referenced */ | 323 int btreeMask; /* Bitmask of db->aDb[] entries referenced */ |
313 i64 startTime; /* Time when query started - used for profiling */ | 324 i64 startTime; /* Time when query started - used for profiling */ |
314 BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */ | 325 BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */ |
315 int aCounter[2]; /* Counters used by sqlite3_stmt_status() */ | 326 int aCounter[3]; /* Counters used by sqlite3_stmt_status() */ |
316 char *zSql; /* Text of the SQL statement that generated this */ | 327 char *zSql; /* Text of the SQL statement that generated this */ |
317 void *pFree; /* Free this when deleting the vdbe */ | 328 void *pFree; /* Free this when deleting the vdbe */ |
| 329 i64 nFkConstraint; /* Number of imm. FK constraints this VM */ |
| 330 i64 nStmtDefCons; /* Number of def. constraints when stmt started */ |
318 int iStatement; /* Statement number (or 0 if has not opened stmt) */ | 331 int iStatement; /* Statement number (or 0 if has not opened stmt) */ |
319 #ifdef SQLITE_DEBUG | 332 #ifdef SQLITE_DEBUG |
320 FILE *trace; /* Write an execution trace here, if not NULL */ | 333 FILE *trace; /* Write an execution trace here, if not NULL */ |
321 #endif | 334 #endif |
322 VdbeFrame *pFrame; /* Parent frame */ | 335 VdbeFrame *pFrame; /* Parent frame */ |
323 int nFrame; /* Number of frames in pFrame list */ | 336 int nFrame; /* Number of frames in pFrame list */ |
| 337 u32 expmask; /* Binding to these vars invalidates VM */ |
| 338 SubProgram *pProgram; /* Linked list of all sub-programs used by VM */ |
324 }; | 339 }; |
325 | 340 |
326 /* | 341 /* |
327 ** The following are allowed values for Vdbe.magic | 342 ** The following are allowed values for Vdbe.magic |
328 */ | 343 */ |
329 #define VDBE_MAGIC_INIT 0x26bceaa5 /* Building a VDBE program */ | 344 #define VDBE_MAGIC_INIT 0x26bceaa5 /* Building a VDBE program */ |
330 #define VDBE_MAGIC_RUN 0xbdf20da3 /* VDBE is ready to execute */ | 345 #define VDBE_MAGIC_RUN 0xbdf20da3 /* VDBE is ready to execute */ |
331 #define VDBE_MAGIC_HALT 0x519c2973 /* VDBE has completed execution */ | 346 #define VDBE_MAGIC_HALT 0x519c2973 /* VDBE has completed execution */ |
332 #define VDBE_MAGIC_DEAD 0xb606c3c8 /* The VDBE has been deallocated */ | 347 #define VDBE_MAGIC_DEAD 0xb606c3c8 /* The VDBE has been deallocated */ |
333 | 348 |
(...skipping 20 matching lines...) Expand all Loading... |
354 int sqlite3VdbeList(Vdbe*); | 369 int sqlite3VdbeList(Vdbe*); |
355 int sqlite3VdbeHalt(Vdbe*); | 370 int sqlite3VdbeHalt(Vdbe*); |
356 int sqlite3VdbeChangeEncoding(Mem *, int); | 371 int sqlite3VdbeChangeEncoding(Mem *, int); |
357 int sqlite3VdbeMemTooBig(Mem*); | 372 int sqlite3VdbeMemTooBig(Mem*); |
358 int sqlite3VdbeMemCopy(Mem*, const Mem*); | 373 int sqlite3VdbeMemCopy(Mem*, const Mem*); |
359 void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int); | 374 void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int); |
360 void sqlite3VdbeMemMove(Mem*, Mem*); | 375 void sqlite3VdbeMemMove(Mem*, Mem*); |
361 int sqlite3VdbeMemNulTerminate(Mem*); | 376 int sqlite3VdbeMemNulTerminate(Mem*); |
362 int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*)); | 377 int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*)); |
363 void sqlite3VdbeMemSetInt64(Mem*, i64); | 378 void sqlite3VdbeMemSetInt64(Mem*, i64); |
364 void sqlite3VdbeMemSetDouble(Mem*, double); | 379 #ifdef SQLITE_OMIT_FLOATING_POINT |
| 380 # define sqlite3VdbeMemSetDouble sqlite3VdbeMemSetInt64 |
| 381 #else |
| 382 void sqlite3VdbeMemSetDouble(Mem*, double); |
| 383 #endif |
365 void sqlite3VdbeMemSetNull(Mem*); | 384 void sqlite3VdbeMemSetNull(Mem*); |
366 void sqlite3VdbeMemSetZeroBlob(Mem*,int); | 385 void sqlite3VdbeMemSetZeroBlob(Mem*,int); |
367 void sqlite3VdbeMemSetRowSet(Mem*); | 386 void sqlite3VdbeMemSetRowSet(Mem*); |
368 int sqlite3VdbeMemMakeWriteable(Mem*); | 387 int sqlite3VdbeMemMakeWriteable(Mem*); |
369 int sqlite3VdbeMemStringify(Mem*, int); | 388 int sqlite3VdbeMemStringify(Mem*, int); |
370 i64 sqlite3VdbeIntValue(Mem*); | 389 i64 sqlite3VdbeIntValue(Mem*); |
371 int sqlite3VdbeMemIntegerify(Mem*); | 390 int sqlite3VdbeMemIntegerify(Mem*); |
372 double sqlite3VdbeRealValue(Mem*); | 391 double sqlite3VdbeRealValue(Mem*); |
373 void sqlite3VdbeIntegerAffinity(Mem*); | 392 void sqlite3VdbeIntegerAffinity(Mem*); |
374 int sqlite3VdbeMemRealify(Mem*); | 393 int sqlite3VdbeMemRealify(Mem*); |
375 int sqlite3VdbeMemNumerify(Mem*); | 394 int sqlite3VdbeMemNumerify(Mem*); |
376 int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*); | 395 int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*); |
377 void sqlite3VdbeMemRelease(Mem *p); | 396 void sqlite3VdbeMemRelease(Mem *p); |
378 void sqlite3VdbeMemReleaseExternal(Mem *p); | 397 void sqlite3VdbeMemReleaseExternal(Mem *p); |
379 int sqlite3VdbeMemFinalize(Mem*, FuncDef*); | 398 int sqlite3VdbeMemFinalize(Mem*, FuncDef*); |
380 const char *sqlite3OpcodeName(int); | 399 const char *sqlite3OpcodeName(int); |
381 int sqlite3VdbeOpcodeHasProperty(int, int); | |
382 int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve); | 400 int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve); |
383 int sqlite3VdbeCloseStatement(Vdbe *, int); | 401 int sqlite3VdbeCloseStatement(Vdbe *, int); |
384 void sqlite3VdbeFrameDelete(VdbeFrame*); | 402 void sqlite3VdbeFrameDelete(VdbeFrame*); |
385 int sqlite3VdbeFrameRestore(VdbeFrame *); | 403 int sqlite3VdbeFrameRestore(VdbeFrame *); |
386 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT | 404 void sqlite3VdbeMemStoreType(Mem *pMem); |
387 int sqlite3VdbeReleaseBuffers(Vdbe *p); | 405 |
| 406 #ifdef SQLITE_DEBUG |
| 407 void sqlite3VdbeMemPrepareToChange(Vdbe*,Mem*); |
| 408 #endif |
| 409 |
| 410 #ifndef SQLITE_OMIT_FOREIGN_KEY |
| 411 int sqlite3VdbeCheckFk(Vdbe *, int); |
| 412 #else |
| 413 # define sqlite3VdbeCheckFk(p,i) 0 |
388 #endif | 414 #endif |
389 | 415 |
390 #ifndef SQLITE_OMIT_SHARED_CACHE | 416 #ifndef SQLITE_OMIT_SHARED_CACHE |
391 void sqlite3VdbeMutexArrayEnter(Vdbe *p); | 417 void sqlite3VdbeMutexArrayEnter(Vdbe *p); |
392 #else | 418 #else |
393 # define sqlite3VdbeMutexArrayEnter(p) | 419 # define sqlite3VdbeMutexArrayEnter(p) |
394 #endif | 420 #endif |
395 | 421 |
396 int sqlite3VdbeMemTranslate(Mem*, u8); | 422 int sqlite3VdbeMemTranslate(Mem*, u8); |
397 #ifdef SQLITE_DEBUG | 423 #ifdef SQLITE_DEBUG |
398 void sqlite3VdbePrintSql(Vdbe*); | 424 void sqlite3VdbePrintSql(Vdbe*); |
399 void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf); | 425 void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf); |
400 #endif | 426 #endif |
401 int sqlite3VdbeMemHandleBom(Mem *pMem); | 427 int sqlite3VdbeMemHandleBom(Mem *pMem); |
402 | 428 |
403 #ifndef SQLITE_OMIT_INCRBLOB | 429 #ifndef SQLITE_OMIT_INCRBLOB |
404 int sqlite3VdbeMemExpandBlob(Mem *); | 430 int sqlite3VdbeMemExpandBlob(Mem *); |
405 #else | 431 #else |
406 #define sqlite3VdbeMemExpandBlob(x) SQLITE_OK | 432 #define sqlite3VdbeMemExpandBlob(x) SQLITE_OK |
407 #endif | 433 #endif |
408 | 434 |
409 #endif /* !defined(_VDBEINT_H_) */ | 435 #endif /* !defined(_VDBEINT_H_) */ |
OLD | NEW |