Lines Matching defs:char

335 ** the ((void*)&((char*)0)[X]) construct.  But MSVC chokes on ((void*)(X)).
343 # define SQLITE_INT_TO_PTR(X) ((void*)&((char*)0)[X])
344 # define SQLITE_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0))
715 SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
716 SQLITE_API const char *sqlite3_libversion(void);
717 SQLITE_API const char *sqlite3_sourceid(void);
743 SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
744 SQLITE_API const char *sqlite3_compileoption_get(int N);
887 typedef int (*sqlite3_callback)(void*,int,char**, char**);
952 const char *sql, /* SQL to be evaluated */
953 int (*callback)(void*,int,char**,char**), /* Callback function */
955 char **errmsg /* Error msg written here */
1419 ** [sqlite3_malloc()] and the result is stored in the char* variable
1423 ** do anything. Callers should initialize the char* variable to a NULL
1432 ** pointers to strings (char**) in which the second element of the array
1436 ** of the char** argument point to a string obtained from [sqlite3_mprintf()]
1467 ** argument should be a char** which will be filled with the filename
1677 const char *zName; /* Name of this virtual file system */
1679 int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
1681 int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
1682 int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
1683 int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
1684 void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
1685 void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
1686 void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
1688 int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
1691 int (*xGetLastError)(sqlite3_vfs*, int, char *);
1701 int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
1702 sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
1703 const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
2169 ** function with a call signature of void(*)(void*,int,const char*),
2220 ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
2544 SQLITE_API int sqlite3_complete(const char *sql);
2707 const char *zSql, /* SQL to be evaluated */
2708 char ***pazResult, /* Results of the query */
2711 char **pzErrmsg /* Error msg written here */
2713 SQLITE_API void sqlite3_free_table(char **result);
2763 ** char *zText = "It's a happy day!";
2769 ** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
2797 ** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
2809 SQLITE_API char *sqlite3_mprintf(const char*,...);
2810 SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2811 SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2812 SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
3016 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
3117 SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
3119 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
3356 const char *filename, /* Database filename (UTF-8) */
3364 const char *filename, /* Database filename (UTF-8) */
3367 const char *zVfs /* Name of VFS module to use */
3409 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3410 SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3411 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3454 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3456 SQLITE_API const char *sqlite3_errstr(int);
3673 const char *zSql, /* SQL statement, UTF-8 encoded */
3676 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3680 const char *zSql, /* SQL statement, UTF-8 encoded */
3683 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3707 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3912 SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
3962 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3978 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4026 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
4074 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
4076 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
4078 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
4110 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
4412 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4560 const char *zFunctionName,
4580 const char *zFunctionName,
4674 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4926 SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
4934 SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5022 const char *zName,
5029 const char *zName,
5072 void(*)(void*,sqlite3*,int eTextRep,const char*)
5111 const char *zPassPhrase /* Activation phrase */
5121 const char *zPassPhrase /* Activation phrase */
5181 ** char zPathBuf[MAX_PATH + 1];
5188 SQLITE_API char *sqlite3_temp_directory;
5225 SQLITE_API char *sqlite3_data_directory;
5276 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5285 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5399 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5553 ** <tr><td> 5th <td> const char* <td> Data type
5554 ** <tr><td> 6th <td> const char* <td> Name of default collation sequence
5591 const char *zDbName, /* Database name or NULL */
5592 const char *zTableName, /* Table name */
5593 const char *zColumnName, /* Column name */
5594 char const **pzDataType, /* OUTPUT: Declared data type */
5595 char const **pzCollSeq, /* OUTPUT: Collation sequence name */
5637 const char *zFile, /* Name of the shared library containing extension */
5638 const char *zProc, /* Entry point. Derived from zFile if 0 */
5639 char **pzErrMsg /* Put error message here if not 0 */
5673 ** &nbsp; const char **pzErrMsg,
5738 int argc, const char *const*argv,
5739 sqlite3_vtab **ppVTab, char**);
5741 int argc, const char *const*argv,
5742 sqlite3_vtab **ppVTab, char**);
5748 int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
5759 int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
5762 int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
5828 unsigned char op; /* Constraint operator */
5829 unsigned char usable; /* True if this constraint is usable */
5835 unsigned char desc; /* True for DESC. False for ASC. */
5840 unsigned char omit; /* Do not code a test for this constraint */
5843 char *idxStr; /* String, possibly obtained from sqlite3_malloc */
5891 const char *zName, /* Name of the module */
5897 const char *zName, /* Name of the module */
5924 char *zErrMsg; /* Error message from sqlite3_mprintf() */
5958 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
5976 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6060 const char *zDb,
6061 const char *zTable,
6062 const char *zColumn,
6226 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6525 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
7301 const char *zDestName, /* Destination database name */
7303 const char *zSourceName /* Source database name */
7439 SQLITE_API int sqlite3_stricmp(const char *, const char *);
7440 SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
7455 SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
7478 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
7517 int(*)(void *,sqlite3*,const char*,int),
7564 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7638 const char *zDb, /* Name of attached database (or NULL) */
7788 const char *zGeom,
7883 const char *pKey; int nKey; /* Key associated with this element */
7890 SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData);
7891 SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey, int nKey);
8153 #define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
8198 # define UINT8_TYPE unsigned char
8205 # define INT8_TYPE signed char
8254 # define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
8255 # define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
8288 # define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&3)==0)
8290 # define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0)
8537 const char *zFilename, /* Name of database file to open */
8572 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
8586 SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *);
8587 SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *);
8679 SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);
8793 signed char p4type; /* One of the P4_xxx constants for p4 */
8802 char *z; /* Pointer to data for string (char array) types */
8816 char *zComment; /* Comment to improve readability */
8845 signed char p1; /* First operand */
8846 signed char p2; /* Second parameter (often the jump destination) */
8847 signed char p3; /* Third parameter */
9113 SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);
9116 SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*);
9123 SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
9142 SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));
9145 SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);
9151 SQLITE_PRIVATE char *sqlite3VdbeExpandSql(Vdbe*, const char*);
9156 SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo *, char *, int, char **);
9164 SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe*, const char*, ...);
9166 SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);
9275 const char*,
9282 SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
9317 SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);
9342 SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*, int);
9345 SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
9808 SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
9809 SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *, const char *, int);
9810 SQLITE_PRIVATE int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut);
9811 SQLITE_PRIVATE int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);
9813 SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);
9814 SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *, int, char *);
9815 SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void);
9818 SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *);
9826 SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);
9918 char *zName; /* Name of this database */
10051 signed char nextAutovac; /* Autovac setting after VACUUM if >=0 */
10071 void (*xTrace)(void*,const char*); /* Trace function */
10073 void (*xProfile)(void*,const char*,u64); /* Profiling function */
10080 void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64);
10082 int (*xWalCallback)(void *, sqlite3 *, const char *, int);
10085 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
10089 char *zErrMsg; /* Most recent error message (UTF-8 encoded) */
10090 char *zErrMsg16; /* Most recent error message (UTF-16 encoded) */
10097 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
10233 char *zName; /* SQL name of the function. */
10319 char *zName; /* Savepoint name (nul-terminated) */
10340 const char *zName; /* Name passed to create_module() */
10350 char *zName; /* Name of this column */
10352 char *zDflt; /* Original text of the default value */
10353 char *zType; /* Data type for this column */
10354 char *zColl; /* Collating sequence. If NULL, use the default */
10356 char affinity; /* One of the SQLITE_AFF_... values */
10375 char *zName; /* Name of the collating sequence, UTF-8 encoded */
10507 char *zName; /* Name of the table or view */
10512 char *zColAff; /* String defining the affinity of each column */
10528 char **azModuleArg; /* Text of all module args. [0] is module name */
10581 char *zTo; /* Name of table that the key points to (aka: Parent) */
10591 char *zCol; /* Name of column in zTo. If 0 use PRIMARY KEY */
10704 char *zName; /* Name of this index */
10708 char *zColAff; /* String defining the affinity of each column */
10712 char **azColl; /* Array of collation sequence names for index */
10732 char *z; /* Value if eType is SQLITE_TEXT or SQLITE_BLOB */
10752 const char *z; /* Text of the token. Not NULL-terminated! */
10880 char affinity; /* The affinity of the column or 0 if not a column */
10883 char *zToken; /* Token value. Zero terminated and dequoted */
11005 char *zName; /* Token associated with this expression */
11006 char *zSpan; /* Original text of the expression */
11022 const char *zStart; /* First character of input text */
11023 const char *zEnd; /* One character past the end of input text */
11043 char *zName; /* Name of the identifier */
11087 char *zDatabase; /* Name of database holding this table */
11088 char *zName; /* Name of the table */
11089 char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
11105 char *zIndex; /* Identifier from "INDEXED BY <zIndex>" clause */
11362 char affSdst; /* Affinity used when eDest==SRT_Set */
11444 char *zErrMsg; /* An error message */
11515 char **azVar; /* Pointers to names of parameters */
11518 const char *zTail; /* All SQL text past the last semicolon parsed */
11521 const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */
11546 const char *zAuthContext; /* Put saved Parse.zAuthContext here */
11581 char *zName; /* The name of the trigger */
11582 char *table; /* The table or view to which the trigger applies */
11664 const char *zDb; /* Make sure all objects are contained in this database */
11665 const char *zType; /* Type of the container - used for error messages */
11675 char *zBase; /* A base allocation. Not from malloc. */
11676 char *zText; /* The string collected so far */
11691 char **pzErrMsg; /* Error message stored here */
11735 void (*xLog)(void*,int,const char*); /* Function for logging */
11739 void(*xSqllog)(void*,sqlite3*,const char*, int);
11825 # define sqlite3Toupper(x) ((x)&~(sqlite3CtypeMap[(unsigned char)(x)]&0x20))
11826 # define sqlite3Isspace(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x01)
11827 # define sqlite3Isalnum(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x06)
11828 # define sqlite3Isalpha(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x02)
11829 # define sqlite3Isdigit(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x04)
11830 # define sqlite3Isxdigit(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x08)
11831 # define sqlite3Tolower(x) (sqlite3UpperToLower[(unsigned char)(x)])
11833 # define sqlite3Toupper(x) toupper((unsigned char)(x))
11834 # define sqlite3Isspace(x) isspace((unsigned char)(x))
11835 # define sqlite3Isalnum(x) isalnum((unsigned char)(x))
11836 # define sqlite3Isalpha(x) isalpha((unsigned char)(x))
11837 # define sqlite3Isdigit(x) isdigit((unsigned char)(x))
11838 # define sqlite3Isxdigit(x) isxdigit((unsigned char)(x))
11839 # define sqlite3Tolower(x) tolower((unsigned char)(x))
11846 SQLITE_PRIVATE int sqlite3Strlen30(const char*);
11855 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
11856 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, int);
11915 SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, int, const char*, va_list);
11917 SQLITE_PRIVATE void sqlite3XPrintf(StrAccum*, const char*, ...);
11919 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
11920 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
11921 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
11923 SQLITE_PRIVATE void sqlite3DebugPrintf(const char*, ...);
11926 SQLITE_PRIVATE void *sqlite3TestTextToPtr(const char*);
11932 SQLITE_PRIVATE void sqlite3ExplainPrintf(Vdbe*, const char*, ...);
11940 SQLITE_PRIVATE const char *sqlite3VdbeExplanation(Vdbe*);
11951 SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
11952 SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...);
11953 SQLITE_PRIVATE int sqlite3Dequote(char*);
11954 SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int);
11955 SQLITE_PRIVATE int sqlite3RunParser(Parse*, const char*, char **);
11963 SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
11974 SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
11975 SQLITE_PRIVATE int sqlite3InitCallback(void*, int, char**, char**);
11993 SQLITE_PRIVATE int sqlite3ParseUri(const char*,const char*,unsigned int*,
11994 sqlite3_vfs**,char**,char **);
11995 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);
12034 SQLITE_PRIVATE int sqlite3IdListIndex(IdList*,const char*);
12056 SQLITE_PRIVATE Expr *sqlite3LimitWhere(Parse*,SrcList*,Expr*,ExprList*,Expr*,Expr*,char*);
12079 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
12080 SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*);
12082 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
12083 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
12084 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
12086 SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
12087 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
12099 SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb);
12112 SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
12113 SQLITE_PRIVATE int sqlite3IsRowid(const char*);
12124 SQLITE_PRIVATE void sqlite3HaltConstraint(Parse*, int, int, char*, int);
12131 SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,u8);
12162 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
12182 SQLITE_PRIVATE int sqlite3AuthCheck(Parse*,int, const char*, const char*, const char*);
12183 SQLITE_PRIVATE void sqlite3AuthContextPush(Parse*, AuthContext*, const char*);
12185 SQLITE_PRIVATE int sqlite3AuthReadCol(Parse*, const char *, const char *, int);
12194 SQLITE_PRIVATE int sqlite3FixInit(DbFixer*, Parse*, int, const char*, const Token*);
12200 SQLITE_PRIVATE int sqlite3AtoF(const char *z, double*, int, u8);
12201 SQLITE_PRIVATE int sqlite3GetInt32(const char *, int*);
12202 SQLITE_PRIVATE int sqlite3Atoi(const char*);
12204 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
12214 SQLITE_PRIVATE int sqlite3PutVarint(unsigned char*, u64);
12215 SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char*, u32);
12216 SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *, u64 *);
12217 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);
12240 (u8)(((u32)(B)<(u32)0x80)?(*(A)=(unsigned char)(B)),1:\
12246 SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *, Index *);
12248 SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2);
12249 SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
12250 SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr);
12251 SQLITE_PRIVATE int sqlite3Atoi64(const char*, i64*, int, u8);
12252 SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
12253 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
12259 SQLITE_PRIVATE const char *sqlite3ErrName(int);
12262 SQLITE_PRIVATE const char *sqlite3ErrStr(int);
12264 SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
12265 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
12268 SQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(Parse*,Expr*,const char*);
12271 SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *, const char *);
12278 SQLITE_PRIVATE void sqlite3FileSuffix3(const char*, char*);
12282 SQLITE_PRIVATE u8 sqlite3GetBoolean(const char *z,int);
12290 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
12292 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *, u8, char *, int, int *);
12297 SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[];
12298 SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];
12299 SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];
12311 SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
12312 SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
12316 SQLITE_PRIVATE int sqlite3MatchSpanName(const char*, const char*, const char*, const char*);
12319 SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
12323 SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(Parse*, u8, CollSeq *, const char*);
12324 SQLITE_PRIVATE char sqlite3AffinityType(const char*);
12328 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);
12333 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
12339 SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,
12347 SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum*, char*, int, int);
12348 SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum*,const char*,int);
12350 SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum*);
12376 SQLITE_PRIVATE void sqlite3TableLock(Parse *, int, int, u8, const char *);
12382 SQLITE_PRIVATE int sqlite3Utf8To8(unsigned char*);
12399 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **);
12414 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);
12416 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);
12420 SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe*, const char*, int);
12423 SQLITE_PRIVATE void sqlite3ExprListCheckLength(Parse*, ExprList*, const char*);
12426 SQLITE_PRIVATE const char *sqlite3JournalModename(int);
12429 SQLITE_PRIVATE int sqlite3WalDefaultHook(void*,sqlite3*,const char*,int);
12488 SQLITE_PRIVATE int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
12525 SQLITE_PRIVATE void sqlite3ParserTrace(FILE*, char *);
12536 SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*,...);
12611 SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
12680 SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
12818 SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
12849 static const char * const azCompileOpt[] = {
13195 SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
13204 && sqlite3CtypeMap[(unsigned char)azCompileOpt[i][n]]==0
13216 SQLITE_API const char *sqlite3_compileoption_get(int N){
13282 typedef unsigned char Bool;
13401 char *z; /* String or BLOB value */
13419 char *zMalloc; /* Dynamic buffer allocated by sqlite3_malloc() */
13527 char zBase[100]; /* Initial space */
13565 char *zErrMsg; /* Error message written here */
13569 char **azVar; /* Name of variables */
13596 char *zSql; /* Text of the SQL statement that generated this */
13603 char *zExplain; /* Explanation of data structures */
13633 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);
13634 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
13650 SQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));
13675 SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
13712 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
14028 char validYMD; /* True (1) if Y,M,D are valid */
14029 char validHMS; /* True (1) if h,m,s are valid */
14030 char validJD; /* True (1) if iJD is valid */
14031 char validTZ; /* True (1) if tz is valid */
14048 static int getDigits(const char *zDate, ...){
14100 static int parseTimezone(const char *zDate, DateTime *p){
14135 static int parseHhMmSs(const char *zDate, DateTime *p){
14223 static int parseYyyyMmDd(const char *zDate, DateTime *p){
14288 const char *zDate,
14508 static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
14512 char *z, zBuf[30];
14515 z[n] = (char)sqlite3UpperToLower[(u8)zMod[n]];
14636 const char *z2 = z;
14720 const unsigned char *z;
14732 if( !z || parseDateOrTime(context, (char*)z, p) ){
14738 if( z==0 || parseModifier(context, (char*)z, p) ) return 1;
14778 char zBuf[100];
14798 char zBuf[100];
14817 char zBuf[100];
14851 char *z;
14853 const char *zFmt = (const char*)sqlite3_value_text(argv[0]);
14854 char zBuf[100];
14958 z[j++] = (char)(((x.iJD+129600000)/86400000) % 7) + '0';
15035 char *zFormat = (char *)sqlite3_user_data(context);
15040 char zBuf[20];
15264 const char *zPath,
15279 SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
15286 const char *zPath,
15295 const char *zPath,
15297 char *zPathOut
15304 SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
15307 SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
15310 SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *pVfs, void *pHdle, const char *zSym))(void){
15317 SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
15343 const char *zFile,
15392 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
15961 char nBacktrace; /* Number of backtraces on this alloc */
15962 char nBacktraceSlots; /* Available backtrace slots */
16008 char zTitle[100]; /* The title text */
16122 static void randomFill(char *pBuf, int nByte){
16148 char *z;
16193 randomFill((char*)pInt, nByte);
16194 memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);
16207 char *z;
16228 z = (char*)pBt;
16256 randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - pOldHdr->iSize);
16356 SQLITE_PRIVATE void sqlite3MemdebugSettitle(const char *zTitle){
16379 SQLITE_PRIVATE void sqlite3MemdebugDump(const char *zFilename){
16391 char *z = (char*)pHdr;
17022 SQLITE_PRIVATE void sqlite3Memsys3Dump(const char *zFilename){
17646 SQLITE_PRIVATE void sqlite3Memsys5Dump(const char *zFilename){
18941 pSlot->pNext = (ScratchFreeslot*)(sz+(char*)pSlot);
19477 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
19478 char *zNew;
19491 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
19492 char *zNew;
19510 SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
19512 char *z;
19595 typedef unsigned char etByte;
19602 char fmttype; /* The format field code letter */
19622 static const char aDigits[] = "0123456789ABCDEF0123456789abcdef";
19623 static const char aPrefix[] = "-x0\000X0";
19673 static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){
19682 return (char)digit;
19690 static const char zSpaces[] = " ";
19715 const char *fmt, /* Format string */
19719 char *bufpt; /* Pointer to the conversion buffer */
19734 char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */
19738 char *zOut; /* Rendering buffer */
19740 char *zExtra; /* Malloced memory used by some conversion */
19748 char buf[etBUFSIZE]; /* Conversion buffer */
19754 bufpt = (char *)fmt;
19863 flag_longlong = sizeof(char*)==sizeof(i64);
19864 flag_long = sizeof(char*)==sizeof(long int);
19917 static const char zOrd[] = "thstndrd";
19926 register const char *cset; /* Use registers for speed */
19941 const char *pre;
19942 char x;
20083 *(bufpt++) = (char)((exp/100)+'0'); /* 100's digit */
20086 *(bufpt++) = (char)(exp/10+'0'); /* 10's digit */
20087 *(bufpt++) = (char)(exp%10+'0'); /* 1's digit */
20122 buf[0] = (char)c;
20124 for(idx=1; idx<precision; idx++) buf[idx] = (char)c;
20133 bufpt = va_arg(ap,char*);
20150 char ch;
20151 char q = ((xtype==etSQLESCAPE3)?'"':'\''); /* Quote character */
20152 char *escarg = va_arg(ap,char*);
20188 sqlite3StrAccumAppend(pAccum, (const char*)pToken->z, pToken->n);
20240 SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum *p, const char *z, int N){
20255 char *zNew;
20263 char *zOld = (p->zText==p->zBase ? 0 : p->zText);
20298 SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){
20334 SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum *p, char *zBase, int n, int mx){
20349 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
20350 char *z;
20351 char zBase[SQLITE_PRINT_BUF_SIZE];
20369 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
20371 char *z;
20386 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
20388 char *z;
20400 SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
20401 char *z;
20402 char zBase[SQLITE_PRINT_BUF_SIZE];
20418 SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
20420 char *z;
20443 SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
20451 SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
20452 char *z;
20469 static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){
20471 char zMsg[SQLITE_PRINT_BUF_SIZE*3]; /* Complete log message */
20483 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
20498 SQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){
20501 char zBuf[500];
20517 SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, const char *zFormat, ...){
20550 unsigned char isInit; /* True if initialized */
20551 unsigned char i, j; /* State variables */
20552 unsigned char s[256]; /* State variables */
20572 unsigned char t;
20600 char k[256];
20631 unsigned char *zBuf = pBuf;
20723 static const unsigned char sqlite3Utf8Trans1[] = {
20838 const unsigned char **pz /* Pointer to string from which to read char */
20875 unsigned char *zOut; /* Output buffer */
20876 unsigned char *zIn; /* Input iterator */
20877 unsigned char *zTerm; /* End of input */
20878 unsigned char *z; /* Output iterator */
20889 char zBuf[100];
20992 pMem->z = (char*)zOut;
20998 char zBuf[100];
21053 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
21083 SQLITE_PRIVATE int sqlite3Utf8To8(unsigned char *zIn){
21084 unsigned char *zOut = zIn;
21085 unsigned char *zStart = zIn;
21107 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
21135 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *db, u8 enc, char *z, int n, int *pnOut){
21157 unsigned char const *z = zIn;
21171 return (int)(z-(unsigned char const *)zIn);
21182 unsigned char zBuf[20];
21183 unsigned char *z;
21318 SQLITE_PRIVATE int sqlite3Strlen30(const char *z){
21319 const char *z2 = z;
21346 SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
21350 char *z;
21379 SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
21380 char *zMsg;
21413 SQLITE_PRIVATE int sqlite3Dequote(char *z){
21414 char quote;
21454 SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
21455 register unsigned char *a, *b;
21456 a = (unsigned char *)zLeft;
21457 b = (unsigned char *)zRight;
21461 SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
21462 register unsigned char *a, *b;
21463 a = (unsigned char *)zLeft;
21464 b = (unsigned char *)zRight;
21491 SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
21494 const char *zEnd = z + length;
21672 static int compare2pow63(const char *zNum, int incr){
21676 const char *pow63 = "922337203685477580";
21708 SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){
21715 const char *zStart;
21716 const char *zEnd = zNum + length;
21788 SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){
21827 SQLITE_PRIVATE int sqlite3Atoi(const char *z){
21862 SQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){
21895 SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char *p, u32 v){
21927 SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){
22097 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
22236 SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
22268 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
22269 char *zBlob;
22272 zBlob = (char *)sqlite3DbMallocRaw(db, n/2 + 1);
22289 static void logBadConnection(const char *zType){
22427 SQLITE_PRIVATE void sqlite3FileSuffix3(const char *zBaseFilename, char *z){
22495 static unsigned int strHash(const char *z, int nKey){
22499 h = (h<<3) ^ h ^ sqlite3UpperToLower[(unsigned char)*z++];
22585 const char *pKey, /* The key we are searching for */
22647 SQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey, int nKey){
22677 SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, int nKey, void *data){
22728 SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
22729 static const char *const azName[] = { "?",
23105 unsigned char eFileLock; /* The type of lock held on this fd */
23110 const char *zPath; /* Name of the file */
23139 unsigned char transCntrChng; /* True if the transaction counter changed */
23140 unsigned char dbUpdate; /* True if any part of database file changed */
23141 unsigned char inNormalWrite; /* True if in a normal write operation */
23149 char aPadding[32];
23423 ** open(const char*,int,mode_t). Others use open(const char*,int,...).
23429 static int posixOpen(const char *zFile, int flags, int mode){
23443 static int openDirectory(const char*, int*);
23452 const char *zName; /* Name of the system call */
23457 #define osOpen ((int(*)(const char*,int,int))aSyscall[0].pCurrent)
23463 #define osAccess ((int(*)(const char*,int))aSyscall[2].pCurrent)
23466 #define osGetcwd ((char*(*)(char*,size_t))aSyscall[3].pCurrent)
23469 #define osStat ((int(*)(const char*,struct stat*))aSyscall[4].pCurrent)
23538 #define osUnlink ((int(*)(const char*))aSyscall[16].pCurrent)
23541 #define osOpenDirectory ((int(*)(const char*,int*))aSyscall[17].pCurrent)
23544 #define osMkdir ((int(*)(const char*,mode_t))aSyscall[18].pCurrent)
23547 #define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent)
23575 const char *zName, /* Name of system call to override */
23618 const char *zName
23635 static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
23667 static int robust_open(const char *z, int f, mode_t m){
23727 static const char *azFileLock(int eFileLock){
23749 char *zOpName, *zType;
23917 char *zCanonicalName; /* Canonical filename */
23940 static int vxworksSimplifyName(char *z, int n){
23974 static struct vxworksFileId *vxworksFindFileId(const char *zAbsoluteName){
23983 pNew->zCanonicalName = (char*)&pNew[1];
24149 unsigned char eFileLock; /* One of SHARED_LOCK, RESERVED_LOCK etc. */
24150 unsigned char bProcessLock; /* An exclusive process lock is held */
24162 char aSemName[MAX_PATHNAME+2]; /* Name of that semaphore */
24190 const char *zFunc, /* Name of OS function that failed */
24191 const char *zPath, /* File path associated with error */
24194 char *zErr; /* Message from strerror() or equivalent */
24202 char aErr[80];
25136 const char *zLockFile = (const char*)pFile->lockingContext;
25173 char *zLockFile = (char *)pFile->lockingContext;
25223 char *zLockFile = (char *)pFile->lockingContext;
25685 const char *dbPath; /* Name of the open file */
25693 unsigned char unLockFlag; /* 1 = unlock, 0 = lock */
25694 unsigned char startEndFlag; /* 1=rel to end of fork, 0=rel to start */
25707 const char *path, /* Name of the file to be locked or unlocked */
26225 pBuf = (void*)(got + (char*)pBuf);
26286 memset(&((char*)pBuf)[got], 0, amt-got);
26383 char oldCntr[4];
26387 if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){
26414 pBuf = &((char*)pBuf)[wrote];
26578 static int openDirectory(const char *zFilename, int *pFd){
26581 char zDirname[MAX_PATHNAME+1];
26811 static void unixModeBit(unixFile *pFile, unsigned char mask, int *pArg){
26822 static int unixGetTempname(int nBuf, char *zBuf);
26858 *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
26862 char *zTFile = sqlite3_malloc( pFile->pVfs->mxPathname );
26865 *(char**)pArg = zTFile;
27060 char *zFilename; /* Name of the mmapped file */
27065 char **apRegion; /* Array of mapped shared-memory regions */
27248 char *zShmFilename; /* Name of the file used for SHM */
27286 zShmFilename = pShmNode->zFilename = (char*)&pShmNode[1];
27414 char **apNew; /* New apRegion[] array */
27453 const char *zFile = pShmNode->zFilename;
27463 apNew = (char **)sqlite3_realloc(
27464 pShmNode->apRegion, (iRegion+1)*sizeof(char *)
27741 const char *zErr = "mmap";
27983 static const sqlite3_io_methods *FINDER##Impl(const char *z, unixFile *p){ \
27987 static const sqlite3_io_methods *(*const FINDER)(const char*,unixFile *p) \
28106 const char *filePath, /* name of the database file */
28110 const char *zFilesystem; /* Filesystem type name */
28159 *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;
28172 const char *filePath, /* name of the database file */
28197 *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;
28204 typedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);
28221 const char *zFilename, /* Name of the file being opened */
28342 char *zLockFile;
28346 zLockFile = (char *)sqlite3_malloc(nFilename);
28363 char *zSemName = pNew->pInode->aSemName;
28402 static const char *unixTempFileDir(void){
28403 static const char *azDirs[] = {
28413 const char *zDir = 0;
28432 static int unixGetTempname(int nBuf, char *zBuf){
28433 static const unsigned char zChars[] =
28438 const char *zDir;
28461 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
28475 static int proxyTransformUnixFile(unixFile*, const char*);
28494 static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
28558 const char *zPath, /* Path of file (possibly) being created */
28569 char zDb[MAX_PATHNAME+1]; /* Database file path */
28636 const char *zPath, /* Pathname of file to be opened */
28674 char zTmpname[MAX_PATHNAME+2];
28675 const char *zName = zPath;
28830 char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING");
28887 const char *zPath, /* Name of file to be deleted */
28935 const char *zPath, /* Path of the file to examine */
28978 const char *zPath, /* Possibly relative input path */
28980 char *zOut /* Output buffer */
29014 static void *unixDlOpen(sqlite3_vfs *NotUsed, const char *zFilename){
29026 static void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut){
29027 const char *zErr;
29036 static void (*unixDlSym(sqlite3_vfs *NotUsed, void *p, const char*zSym))(void){
29044 ** parameters void* and const char* and returning a pointer to a function.
29054 void (*(*x)(void*,const char*))(void);
29056 x = (void(*(*)(void*,const char*))(void))dlsym;
29073 static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
29210 static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){
29383 char *conchFilePath; /* Name of the conch file */
29385 char *lockProxyPath; /* Name of the proxy lock file */
29386 char *dbPath; /* Name of the open file */
29397 static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){
29426 char c = dbPath[i];
29438 static int proxyCreateLockPath(const char *lockPath){
29440 char buf[MAXPATHLEN];
29479 const char *path, /* path for the new unixFile */
29573 static int proxyGetHostID(unsigned char *pHostID, int *pError){
29594 pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF));
29617 char tPath[MAXPATHLEN];
29618 char buf[PROXY_MAXCONCHLEN];
29619 char *cPath = pCtx->conchFilePath;
29622 char errmsg[64] = "";
29711 char tBuf[PROXY_MAXCONCHLEN];
29717 if( len>PROXY_PATHINDEX && tBuf[0]==(char)PROXY_CONCHVERSION){
29761 char readBuf[PROXY_MAXCONCHLEN];
29762 char lockPath[MAXPATHLEN];
29763 char *tempLockPath = NULL;
29791 readBuf[0]!=(char)PROXY_CONCHVERSION ){
29863 char writeBuffer[PROXY_MAXCONCHLEN];
29866 writeBuffer[0] = (char)PROXY_CONCHVERSION;
29928 char *path = tempLockPath ? tempLockPath : pCtx->lockProxyPath;
30002 static int proxyCreateConchPathname(char *dbPath, char **pConchPath){
30005 char *conchPath; /* buffer in which to construct conch name */
30009 *pConchPath = conchPath = (char *)sqlite3_malloc(len + 8);
30039 static int switchLockProxyPath(unixFile *pFile, const char *path) {
30041 char *oldPath = pCtx->lockProxyPath;
30075 static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){
30080 assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
30087 int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
30088 memcpy(dbPath, (char *)pFile->lockingContext, len + 1);
30091 assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
30092 strlcpy(dbPath, (char *)pFile->lockingContext, MAXPATHLEN);
30105 static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
30107 char dbPath[MAXPATHLEN+1]; /* Name of the database file */
30108 char *lockPath=NULL;
30118 lockPath=(char *)path;
30200 *(const char **)pArg = pCtx->lockProxyPath;
30202 *(const char **)pArg = ":auto: (not held)";
30205 *(const char **)pArg = NULL;
30213 if( pArg==NULL || (const char *)pArg==0 ){
30222 const char *proxyPath = (const char *)pArg;
30861 const char *zPath; /* Full pathname of this file */
31037 const char *zName; /* Name of the system call */
31637 const char *zName, /* Name of system call to override */
31680 const char *zName
31697 static const char *winNextSystemCall(sqlite3_vfs *p, const char *zName){
31717 SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
31718 char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
31997 static LPWSTR utf8ToUnicode(const char *zFilename){
32022 static char *unicodeToUtf8(LPCWSTR zWideFilename){
32024 char *zFilename;
32050 static LPWSTR mbcsToUnicode(const char *zFilename){
32080 static char *unicodeToMbcs(LPCWSTR zWideFilename){
32082 char *zFilename;
32106 SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zFilename){
32107 char *zFilenameUtf8;
32123 SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zFilename){
32124 char *zFilenameMbcs;
32144 char **ppDirectory = 0;
32159 char *zValueUtf8 = 0;
32178 static int getLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){
32181 ** buffer, excluding the terminating null char.
32184 char *zOut = 0;
32222 char *zTemp = NULL;
32272 const char *zFunc, /* Name of OS function that failed */
32273 const char *zPath, /* File path associated with error */
32276 char zMsg[500]; /* Human readable error text */
32379 #define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]
32399 static int winceCreateLock(const char *zFilename, winFile *pFile){
32923 memset(&((char*)pBuf)[nRead], 0, amt-nRead);
33524 static void winModeBit(winFile *pFile, unsigned char mask, int *pArg){
33535 static int getTempname(int nBuf, char *zBuf);
33588 *(char**)pArg = sqlite3_mprintf("win32");
33608 char *zTFile = sqlite3MallocZero( pFile->pVfs->mxPathname );
33611 *(char**)pArg = zTFile;
33717 char *zFilename; /* Name of the file */
33818 static int winOpen(sqlite3_vfs*,const char*,sqlite3_file*,int,int*);
33819 static int winDelete(sqlite3_vfs *,const char*,int);
33895 pNew->zFilename = (char*)&pNew[1];
34284 char *p = (char *)pShmNode->aRegion[iRegion].pMap;
34569 static void *convertUtf8Filename(const char *zFilename){
34587 static int getTempname(int nBuf, char *zBuf){
34588 static char zChars[] =
34594 char zTempPath[MAX_PATH+2];
34609 char *zMulti;
34623 char *zUtf8;
34624 char zMbcsPath[MAX_PATH];
34657 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
34689 attr = osGetFileAttributesA((char*)zConverted);
34700 const char *zName, /* Name of the file (UTF-8) */
34716 const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
34722 char zTmpname[MAX_PATH+2]; /* Buffer used to create temp filename */
34987 const char *zFilename, /* Name of file to delete */
35095 const char *zFilename, /* Name of file to check */
35145 attr = osGetFileAttributesA((char*)zConverted);
35175 const char *zPathname
35212 const char *zRelative, /* Possibly relative input path */
35214 char *zFull /* Output buffer */
35229 char zOut[MAX_PATH+1];
35263 char *zOut;
35322 char *zTemp;
35323 nByte = osGetFullPathNameA((char*)zConverted, 0, 0, 0);
35336 nByte = osGetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
35368 static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
35384 h = osLoadLibraryA((char*)zConverted);
35390 static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
35394 static void (*winDlSym(sqlite3_vfs *pVfs,void *pH,const char *zSym))(void){
35413 static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
35557 ** int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
35566 static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
35965 unsigned char *pV = 0;
36839 pBuf = (void*)&((char*)pBuf)[sz];
37828 p->pFresh = (struct RowSetEntry*)(ROUND8(sizeof(*p)) + (char*)p);
38272 SQLITE_PRIVATE int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, Wal**);
38748 if( P->xCodec==0 ){ O=(char*)D; }else \
38749 if( (O=(char*)(P->xCodec(P->pCodec,D,N,X)))==0 ){ E; }
38752 # define CODEC2(P,D,N,X,E,O) O=(char*)D
38989 char dbFileVers[16]; /* Changes whenever database file changes */
39006 char *zFilename; /* Name of the database file */
39007 char *zJournal; /* Name of the journal file */
39021 char *pTmpSpace; /* Pager.pageSize bytes of space for tmp use */
39025 char *zWal; /* File name for write-ahead log */
39077 static const unsigned char aJournalMagic[] = {
39297 static char *print_pager_state(Pager *p){
39298 static char zRet[1024];
39376 unsigned char ac[4];
39395 char ac[4];
39500 static u32 pager_datahash(int nByte, unsigned char *pData){
39509 return pager_datahash(pPage->pPager->pageSize, (unsigned char *)pPage->pData);
39559 static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
39565 unsigned char aMagic[8]; /* A buffer to hold the magic header */
39655 static const char zeroHdr[28] = {0};
39696 char *zHeader = pPager->pTmpSpace; /* Temporary space used to build header */
39820 unsigned char aMagic[8]; /* A buffer to hold the magic header */
39937 static int writeMasterJournal(Pager *pPager, const char *zMaster){
40476 char *aData; /* Temporary storage for the page */
40730 static int pager_delmaster(Pager *pPager, const char *zMaster){
40735 char *zMasterJournal = 0; /* Contents of master journal file */
40737 char *zJournal; /* Pointer to one journal within MJ file */
40738 char *zMasterPtr; /* Space to hold MJ filename from a journal file */
40858 char *pTmp = pPager->pTmpSpace;
40991 char *zMaster = 0; /* Name of master journal file if any */
41264 put32bits(((char*)pPg->pData)+24, change_counter);
41269 put32bits(((char*)pPg->pData)+92, change_counter);
41270 put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER);
41938 char *pNew = NULL; /* New temp space */
41945 pNew = (char *)sqlite3PageMalloc(pageSize);
42036 SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager *pPager, int N, unsigned char *pDest){
42569 char *pData; /* Data to write */
42662 char *pData2;
42828 const char *zFilename, /* Name of the database file to open */
42841 char *zPathname = 0; /* Full path to database file */
42846 const char *zUri = 0; /* URI args to copy */
42883 const char *z;
42947 pPager->zFilename = (char*)(pPtr += journalFileSize);
42953 pPager->zJournal = (char*)(pPtr += nPathname + 1 + nUri);
43418 char dbFileVers[sizeof(pPager->dbFileVers)];
43970 char *pData2;
44268 const void *pCopy = (const void *)&((const char *)zBuf)[24];
44357 const char *zMaster, /* If not NULL, the master journal name */
44868 SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager *pPager, int nullIfMemDb){
44891 SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager *pPager){
45927 const char *zWalName; /* Name of WAL file */
46247 static const char *walLockName(int lockIdx){
46255 static char zName[15];
46442 nByte = (int)((char *)aHash - (char *)&aPgno[iLimit+1]);
46752 const char *zWalName, /* Name of the WAL file */
48174 pContent = (void*)(iFirstAmt + (char*)pContent);
49568 static const char zMagicHeader[] = SQLITE_FILE_HEADER;
50233 char aSpace[150]; /* Temp space for pIdxKey - to avoid a malloc */
50234 char *pFree = 0;
50648 unsigned char *data; /* The page data */
50649 unsigned char *temp; /* Temp area for cell content */
50831 unsigned char *data = pPage->aData;
51069 unsigned char *data = pPage->aData;
51082 data[hdr] = (char)flags;
51283 const char *zFilename, /* Name of the file containing the BTree database */
51294 unsigned char zDbHeader[100]; /* Database header content */
51346 char *zFullPathname = sqlite3Malloc(nFullPathname);
52116 unsigned char *data;
52793 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
53509 unsigned char *pBuf, /* Write the bytes into this buffer */
53512 unsigned char *aPayload;
53690 return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
53741 static const unsigned char *fetchPayload(
53746 unsigned char *aPayload;
54265 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
54661 unsigned char *aData = pTrunk->aData;
54942 static int clearCell(MemPage *pPage, unsigned char *pCell){
55018 unsigned char *pCell, /* Complete text of the cell */
55030 unsigned char *pPrior;
55031 unsigned char *pPayload;
56486 unsigned char *oldCell;
56487 unsigned char *newCell = 0;
56620 unsigned char *pCell; /* Pointer to cell to delete */
56684 unsigned char *pTmp;
56901 unsigned char *pCell;
57143 unsigned char *pP1;
57254 char *zMsg1,
57255 const char *zFormat,
57305 static int checkRef(IntegrityCk *pCheck, Pgno iPage, char *zContext){
57330 char *zContext /* Context description (used for error msg) */
57360 char *zContext /* Context for error messages */
57367 unsigned char *pOvflData;
57379 pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage);
57444 char *zParentContext, /* Parent context */
57455 char zContext[100];
57456 char *hit = 0;
57665 SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
57676 char zErr[100];
57776 SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *p){
57789 SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *p){
57967 return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
58120 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
58172 const char *zDestDb, /* Name of database within pDestDb */
58174 const char *zSrcDb /* Name of database within pSrcDb */
59478 const char *z, /* String pointer */
59530 pMem->zMalloc = pMem->z = (char *)z;
59534 pMem->z = (char *)z;
59695 char *zData; /* Data from the btree layer */
59705 zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);
59707 zData = (char *)sqlite3BtreeDataFetch(pCur, &available);
59812 char *zVal = 0;
59815 const char *zNeg = "";
59989 SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepareV2){
60003 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
60013 char *zTmp;
60127 const char *zP4, /* The P4 operand */
60143 SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere){
60646 SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
60654 freeP4(db, n, (void*)*(char**)&zP4);
60669 ** that was cast to a (const char *). */
60685 memcpy((char*)pKeyInfo, zP4, nByte - nField);
60688 pKeyInfo->aSortOrder = (unsigned char*)&pKeyInfo->aColl[nField];
60705 pOp->p4type = (signed char)n;
60720 static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
60729 SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){
60737 SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe *p, const char *zFormat, ...){
60794 static char *displayP4(Op *pOp, char *zTemp, int nTemp){
60795 char *zP4 = zTemp;
60807 const char *zColl = pColl ? pColl->zName : "nil";
60979 char *zP4;
60980 char zPtr[50];
60981 static const char *zFormat1 = "%4d %-13s %4d %4d %4d %-4s %.2X %s\n";
61136 char *z;
61159 pMem->z = (char*)sqlite3OpcodeName(pOp->opcode); /* Opcode */
61263 const char *z = pOp->p4.z;
61282 char z[1000];
61468 p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
61652 const char *zName, /* Pointer to buffer containing name */
61768 char *zMaster = 0; /* File-name for the master journal */
61769 char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);
61822 char const *zFile = sqlite3BtreeGetJournalname(pBt);
62271 char *zExpanded = sqlite3VdbeExpandSql(v, v->zSql);
62709 const unsigned char *buf, /* Buffer to deserialize from */
62721 pMem->u.i = (signed char)buf[0];
62726 pMem->u.i = (((signed char)buf[0])<<8) | buf[1];
62731 pMem->u.i = (((signed char)buf[0])<<16) | (buf[1]<<8) | buf[2];
62741 u64 x = (((signed char)buf[0])<<8) | buf[1];
62787 pMem->z = (char *)buf;
62817 char *pSpace, /* Unaligned space available */
62819 char **ppFree /* OUT: Caller should free this pointer */
62833 *ppFree = (char *)p;
62840 p->aMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
62858 const unsigned char *aKey = (const unsigned char *)pKey;
62913 const unsigned char *aKey1 = (const unsigned char *)pKey1;
63360 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
63361 return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
63388 const char *z, /* String pointer */
63411 SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
63437 const char *z,
63690 const char *zErr = (const char *)sqlite3_value_text(db->pErr);
63742 const char *zName = context->pFunc->zName;
63743 char *zErr;
63989 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
63990 const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
64073 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
64098 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
64116 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
64132 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
64148 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
64298 const char *zData,
64372 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
64385 SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){
64392 const char *z = p->azVar[i];
64400 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
64532 static int findNextHostParameter(const char *zSql, int *pnToken){
64575 SQLITE_PRIVATE char *sqlite3VdbeExpandSql(
64577 const char *zRawSql /* Raw text of the SQL statement */
64587 char zBase[100]; /* Initial working space */
64595 const char *zStart = zRawSql;
64724 SQLITE_PRIVATE void sqlite3ExplainPrintf(Vdbe *pVdbe, const char *zFormat, ...){
64757 const char *z = p->str.zText;
64795 SQLITE_PRIVATE const char *sqlite3VdbeExplanation(Vdbe *pVdbe){
65083 char affinity, /* The affinity to be applied */
65137 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
65138 char *zCsr = zBuf;
65141 static const char *const encnames[] = {"(X)", "(8)", "(16LE)", "(16BE)"};
65145 char c;
65168 char z = pMem->z[i];
65235 char zBuf[200];
65479 char *zMalloc; /* Holding variable for allocated memory */
65495 char bIntint; /* Started out as two integer operands */
65517 char affinity; /* Affinity to use for comparison */
65544 char *zRec; /* Pointer to complete record-data */
65551 char *zData; /* Part of the record being decoded */
65564 const char *zAffinity; /* The affinity to be applied */
65565 char cAff; /* A single character of affinity */
65579 char *zAffinity; /* The affinity string for the record */
65590 char *zName; /* Name of savepoint */
65653 char *pFree;
65656 char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
65688 const char *zDb; /* database name - used by the update hook */
65689 const char *zTbl; /* Table name - used by the opdate hook */
65736 const char *zKey;
65770 const char *zMaster;
65771 char *zSql;
65779 char *z; /* Text of the error report */
65829 const char *zFilename; /* Name of database file for pPager */
65883 char *zTrace;
65884 char *z;
66351 char *zMalloc; /* Holding variable for allocated memory */
66601 char bIntint; /* Started out as two integer operands */
67149 char affinity; /* Affinity to use for comparison */
67367 static const unsigned char and_logic[] = { 0, 0, 0, 0, 1, 2, 0, 2, 2 };
67370 static const unsigned char or_logic[] = { 0, 1, 2, 1, 1, 1, 2, 1, 2 };
67521 char *zRec; /* Pointer to complete record-data */
67528 char *zData; /* Part of the record being decoded */
67578 u.ao.zRec = (char*)u.ao.pC->aRow;
67643 u.ao.zData = (char*)sqlite3BtreeKeyFetch(u.ao.pCrsr, &u.ao.avail);
67645 u.ao.zData = (char*)sqlite3BtreeDataFetch(u.ao.pCrsr, &u.ao.avail);
67783 u.ao.zData = u.ao.t<12 ? (char*)&u.ao.payloadSize64 : 0;
67838 const char *zAffinity; /* The affinity to be applied */
67839 char cAff; /* A single character of affinity */
67884 char *zAffinity; /* The affinity string for the record */
68022 char *zName; /* Name of savepoint */
68067 u.as.pNew->zName = (char *)&u.as.pNew[1];
69009 char *pFree;
69012 char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
69429 const char *zDb; /* database name - used by the update hook */
69430 const char *zTbl; /* Table name - used by the opdate hook */
69548 const char *zDb = db->aDb[u.bj.pC->iDb].zName;
69549 const char *zTbl = pOp->p4.z;
69948 const char *zKey;
70277 const char *zMaster;
70278 char *zSql;
70401 char *z; /* Text of the error report */
70963 const char *zFilename; /* Name of database file for pPager */
71043 pOut->z = (char *)sqlite3JournalModename(u.cj.eNew);
71130 const char *z = pOp->p4.z;
71559 char *zTrace;
71560 char *z;
71755 static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){
71757 char *zErr = 0; /* Error message */
71812 const char *zDb, /* The attached database containing the blob */
71813 const char *zTable, /* The table containing the blob */
71814 const char *zColumn, /* The column containing the blob */
71856 char *zErr = 0;
71919 const char *zFault = 0;
72156 char *zErr;
72644 char *d; /* Dummy */
73250 char *zBuf; /* Space to buffer journal writes */
73255 const char *zJournal; /* Name of the journal file */
73417 const char *zName, /* Name of the journal file */
73979 const char *zType, /* "GROUP" or "ORDER" or "" */
74031 static int nameInUsingClause(IdList *pUsing, const char *zCol){
74049 const char *zSpan,
74050 const char *zCol,
74051 const char *zTab,
74052 const char *zDb
74100 const char *zDb, /* Name of the database containing table, or NULL */
74101 const char *zTab, /* Name of table containing column, or NULL */
74102 const char *zCol, /* Name of the column. */
74171 const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
74284 char *zAs = pEList->a[j].zName;
74334 const char *zErr;
74475 const char *zColumn;
74476 const char *zTable;
74477 const char *zDb;
74506 const char *zId; /* The function name. */
74624 char *zCol = pE->u.zToken;
74626 char *zAs = pEList->a[i].zName;
74702 const char *zType, /* "ORDER" or "GROUP" */
74826 const char *zType /* "ORDER" or "GROUP" */
74876 const char *zType /* Either "ORDER" or "GROUP", as appropriate */
74986 const char *zSavedContext = pParse->zAuthContext;
75256 SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr){
75302 SQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(Parse *pParse, Expr *pExpr, const char *zC){
75353 const char *zColl = p->pTab->aCol[j].zColl;
75379 SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2){
75380 char aff1 = sqlite3ExprAffinity(pExpr);
75406 static char comparisonAffinity(Expr *pExpr){
75407 char aff;
75429 SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity){
75430 char aff = comparisonAffinity(pExpr);
75446 u8 aff = (char)sqlite3ExprAffinity(pExpr2);
75651 pNew->u.zToken = (char*)&pNew[1];
75676 const char *zToken /* Token argument. Might be NULL */
75820 const char *z;
75868 char **a;
76067 char *zToken = pNew->u.zToken = (char*)&zAlloc[nNewSize];
76344 pItem->zSpan = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
76356 const char *zObject
76572 SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr *p, char aff){
76605 SQLITE_PRIVATE int sqlite3IsRowid(const char *z){
76797 char *pKey;
76799 pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
76906 char *zMsg = sqlite3MPrintf(
76916 char affinity; /* Affinity of the LHS of the IN */
77107 char affinity; /* Comparison affinity to use */
77219 static char *dup8bytes(Vdbe *v, const char *in){
77220 char *out = sqlite3DbMallocRaw(sqlite3VdbeDb(v), 8);
77236 static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
77239 char *zV;
77243 zV = dup8bytes(v, (char*)&value);
77266 const char *z = pExpr->u.zToken;
77270 char *zV;
77272 zV = dup8bytes(v, (char*)&value);
77621 const char *z;
77622 char *zBlob;
77825 const char *zId; /* The function name */
77925 sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);
77928 (char*)pDef, P4_FUNCDEF);
78254 const char *zBinOp = 0; /* Binary operator */
78255 const char *zUniOp = 0; /* Unary operator */
78321 const char *zAff = "unk";
78462 const char *zType = "unk";
79457 unsigned char const *zSql = sqlite3_value_text(argv[0]);
79458 unsigned char const *zTableName = sqlite3_value_text(argv[1]);
79462 unsigned char const *zCsr = zSql;
79464 char *zRet;
79482 tname.z = (char*)zCsr;
79523 char *zOutput = 0;
79524 char *zResult;
79525 unsigned char const *zInput = sqlite3_value_text(argv[0]);
79526 unsigned char const *zOld = sqlite3_value_text(argv[1]);
79527 unsigned char const *zNew = sqlite3_value_text(argv[2]);
79529 unsigned const char *z; /* Pointer to token */
79537 char *zParent;
79543 zParent = sqlite3DbStrNDup(db, (const char *)z, n);
79546 if( 0==sqlite3StrICmp((const char *)zOld, zParent) ){
79547 char *zOut = sqlite3MPrintf(db, "%s%.*s\"%w\"",
79548 (zOutput?zOutput:""), z-zInput, zInput, (const char *)zNew
79577 unsigned char const *zSql = sqlite3_value_text(argv[0]);
79578 unsigned char const *zTableName = sqlite3_value_text(argv[1]);
79583 unsigned char const *zCsr = zSql;
79585 char *zRet;
79604 tname.z = (char*)zCsr;
79679 static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
79680 char *zNew;
79697 static char *whereForeignKeys(Parse *pParse, Table *pTab){
79699 char *zWhere = 0;
79713 static char *whereTempTriggers(Parse *pParse, Table *pTab){
79715 char *zWhere = 0;
79732 char *zNew = sqlite3MPrintf(pParse->db, "type='trigger' AND (%s)", zWhere);
79747 static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
79749 char *zWhere;
79796 static int isSystemTable(Parse *pParse, const char *zName){
79814 char *zDb; /* Name of database iDb */
79816 char *zName = 0; /* NULL-terminated version of pName */
79819 const char *zTabName; /* Original name of the table */
79822 char *zWhere = 0; /* Where clause to locate temp triggers */
79908 sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
80042 const char *zDb; /* Database name */
80043 const char *zTab; /* Table name */
80044 char *zCol; /* Null-terminated column definition */
80118 zCol = sqlite3DbStrNDup(db, (char*)pColDef->z, pColDef->n);
80120 char *zEnd = &zCol[pColDef->n-1];
80382 const char *zWhere, /* Delete entries for this table or index */
80383 const char *zWhereType /* Either "tbl" or "idx" */
80386 const char *zName;
80387 const char *zCols;
80411 const char *zTab = aTable[i].zName;
80443 sqlite3VdbeChangeP4(v, -1, (char *)3, P4_INT32);
80758 (char *)pKey, P4_KEYINFO_HANDOFF);
80776 (char*)&stat3InitFuncdef, P4_FUNCDEF);
80821 (char*)pColl, P4_COLLSEQ);
80838 (char*)&stat3PushFuncdef, P4_FUNCDEF);
80858 (char*)&stat3PushFuncdef, P4_FUNCDEF);
80864 (char*)&stat3GetFuncdef, P4_FUNCDEF);
80871 (char*)&stat3GetFuncdef, P4_FUNCDEF);
80874 (char*)&stat3GetFuncdef, P4_FUNCDEF);
80877 (char*)&stat3GetFuncdef, P4_FUNCDEF);
81020 char *z, *zDb;
81080 const char *zDatabase;
81094 static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
81100 const char *z;
81168 static int loadStat3(sqlite3 *db, const char *zDb){
81171 char *zSql; /* Text of the SQL statement */
81193 char *zIndex; /* Index name */
81197 zIndex = (char *)sqlite3_column_text(pStmt, 0);
81225 char *zIndex; /* Index name */
81230 zIndex = (char *)sqlite3_column_text(pStmt, 0);
81267 const char *z = (const char *)(
81315 char *zSql;
81440 const char *zName;
81441 const char *zFile;
81442 char *zPath = 0;
81443 char *zErr = 0;
81446 char *zErrDyn = 0;
81451 zFile = (const char *)sqlite3_value_text(argv[0]);
81452 zName = (const char *)sqlite3_value_text(argv[1]);
81473 char *z = db->aDb[i].zName;
81543 char *zKey;
81555 zKey = (char *)sqlite3_value_blob(argv[2]);
81624 const char *zName = (const char *)sqlite3_value_text(argv[0]);
81628 char zErr[128];
81700 char *zAuthArg;
81725 sqlite3VdbeChangeP4(v, -1, (char *)pFunc, P4_FUNCDEF);
81796 const char *zType, /* "view", "trigger", or "index" */
81831 const char *zDb;
82002 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
82033 const char *zTab, /* Table name */
82034 const char *zCol, /* Column name */
82038 char *zDb = db->aDb[iDb].zName; /* Name of attached database */
82072 const char *zCol; /* Name of the column of the table */
82124 const char *zArg1,
82125 const char *zArg2,
82126 const char *zArg3
82160 const char *zContext
82226 const char *zName; /* Name of the table */
82244 const char *zName /* Name of the table to be locked */
82351 char *vtab = (char *)sqlite3GetVTable(db, pParse->apVtabLock[i]);
82411 SQLITE_PRIVATE void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
82413 char *zSql;
82414 char *zErrMsg = 0;
82417 char saveBuf[SAVE_SZ];
82449 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
82480 const char *zName, /* Name of the table we are looking for */
82481 const char *zDbase /* Name of the database. Might be NULL */
82493 const char *zMsg = isView ? "no such view" : "no such table";
82518 const char *zDb;
82541 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
82576 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
82742 char *zName = pIndex->zName;
82777 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
82806 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
82807 char *zName;
82809 zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
82825 sqlite3VdbeChangeP4(v, -1, (char *)5, P4_INT32); /* 5 column table */
82837 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
82860 char *zName; /* Name we are searching for */
82920 SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
82956 char *zName = 0; /* The name of the new table */
83000 char *zDb = db->aDb[iDb].zName;
83031 char *zDb = db->aDb[iDb].zName;
83157 sqlite3UpperToLower[*(unsigned char *)(x)]== \
83158 sqlite3UpperToLower[*(unsigned char *)(y)] \
83172 char *z;
83250 SQLITE_PRIVATE char sqlite3AffinityType(const char *zIn){
83252 char aff = SQLITE_AFF_NUMERIC;
83335 pCol->zDflt = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
83368 char *zType = 0;
83449 char *zColl; /* Dequoted name of collation sequence */
83497 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
83546 static int identLength(const char *z){
83567 static void identPut(char *z, int *pIdx, char *zSignedIdent){
83568 unsigned char *zIdent = (unsigned char*)zSignedIdent;
83595 static char *createTableStmt(sqlite3 *db, Table *p){
83597 char *zStmt;
83598 char *zSep, *zSep2, *zEnd;
83625 static const char * const azType[] = {
83633 const char *zType;
83745 char *zType; /* "view" or "table" */
83746 char *zType2; /* "VIEW" or "TABLE" */
83747 char *zStmt; /* Text of the CREATE TABLE or CREATE VIEW statement */
83874 const char *zName = (const char *)pParse->sNameToken.z;
83880 nName = (int)((const char *)pCons->z - zName);
83902 const char *z;
83975 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
84219 const char *zType, /* "idx" or "tbl" */
84220 const char *zName /* Name of index or table */
84223 const char *zDbName = pParse->db->aDb[iDb].zName;
84225 char zTab[24];
84341 const char *zTab = SCHEMA_TABLE(iDb);
84342 const char *zDb = db->aDb[iDb].zName;
84343 const char *zArg2 = 0;
84439 char *z;
84473 z = (char*)&pFKey->aCol[nCol];
84600 (char *)pKey, P4_KEYINFO_HANDOFF);
84605 sqlite3VdbeAddOp4(v, OP_SorterOpen, iSorter, 0, 0, (char*)pKey, P4_KEYINFO);
84672 char *zName = 0; /* Name of the index */
84685 char *zExtra;
84812 const char *zDb = pDb->zName;
84830 nullId.n = sqlite3Strlen30((char*)nullId.z);
84856 sizeof(char *)*nCol + /* Index.azColl */
84865 zExtra = (char*)pIndex;
84867 pIndex->azColl = (char**)
84868 ((char*)pIndex->aiRowEst + ROUND8(sizeof(tRowcnt)*nCol+1));
84873 pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]);
84874 zExtra = (char *)(&pIndex->zName[nName+1]);
84902 const char *zColName = pListItem->zName;
84905 char *zColl; /* Collation sequence name */
84971 const char *z1;
84972 const char *z2;
85037 char *zStmt;
85197 const char *zDb = db->aDb[iDb].zName;
85198 const char *zTab = SCHEMA_TABLE(iDb);
85251 char *z;
85262 z = (char*)pArray;
85313 SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
85659 char *zName = sqlite3NameFromToken(pParse->db, pName);
85663 static const char * const az[] = { "BEGIN", "RELEASE", "ROLLBACK" };
85769 SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse *pParse, const char *zDb){
85842 char *p4, /* Error message */
85858 static int collationMatch(const char *zColl, Index *pIndex){
85862 const char *z = pIndex->azColl[i];
85877 static void reindexTable(Parse *pParse, Table *pTab, char const *zColl){
85896 static void reindexDatabases(Parse *pParse, char const *zColl){
85930 char *z; /* Name of a table or index */
85931 const char *zDb; /* Name of the database */
85948 char *zColl;
86004 char *zColl = pIdx->azColl[i];
86042 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
86045 char *zExternal = sqlite3DbStrDup(db, zName);
86052 char const *zExternal;
86073 char *z = pColl->zName;
86105 const char *zName /* Collating sequence name */
86144 const char *zName = pColl->zName;
86172 const char *zName, /* Name of the collating sequence */
86183 pColl[0].zName = (char*)&pColl[3];
86185 pColl[1].zName = (char*)&pColl[3];
86187 pColl[2].zName = (char*)&pColl[3];
86226 const char *zName,
86308 const char *zFunc, /* Name of function */
86366 const char *zName, /* Name of the function. Not null-terminated */
86426 pBest->zName = (char *)&pBest[1];
86636 char *zStmtType /* Either DELETE or UPDATE. For error messages. */
86727 const char *zDb; /* Name of database holding pTab */
86900 const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
87138 const char *zAff;
87229 const char *z = 0;
87262 const unsigned char *z = sqlite3_value_text(argv[0]);
87339 const unsigned char *zHaystack;
87340 const unsigned char *zNeedle;
87390 const unsigned char *z;
87391 const unsigned char *z2;
87457 sqlite3_result_text(context, (char*)z, (int)(z2-z), SQLITE_TRANSIENT);
87463 sqlite3_result_blob(context, (char*)&z[p1], (int)p2, SQLITE_TRANSIENT);
87474 char *zBuf;
87513 char *z;
87534 char *z1;
87535 const char *z2;
87538 z2 = (char*)sqlite3_value_text(argv[0]);
87541 assert( z2==(char*)sqlite3_value_text(argv[0]) );
87546 z1[i] = (char)sqlite3Toupper(z2[i]);
87553 char *z1;
87554 const char *z2;
87557 z2 = (char*)sqlite3_value_text(argv[0]);
87560 assert( z2==(char*)sqlite3_value_text(argv[0]) );
87617 unsigned char *p;
87627 sqlite3_result_blob(context, (char*)p, n, sqlite3_free);
87851 SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){
87882 const unsigned char *zA, *zB;
87906 const unsigned char *zEsc = sqlite3_value_text(argv[2]);
87908 if( sqlite3Utf8CharLen((char*)zEsc, -1)!=1 ){
87999 const char *zOptName;
88006 if( (zOptName = (const char*)sqlite3_value_text(argv[0]))!=0 ){
88036 static const char hexdigits[] = {
88058 char zBuf[50];
88073 char *zText = 0;
88074 char const *zBlob = sqlite3_value_blob(argv[0]);
88077 zText = (char *)contextMalloc(context, (2*(i64)nBlob)+4);
88096 const unsigned char *zArg = sqlite3_value_text(argv[0]);
88097 char *z;
88133 const unsigned char *z = sqlite3_value_text(argv[0]);
88139 ** The char() function takes zero or more arguments, each of which is
88148 unsigned char *z, *zOut;
88177 sqlite3_result_text(context, (char*)z, (int)(zOut-z), sqlite3_free);
88190 const unsigned char *pBlob;
88191 char *zHex, *z;
88200 unsigned char c = *pBlob;
88242 const unsigned char *zStr; /* The input string A */
88243 const unsigned char *zPattern; /* The pattern string B */
88244 const unsigned char *zRep; /* The replacement string C */
88245 unsigned char *zOut; /* The output */
88314 sqlite3_result_text(context, (char*)zOut, j, sqlite3_free);
88326 const unsigned char *zIn; /* Input string */
88327 const unsigned char *zCharSet; /* Set of characters to trim */
88331 unsigned char *aLen = 0; /* Length of each character in zCharSet */
88332 unsigned char **azChar = 0; /* Individual characters in zCharSet */
88343 static const unsigned char lenOne[] = { 1 };
88344 static unsigned char * const azOne[] = { (u8*)" " };
88347 azChar = (unsigned char **)azOne;
88352 const unsigned char *z;
88357 azChar = contextMalloc(context, ((i64)nChar)*(sizeof(char*)+1));
88361 aLen = (unsigned char*)&azChar[nChar];
88363 azChar[nChar] = (unsigned char *)z;
88398 sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);
88418 char zResult[8];
88421 static const unsigned char iCode[] = {
88467 const char *zFile = (const char *)sqlite3_value_text(argv[0]);
88468 const char *zProc;
88470 char *zErrMsg = 0;
88473 zProc = (const char *)sqlite3_value_text(argv[1]);
88649 const char *zVal;
88651 const char *zSep;
88664 zSep = (char*)sqlite3_value_text(argv[1]);
88672 zVal = (char*)sqlite3_value_text(argv[0]);
88708 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
88745 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
88766 assert( (char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll );
88767 assert( &((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne );
88768 assert( &((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet );
88808 FUNCTION(char, -1, 0, 0, charFunc ),
89069 char *zKey = pFKey->aCol[0].zCol; /* Name of left-most parent key column */
89128 char *zDfltColl; /* Def. collation for column */
89129 char *zIdxCol; /* Name of indexed column */
89261 sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
89386 const char *zCol; /* Name of column in child table */
89394 const char *zColl;
89587 const char *zDb; /* Name of database containing pTab */
89658 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
89807 char *zKey = p->aCol[i].zCol;
89869 char const *zFrom; /* Name of child table */
89987 pStep->target.z = (char *)&pStep[1];
89989 memcpy((char *)pStep->target.z, zFrom, nFrom);
90080 const char *z = (p ? pFKey->pNextTo->zTo : pFKey->zTo);
90162 SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
90175 pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+2);
90213 char *zColAff;
90217 zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
90640 char *zTab; /* Name of the table into which we are inserting */
90641 const char *zDb; /* Name of the database holding this table */
91127 const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
91351 char *zMsg;
91386 char *zConsName = pCheck->a[i].zName;
91538 const char *zSep;
91539 char *zErr;
91545 char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
91675 (char*)pKey, P4_KEYINFO_HANDOFF);
91700 static int xferCompatibleCollation(const char *z1, const char *z2){
91986 (char*)pKey, P4_KEYINFO_HANDOFF);
91990 (char*)pKey, P4_KEYINFO_HANDOFF);
92046 const char *zSql, /* The SQL to be executed */
92049 char **pzErrMsg /* Write error messages here */
92052 const char *zLeftover; /* Tail of unprocessed SQL */
92054 char **azCols = 0; /* Names of result columns */
92064 char **azVals = 0;
92090 azCols = sqlite3DbMallocZero(db, 2*nCol*sizeof(const char*) + 1);
92095 azCols[i] = (char *)sqlite3_column_name(pStmt, i);
92105 azVals[i] = (char *)sqlite3_column_text(pStmt, i);
92220 int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
92221 const char * (*bind_parameter_name)(sqlite3_stmt*,int);
92222 int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
92230 int eTextRep,const char*));
92237 const char * (*column_database_name)(sqlite3_stmt*,int);
92239 const char * (*column_decltype)(sqlite3_stmt*,int i);
92244 const char * (*column_name)(sqlite3_stmt*,int);
92246 const char * (*column_origin_name)(sqlite3_stmt*,int);
92248 const char * (*column_table_name)(sqlite3_stmt*,int);
92250 const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
92255 int (*complete)(const char*sql);
92257 int (*create_collation)(sqlite3*,const char*,int,void*,
92261 int (*create_function)(sqlite3*,const char*,int,int,void*,
92269 int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
92272 int (*declare_vtab)(sqlite3*,const char*);
92275 const char * (*errmsg)(sqlite3*);
92277 int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
92281 void (*free_table)(char**result);
92284 int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
92288 const char * (*libversion)(void);
92291 char * (*mprintf)(const char*,...);
92292 int (*open)(const char*,sqlite3**);
92294 int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
92296 void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
92302 void (*result_error)(sqlite3_context*,const char*,int);
92307 void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
92313 int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
92314 const char*,const char*),void*);
92316 char * (*snprintf)(int,char*,const char*,...);
92318 int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
92319 char const**,char const**,int*,int*,int*);
92322 void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
92324 void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
92334 const unsigned char * (*value_text)(sqlite3_value*);
92339 char *(*vmprintf)(const char*,va_list);
92341 int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
92343 int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
92347 int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
92353 int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
92357 int (*create_collation_v2)(sqlite3*,const char*,int,void*,
92360 int (*file_control)(sqlite3*,const char*,int,void*);
92368 int (*open_v2)(const char*,sqlite3**,int,const char*);
92374 sqlite3_vfs *(*vfs_find)(const char*);
92386 const char *(*sql)(sqlite3_stmt*);
92389 sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
92393 const char *(*compileoption_get)(int);
92394 int (*compileoption_used)(const char*);
92395 int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
92404 void (*log)(int,const char*,...);
92406 const char *(*sourceid)(void);
92408 int (*strnicmp)(const char*,const char*,int);
92411 int (*wal_checkpoint)(sqlite3*,const char*);
92412 void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
92418 const char *(*db_filename)(sqlite3*,const char*);
92419 int (*db_readonly)(sqlite3*,const char*);
92421 const char *(*errstr)(int);
92424 int (*stricmp)(const char*,const char*);
92425 int (*uri_boolean)(const char*,const char*,int);
92426 sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
92427 const char *(*uri_parameter)(const char*,const char*);
92428 char *(*vsnprintf)(int,char*,const char*,va_list);
92429 int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
93054 const char *zFile, /* Name of the shared library containing extension */
93055 const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
93056 char **pzErrMsg /* Put error message here if not 0 */
93060 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
93061 char *zErrmsg = 0;
93062 const char *zEntry;
93063 char *zAltEntry = 0;
93069 static const char *azEndings[] = {
93100 char *zAltFile = sqlite3_mprintf("%s.%s", zFile, azEndings[ii]);
93117 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
93145 zAltEntry[iEntry++] = (char)sqlite3UpperToLower[(unsigned)c];
93150 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
93193 const char *zFile, /* Name of the shared library containing extension */
93194 const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
93195 char **pzErrMsg /* Put error message here if not 0 */
93344 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
93352 char *zErrmsg;
93361 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
93402 static u8 getSafetyLevel(const char *z, int omitFull, int dflt){
93404 static const char zText[] = "onoffalseyestruefull";
93424 SQLITE_PRIVATE u8 sqlite3GetBoolean(const char *z, int dflt){
93437 static int getLockingMode(const char *z){
93452 static int getAutoVacuum(const char *z){
93468 static int getTempStore(const char *z){
93508 static int changeTempStorage(Parse *pParse, const char *zStorageType){
93523 static void returnSingleInt(Parse *pParse, const char *zLabel, i64 value){
93530 sqlite3VdbeAddOp4(v, OP_Int64, 0, mem, 0, (char*)pI64, P4_INT64);
93542 static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
93544 const char *zName; /* Name of the pragma */
93627 static const char *actionName(u8 action){
93628 const char *zName;
93647 SQLITE_PRIVATE const char *sqlite3JournalModename(int eMode){
93648 static char * const azModeName[] = {
93688 char *zLeft = 0; /* Nul-terminated UTF-8 string <id> */
93689 char *zRight = 0; /* Nul-terminated UTF-8 string <value>, or NULL */
93690 const char *zDb = 0; /* The database name */
93693 char *aFcntl[4]; /* Argument to SQLITE_FCNTL_PRAGMA */
93903 const char *zRet = "normal";
93970 const char *zMode;
94287 char *proxy_file_path = NULL;
94393 sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
94523 char *zCol = pFK->aCol[j].zCol;
94524 char *zOnDelete = (char *)actionName(pFK->aAction[0]);
94525 char *zOnUpdate = (char *)actionName(pFK->aAction[1]);
94602 sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
94889 char *zName;
95028 const char *zOpt;
95115 static const char *const azLockName[] = {
95125 const char *zState = "unknown";
95153 char zKey[40];
95226 const char *zObj, /* Object being parsed at the point of error */
95227 const char *zExtra /* Error information */
95254 SQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){
95336 static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
95344 char const *azArg[4];
95347 char const *zMasterSchema;
95348 char const *zMasterName;
95354 static const char master_schema[] =
95364 static const char temp_master_schema[] =
95402 sqlite3InitCallback(&initData, 3, (char **)azArg, 0);
95527 char *zSql;
95533 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
95594 SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
95734 const char *zSql, /* UTF-8 encoded SQL statement. */
95739 const char **pzTail /* OUT: End of parsed string */
95742 char *zErrMsg = 0; /* Error message */
95786 const char *zDb = db->aDb[i].zName;
95799 char *zSqlCopy;
95838 static const char * const azColName[] = {
95893 const char *zSql, /* UTF-8 encoded SQL statement. */
95898 const char **pzTail /* OUT: End of parsed string */
95930 const char *zSql;
95966 const char *zSql, /* UTF-8 encoded SQL statement. */
95969 const char **pzTail /* OUT: End of parsed string */
95978 const char *zSql, /* UTF-8 encoded SQL statement. */
95981 const char **pzTail /* OUT: End of parsed string */
96006 char *zSql8;
96007 const char *zTail8 = 0;
96204 static const char zKeyText[] = "naturaleftouterightfullinnercross";
96226 && sqlite3StrNICmp((char*)p->z, &zKeyText[aKeyword[j].i], p->n)==0 ){
96241 const char *zSp = " ";
96260 static int columnIndex(Table *pTab, const char *zCol){
96280 const char *zCol, /* Name of the column we are looking for */
96423 char *zName; /* Name of column in the right table */
96462 char *zName; /* Name of the term in the USING clause */
96714 sqlite3VdbeChangeP4(v, -1, (const char *)pColl, P4_COLLSEQ);
96922 static const char *selectOpName(int id){
96923 char *z;
96945 static void explainTempTable(Parse *pParse, const char *zUsage){
96948 char *zMsg = sqlite3MPrintf(pParse->db, "USE TEMP B-TREE FOR %s", zUsage);
96993 char *zMsg = sqlite3MPrintf(
97136 static const char *columnType(
97139 const char **pzOriginDb,
97140 const char **pzOriginTab,
97141 const char **pzOriginCol
97143 char const *zType = 0;
97144 char const *zOriginDb = 0;
97145 char const *zOriginTab = 0;
97146 char const *zOriginCol = 0;
97277 const char *zType;
97279 const char *zOrigDb = 0;
97280 const char *zOrigTab = 0;
97281 const char *zOrigCol = 0;
97331 char *zName = pEList->a[i].zName;
97335 char *zCol;
97353 char *zName = 0;
97392 char *zName; /* Column name */
97446 char *zNewName;
98044 sqlite3VdbeChangeP4(v, addr, (char*)pKeyInfo, P4_KEYINFO);
98103 (char*)pKeyInfo, p4type);
98617 sqlite3VdbeAddOp4(v, OP_Permutation, 0, 0, 0, (char*)aPermute, P4_INTARRAY);
98619 (char*)pKeyMerge, P4_KEYINFO_HANDOFF);
98863 const char *zSavedAuthContext = pParse->zAuthContext;
99172 char *zName = sqlite3DbStrDup(db, pList->a[i].zSpan);
99259 const char *zFunc = pExpr->u.zToken;
99319 char *zIndex = pFrom->zIndex;
99566 char *zTName = 0; /* text of name of TABLE */
99575 char *zTabName = pFrom->zAlias;
99576 const char *zSchemaName = 0;
99591 char *zName = pTab->aCol[j].zName;
99592 char *zColname; /* The computed column name */
99593 char *zToFree; /* Malloced string that needs to be freed */
99843 (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
99910 sqlite3VdbeAddOp4(v, OP_CollSeq, regHit, 0, 0, (char *)pColl, P4_COLLSEQ);
99958 char *zEqp = sqlite3MPrintf(pParse->db, "SCAN TABLE %s %s%s(~%d rows)",
100299 (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
100326 (char*)keyInfoFromExprList(pParse, p->pEList),
100445 0, (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
100558 (char*)pKeyInfo, P4_KEYINFO);
100690 sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO_HANDOFF);
100940 char **azResult; /* Accumulated output */
100941 char *zErrMsg; /* Error message text, if an error occurs */
100954 static int sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
100958 char *z; /* A single column of result */
100969 char **azNew;
100971 azNew = sqlite3_realloc( p->azResult, sizeof(char*)*p->nAlloc );
101030 const char *zSql, /* The SQL to be executed */
101031 char ***pazResult, /* Write the result table here */
101034 char **pzErrMsg /* Write error messages here */
101049 res.azResult = sqlite3_malloc(sizeof(char*)*res.nAlloc );
101076 char **azNew;
101077 azNew = sqlite3_realloc( res.azResult, sizeof(char*)*res.nData );
101095 char **azResult /* Result returned from from sqlite3_get_table() */
101203 char *zName = 0; /* Name of the trigger */
101328 const char *zDb = db->aDb[iTabDb].zName;
101329 const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
101386 char *zName; /* Name of trigger */
101413 char *z;
101419 z = sqlite3DbStrNDup(db, (char*)pAll->z, pAll->n);
101487 char *z = (char*)&pTriggerStep[1];
101601 const char *zDb;
101602 const char *zName;
101665 const char *zDb = db->aDb[iDb].zName;
101666 const char *zTab = SCHEMA_TABLE(iDb);
101709 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
101899 static const char *onErrorText(int onError){
102098 sqlite3VdbeChangeP4(v, -1, (const char *)pPrg->pProgram, P4_SUBPROGRAM);
102316 sqlite3VdbeChangeP4(v, -1, (const char *)pValue, P4_MEM);
102609 (char*)pKey, P4_KEYINFO_HANDOFF);
102864 const char *pVTab = (const char*)sqlite3GetVTable(db, pTab);
102945 static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){
102957 static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
102976 static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
102984 rc = execSql(db, pzErrMsg, (char*)sqlite3_column_text(pStmt, 0));
103016 SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
103020 char *zSql = 0; /* SQL statements */
103024 void (*saved_xTrace)(void*,const char*); /* Saved db->xTrace */
103094 char *zKey;
103207 static const unsigned char aCopy[] = {
103307 const char *zName, /* Name assigned to this module */
103324 char *zCopy = (char *)(&pMod[1]);
103351 const char *zName, /* Name assigned to this module */
103363 const char *zName, /* Name assigned to this module */
103550 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
103552 int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
103553 char **azModuleArg;
103622 const char *z = (const char*)pParse->sArg.z;
103649 char *zStmt;
103650 char *zWhere;
103698 const char *zName = pTab->zName;
103745 int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
103746 char **pzErr
103751 const char *const*azArg = (const char *const*)pTab->azModuleArg;
103753 char *zErr = 0;
103754 char *zModuleName = sqlite3MPrintf(db, "%s", pTab->zName);
103797 const char *zFormat = "vtable constructor did not declare schema: %s";
103812 char *zType = pTab->aCol[iCol].zType;
103856 const char *zMod;
103870 const char *zModule = pTab->azModuleArg[0];
103874 char *zErr = 0;
103924 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){
103928 const char *zMod;
103965 SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
103970 char *zErr = 0;
104028 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
104067 x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);
104087 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){
104247 char *zLowerName;
104248 unsigned char *z;
104268 for(z=(unsigned char*)zLowerName; *z; z++){
104286 pNew->zName = (char *)&pNew[1];
104327 static const unsigned char aMap[] = {
105056 char idxaff;
105146 const char *z = 0; /* String on RHS of LIKE operator */
105151 char wc[3]; /* Wildcard characters */
105184 z = (char *)sqlite3_value_text(pVal);
105913 const char *zColl = pIdx->azColl[iCol];
106230 char aff;
106398 nByte += nColumn*sizeof(char*); /* Index.azColl */
106403 pIdx->azColl = (char**)&pIdx[1];
106449 (char*)pKeyinfo, P4_KEYINFO_HANDOFF);
106929 char *zSample = sqlite3Utf8to16(
107359 const char *zColl; /* Name of collating sequence for i-th index term */
107546 char bSortInit; /* Initializer for bSort in inner loop */
107547 char bDistInit; /* Initializer for bDist in inner loop */
107686 char bSort = bSortInit; /* True if external sort required */
107687 char bDist = bDistInit; /* True if index cannot help with DISTINCT */
107688 char bLookup = 0; /* True if not a covering index */
108143 static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
108298 char **pzAff /* OUT: Set to point to affinity string */
108308 char *zAff; /* Affinity string to return */
108377 const char *zColumn, /* Name of the column */
108378 const char *zOp /* Name of the operator */
108405 static char *explainIndexRange(sqlite3 *db, WhereLevel *pLevel, Table *pTab){
108426 char *z = (j==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[j]].zName;
108430 char *z = (j==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[j]].zName;
108456 char *zMsg; /* Text to add to EQP output */
108478 char *zWhere = explainIndexRange(db, pLevel, pItem->pTab);
108803 char *zStartAff; /* Affinity for start of range constraint */
108804 char *zEndAff; /* Affinity for end of range constraint */
109302 SQLITE_API char sqlite3_query_plan[BMS*2*40]; /* Text of the join */
109866 const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
109902 (char*)pKey, P4_KEYINFO_HANDOFF);
109931 char *z;
110281 ** and nonterminal numbers. "unsigned char" is
110292 ** and nonterminal numbers. "unsigned char" is
110312 #define YYCODETYPE unsigned char
111008 static char *yyTracePrompt = 0;
111029 SQLITE_PRIVATE void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
111040 static const char *const yyTokenName[] = {
111110 static const char *const yyRuleName[] = {
111828 unsigned char nrhs; /* Number of right-hand side symbols in the rule */
113238 yygotominor.yy342.pExpr->affinity = (char)yymsp[-3].minor.yy392;
113635 # define charMap(X) sqlite3UpperToLower[(unsigned char)X]
113638 # define charMap(X) ebcdicToAscii[(unsigned char)X]
113639 const unsigned char ebcdicToAscii[] = {
113687 static int keywordCode(const char *z, int n){
113699 static const char zText[540] = {
113731 static const unsigned char aHash[127] = {
113743 static const unsigned char aNext[121] = {
113755 static const unsigned char aLen[121] = {
113779 static const unsigned char aCode[121] = {
113939 SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char *z, int n){
113940 return keywordCode((char*)z, n);
113965 #define IdChar(C) ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)
113968 SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[] = {
113991 SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){
114252 *tokenType = keywordCode((char*)z, i);
114267 SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
114301 pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
114435 #define IdChar(C) ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)
114438 SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];
114512 SQLITE_API int sqlite3_complete(const char *zSql){
114600 unsigned char c;
114672 char const *zSql8;
114814 SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
114820 SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
114826 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
114846 SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*, ...) = 0;
114856 SQLITE_API char *sqlite3_temp_directory = 0;
114865 SQLITE_API char *sqlite3_data_directory = 0;
115039 int SQLITE_EXTRA_INIT(const char*);
115253 ** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));
115255 typedef void(*LOGFUNC_t)(void*,int,const char*);
115273 typedef void(*SQLLOGFUNC_t)(void*, sqlite3*, const char*, int);
115449 static int allSpaces(const char *z, int n){
115471 && allSpaces(((char*)pKey1)+n, nKey1-n)
115472 && allSpaces(((char*)pKey2)+n, nKey2-n)
115497 (const char *)pKey1, (const char *)pKey2, (nKey1<nKey2)?nKey1:nKey2);
115835 SQLITE_PRIVATE const char *sqlite3ErrName(int rc){
115836 const char *zName = 0;
115925 static char zBuf[50];
115937 SQLITE_PRIVATE const char *sqlite3ErrStr(int rc){
115938 static const char* const aMsg[] = {
115967 const char *zErr = "unknown error";
116123 const char *zFunctionName,
116217 const char *zFunc,
116231 const char *zFunc,
116277 char *zFunc8;
116304 const char *zName,
116328 SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
116347 void (*xProfile)(void*,const char*,sqlite_uint64),
116385 void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
116425 const char *zDb, /* Database */
116468 int(*xCallback)(void *, sqlite3*, const char*, int),
116489 const char *zDb, /* Name of attached database (or NULL) */
116534 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
116621 SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
116622 const char *z;
116633 z = (char*)sqlite3_value_text(db->pErr);
116718 SQLITE_API const char *sqlite3_errstr(int rc){
116728 const char *zName,
116925 const char *zDefaultVfs, /* VFS to use if no "vfs=xxx" query option */
116926 const char *zUri, /* Nul-terminated URI to parse */
116929 char **pzFile, /* OUT: Filename component of URI */
116930 char **pzErrMsg /* OUT: Error message (if rc!=SQLITE_OK) */
116934 const char *zVfs = zDefaultVfs;
116935 char *zFile;
116936 char c;
116944 char *zOpt;
117038 char *zVal = &zOpt[nOpt+1];
117045 const char *z;
117048 char *zModeType = 0;
117084 const char *z = aMode[i].z;
117139 const char *zFilename, /* Database filename UTF-8 encoded */
117142 const char *zVfs /* Name of the VFS to use */
117147 char *zOpen = 0; /* Filename argument to pass to BtreeOpen() */
117148 char *zErrMsg = 0; /* Error message from sqlite3ParseUri() */
117406 const char *zFilename,
117413 const char *filename, /* Database filename (UTF-8) */
117416 const char *zVfs /* Name of VFS module to use */
117429 char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
117464 const char *zName,
117483 const char *zName,
117510 char *zName8;
117531 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
117635 const char *zDbName, /* Database name or NULL */
117636 const char *zTableName, /* Table name */
117637 const char *zColumnName, /* Column name */
117638 char const **pzDataType, /* OUTPUT: Declared data type */
117639 char const **pzCollSeq, /* OUTPUT: Collation sequence name */
117645 char *zErrMsg = 0;
117650 char const *zDataType = 0;
117651 char const *zCollSeq = 0;
117770 SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
117972 /* sqlite3_test_control(SQLITE_TESTCTRL_ISKEYWORD, const char *zWord)
117982 const char *zWord = va_arg(ap, const char*);
118018 ** sqlite3_stmt*,const char**);
118026 const char **pzRet = va_arg(ap, const char**);
118049 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
118064 SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
118065 const char *z = sqlite3_uri_parameter(zFilename, zParam);
118074 const char *zFilename, /* Filename as passed to xOpen */
118075 const char *zParam, /* URI parameter sought */
118078 const char *z = sqlite3_uri_parameter(zFilename, zParam);
118089 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){
118105 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
118114 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
118578 ** char pTerm[nTerm]; (content of first term)
118580 ** char pDoclist[nDoclist]; (content of doclist)
118585 ** char pTermSuffix[nSuffix];(unshared suffix of next term)
118587 ** char pDoclist[nDoclist]; (content of doclist)
118626 ** char pTerm[nTerm]; (content of first term)
118631 ** char pTermSuffix[nSuffix]; (unshared suffix of next term)
118860 const char *const*argv, /* Tokenizer argument strings */
118877 const char *pInput, int nBytes, /* Input buffer */
118913 const char **ppToken, int *pnBytes, /* OUT: Normalized text for token */
118981 char keyClass; /* HASH_INT, _POINTER, _STRING, _BINARY */
118982 char copyKey; /* True if copy of key made on insert */
119022 SQLITE_PRIVATE void sqlite3Fts3HashInit(Fts3Hash *pNew, char keyClass, char copyKey);
119156 typedef unsigned char u8; /* 1-byte (or larger) unsigned integer */
119216 const char *zDb; /* logical database name */
119217 const char *zName; /* virtual table name */
119219 char **azColumn; /* column names. malloced */
119221 char *zContentTbl; /* content=xxx option, or NULL */
119222 char *zLanguageid; /* languageid=xxx option, or NULL */
119231 char *zReadExprlist;
119232 char *zWriteExprlist;
119241 char *zSegmentsTbl; /* Name of %_segments table */
119298 char *pNextId; /* Pointer into the body of aDoclist */
119299 char *aDoclist; /* List of docids for full-text queries */
119309 char *zMatchinfo; /* Matchinfo specification */
119337 char *aAll; /* Array containing doclist (or NULL) */
119339 char *pNextDocid; /* Pointer to next docid */
119343 char *pList; /* Pointer to position list following iDocid */
119354 char *z; /* Text of the token */
119442 sqlite3_int64, sqlite3_int64, const char *, int, Fts3SegReader**);
119444 Fts3Table*,int,const char*,int,int,Fts3SegReader**);
119448 SQLITE_PRIVATE int sqlite3Fts3ReadBlock(Fts3Table*, sqlite3_int64, char **, int*, int*);
119458 SQLITE_PRIVATE int sqlite3Fts3DeferredTokenList(Fts3DeferredToken *, char **, int *);
119479 int, int, int, const char *, int, int, int, Fts3MultiSegReader *);
119491 const char *zTerm;
119503 char *aBuffer; /* Buffer to merge doclists in */
119514 char *zTerm; /* Pointer to term buffer */
119516 char *aDoclist; /* Pointer to doclist buffer */
119523 SQLITE_PRIVATE int sqlite3Fts3PutVarint(char *, sqlite3_int64);
119524 SQLITE_PRIVATE int sqlite3Fts3GetVarint(const char *, sqlite_int64 *);
119525 SQLITE_PRIVATE int sqlite3Fts3GetVarint32(const char *, int *);
119527 SQLITE_PRIVATE void sqlite3Fts3Dequote(char *);
119528 SQLITE_PRIVATE void sqlite3Fts3DoclistPrev(int,char*,int,char**,sqlite3_int64*,int*,u8*);
119530 SQLITE_PRIVATE int sqlite3Fts3FirstFilter(sqlite3_int64, char *, int, char *);
119534 SQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *, int *);
119535 SQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, Fts3Hash *, const char *);
119536 SQLITE_PRIVATE int sqlite3Fts3InitTokenizer(Fts3Hash *pHash, const char *,
119537 sqlite3_tokenizer **, char **
119539 SQLITE_PRIVATE int sqlite3Fts3IsIdChar(char);
119543 SQLITE_PRIVATE void sqlite3Fts3Snippet(sqlite3_context *, Fts3Cursor *, const char *,
119544 const char *, const char *, int, int
119546 SQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *, Fts3Cursor *, const char *);
119550 char **, int, int, int, const char *, int, Fts3Expr **, char **
119558 SQLITE_PRIVATE int sqlite3Fts3OpenTokenizer(sqlite3_tokenizer *, int, const char *, int,
119568 Fts3Table*, Fts3MultiSegReader*, int, const char*, int);
119570 Fts3Table *, Fts3MultiSegReader *, sqlite3_int64 *, char **, int *);
119571 SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(Fts3Cursor *, Fts3Expr *, int iCol, char **);
119610 Fts3Cursor *, const char *, int, int, Fts3MultiSegReader **);
119617 SQLITE_PRIVATE int sqlite3Fts3PutVarint(char *p, sqlite_int64 v){
119618 unsigned char *q = (unsigned char *) p;
119621 *q++ = (unsigned char) ((vu & 0x7f) | 0x80);
119625 assert( q - (unsigned char *)p <= FTS3_VARINT_MAX );
119626 return (int) (q - (unsigned char *)p);
119634 SQLITE_PRIVATE int sqlite3Fts3GetVarint(const char *p, sqlite_int64 *v){
119635 const unsigned char *q = (const unsigned char *) p;
119637 while( (*q&0x80)==0x80 && q-(unsigned char *)p<FTS3_VARINT_MAX ){
119643 return (int) (q - (unsigned char *)p);
119650 SQLITE_PRIVATE int sqlite3Fts3GetVarint32(const char *p, int *pi){
119683 SQLITE_PRIVATE void sqlite3Fts3Dequote(char *z){
119684 char quote; /* Quote character (if any ) */
119712 static void fts3GetDeltaVarint(char **pp, sqlite3_int64 *pVal){
119728 char **pp,
119729 char *pStart,
119733 char *p;
119783 const char *zFormat, /* Format string for SQL */
119787 char *zSql;
119806 const char *zDb = p->zDb; /* Name of database (e.g. "main", "temp") */
119839 char *zSql; /* SQL statement passed to declare_vtab() */
119840 char *zCols; /* List of user defined columns */
119841 const char *zLanguageid;
119896 const char *zLanguageid = p->zLanguageid;
119897 char *zContentCols; /* Columns of %_content table */
119902 char *z = p->azColumn[i];
119958 char *zSql; /* SQL text "PRAGMA %Q.page_size" */
119990 const char *z,
119992 char **pzValue
119994 char *zValue;
119995 const char *zCsr = z;
120016 char **pz, /* IN/OUT: Pointer to string buffer */
120017 const char *zFormat, /* Printf format string to append */
120022 char *z;
120027 char *z2 = sqlite3_mprintf("%s%s", *pz, z);
120047 static char *fts3QuoteId(char const *zInput){
120049 char *zRet;
120054 char *z = zRet;
120089 static char *fts3ReadExprList(Fts3Table *p, const char *zFunc, int *pRc){
120090 char *zRet = 0;
120091 char *zFree = 0;
120092 char *zFunction;
120146 static char *fts3WriteExprList(Fts3Table *p, const char *zFunc, int *pRc){
120147 char *zRet = 0;
120148 char *zFree = 0;
120149 char *zFunction;
120181 static int fts3GobbleInt(const char **pp, int *pnOut){
120182 const char *p; /* Iterator pointer */
120212 const char *zParam, /* ABC in prefix=ABC parameter to parse */
120220 const char *p;
120236 const char *p = zParam;
120276 const char *zDb, /* Name of db (i.e. "main", "temp" etc.) */
120277 const char *zTbl, /* Name of content table */
120278 const char ***pazCol, /* OUT: Malloc'd array of column names */
120283 char *zSql; /* "SELECT *" statement on zTbl */
120295 const char **azCol; /* Output array */
120305 const char *zCol = sqlite3_column_name(pStmt, i);
120310 azCol = (const char **)sqlite3_malloc(sizeof(char *) * nCol + nStr);
120314 char *p = (char *)&azCol[nCol];
120316 const char *zCol = sqlite3_column_name(pStmt, i);
120350 const char * const *argv, /* xCreate/xConnect argument array */
120352 char **pzErr /* Write any error message here */
120362 char *zCsr; /* Space for holding column names */
120366 const char **aCol; /* Array of column names */
120375 char *zPrefix = 0; /* Prefix parameter value (or NULL) */
120376 char *zCompress = 0; /* compress=? parameter (or NULL) */
120377 char *zUncompress = 0; /* uncompress=? parameter (or NULL) */
120378 char *zContent = 0; /* content=? parameter (or NULL) */
120379 char *zLanguageid = 0; /* languageid=? parameter (or NULL) */
120389 aCol = (const char **)sqlite3_malloc(sizeof(const char *) * (argc-2) );
120391 memset((void *)aCol, 0, sizeof(const char *) * (argc-2));
120405 char const *z = argv[i];
120407 char *zVal;
120421 const char *zOpt;
120565 nCol * sizeof(char *) + /* azColumn */
120579 p->azColumn = (char **)&p[1];
120602 zCsr = (char *)&p->aIndex[nIndex];
120612 char *z;
120614 z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);
120620 assert( zCsr <= &((char *)p)[nByte] );
120624 char const *zMiss = (zCompress==0 ? "compress" : "uncompress");
120686 const char * const *argv, /* xCreate/xConnect argument array */
120688 char **pzErr /* OUT: sqlite3_malloc'd error message */
120696 const char * const *argv, /* xCreate/xConnect argument array */
120698 char **pzErr /* OUT: sqlite3_malloc'd error message */
120841 char *zSql;
120902 const char *zTerm, /* Term to select leaves for */
120904 const char *zNode, /* Buffer containing segment interior node */
120910 const char *zCsr = zNode; /* Cursor to iterate through node */
120911 const char *zEnd = &zCsr[nNode];/* End of interior node buffer */
120912 char *zBuffer = 0; /* Buffer to load terms into */
120955 char *zNew;
120957 zNew = (char *)sqlite3_realloc(zBuffer, nAlloc);
121024 const char *zTerm, /* Term to select leaves for */
121026 const char *zNode, /* Buffer containing segment interior node */
121041 char *zBlob = 0; /* Blob read from %_segments table */
121071 char **pp, /* IN/OUT: Output pointer */
121094 static void fts3PoslistCopy(char **pp, char **ppPoslist){
121095 char *pEnd = *ppPoslist;
121096 char c = 0;
121116 char *p = *pp;
121141 static void fts3ColumnlistCopy(char **pp, char **ppPoslist){
121142 char *pEnd = *ppPoslist;
121143 char c = 0;
121154 char *p = *pp;
121187 char **pp, /* IN/OUT: Pointer into position-list buffer */
121207 static int fts3PutColNumber(char **pp, int iCol){
121210 char *p = *pp; /* Output pointer */
121226 char **pp, /* Output buffer */
121227 char **pp1, /* Left input list */
121228 char **pp2 /* Right input list */
121230 char *p = *pp;
121231 char *p1 = *pp1;
121232 char *p2 = *pp2;
121316 char **pp, /* IN/OUT: Preallocated output buffer */
121320 char **pp1, /* IN/OUT: Left input list */
121321 char **pp2 /* IN/OUT: Right input list */
121323 char *p = *pp;
121324 char *p1 = *pp1;
121325 char *p2 = *pp2;
121344 char *pSave = p;
121440 char **pp, /* Output buffer */
121441 char *aTmp, /* Temporary buffer space */
121444 char **pp1, /* IN/OUT: Left input list */
121445 char **pp2 /* IN/OUT: Right input list */
121447 char *p1 = *pp1;
121448 char *p2 = *pp2;
121450 char *pTmp1 = aTmp;
121451 char *pTmp2;
121452 char *aTmp2;
121480 char *aaOutput[16]; /* Malloc'd output buffers */
121498 char **pp, /* IN/OUT: Point to read varint from */
121499 char *pEnd, /* End of buffer */
121532 char **pp, /* IN/OUT: Output pointer */
121579 char *a1, int n1, /* First doclist */
121580 char *a2, int n2, /* Second doclist */
121581 char **paOut, int *pnOut /* OUT: Malloc'd doclist */
121586 char *pEnd1 = &a1[n1];
121587 char *pEnd2 = &a2[n2];
121588 char *p1 = a1;
121589 char *p2 = a2;
121590 char *p;
121591 char *aOut;
121672 char *aLeft, int nLeft, /* Left doclist */
121673 char *aRight, int *pnRight /* IN/OUT: Right/output doclist */
121678 char *pEnd1 = &aLeft[nLeft];
121679 char *pEnd2 = &aRight[*pnRight];
121680 char *p1 = aLeft;
121681 char *p2 = aRight;
121682 char *p;
121684 char *aOut = aRight;
121695 char *pSave = p;
121729 char *pList, /* Position list (no 0x00 term) */
121731 char *pOut /* Write output here */
121735 char *p = pList;
121736 char *pEnd = &pList[nList];
121780 char *aOut = 0;
121795 char *aNew;
121836 char *aDoclist, /* Pointer to doclist */
121850 char *aMerge = aDoclist;
121861 char *aNew;
121921 const char *zTerm, /* Term to query for */
121958 char const *zRoot = sqlite3_column_blob(pStmt, 4);
121995 const char *zTerm, /* Term to query for */
122025 const char *zTerm, /* Term to scan doclist of */
122049 const char *zTerm, /* Term to query for */
122118 char **ppOut /* OUT: Malloced result buffer */
122170 static int fts3DoclistCountDocids(char *aList, int nList){
122173 char *aEnd = &aList[nList]; /* Pointer to one byte after EOF */
122174 char *p = aList; /* Cursor */
122233 const char *idxStr, /* Unused */
122238 char *zSql; /* SQL statement used to access %_content */
122265 const char *zQuery = (const char *)sqlite3_value_text(apVal[0]);
122505 static void fts3ReversePoslist(char *pStart, char **ppPoslist){
122506 char *p = &(*ppPoslist)[-2];
122507 char c = 0;
122530 const char *zFunc, /* Function name */
122538 char *zErr = sqlite3_mprintf("illegal first argument to %s", zFunc);
122557 const char *zStart = "<b>";
122558 const char *zEnd = "</b>";
122559 const char *zEllipsis = "<b>...</b>";
122578 case 4: zEllipsis = (const char*)sqlite3_value_text(apVal[3]);
122579 case 3: zEnd = (const char*)sqlite3_value_text(apVal[2]);
122580 case 2: zStart = (const char*)sqlite3_value_text(apVal[1]);
122660 const char *zArg = 0;
122662 zArg = (const char *)sqlite3_value_text(apVal[1]);
122675 const char *zName, /* Name of SQL function */
122680 const char *zName;
122710 const char *zName /* New name of table */
123018 char *pList, /* Pointer to doclist */
123039 char *pLeft;
123040 char *pRight;
123088 char *pThis = 0;
123112 char *aPoslist = 0; /* Position list for deferred tokens */
123123 char *pList;
123139 char *aOut = pList;
123140 char *p1 = aPoslist;
123141 char *p2 = aOut;
123168 char *p1;
123169 char *p2;
123170 char *aOut;
123182 aOut = (char *)sqlite3_malloc(nPoslist+8);
123256 char *aDoclist, /* Pointer to entire doclist */
123258 char **ppIter, /* IN/OUT: Iterator pointer */
123263 char *p = *ppIter;
123272 char *pNext = 0;
123273 char *pDocid = aDoclist;
123274 char *pEnd = &aDoclist[nDoclist];
123299 char *pSave = p;
123312 char *aDoclist, /* Pointer to entire doclist */
123314 char **ppIter, /* IN/OUT: Iterator pointer */
123318 char *p = *ppIter;
123375 char *pIter; /* Used to iterate through aAll */
123376 char *pEnd = &pDL->aAll[pDL->nAll]; /* 1 byte past end of aAll */
123555 const char *pEnd;
123556 const char *a;
123696 char *pList = 0;
123810 char *aTmp, /* Temporary space to use */
123811 char **paPoslist, /* IN/OUT: Position list */
123818 char *p2;
123819 char *pOut;
124037 char *aTmp; /* Temp space for PoslistNearMerge() */
124052 char *aPoslist = p->pPhrase->doclist.pList;
124308 char *p = pPhrase->doclist.pList;
124510 char **ppOut /* OUT: Pointer to position list */
124514 char *pIter;
124640 char **pzErrMsg,
124682 char *zStop;
124709 const char * const *argv, /* xCreate/xConnect argument array */
124711 char **pzErr /* OUT: sqlite3_malloc'd error message */
124713 char const *zDb; /* Name of database (e.g. "main") */
124714 char const *zFts3; /* Name of fts3 table */
124754 p->pFts3Tab->zDb = (char *)&p->pFts3Tab[1];
124759 memcpy((char *)p->pFts3Tab->zDb, zDb, nDb);
124760 memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
124761 sqlite3Fts3Dequote((char *)p->pFts3Tab->zName);
124917 char *aDoclist = pCsr->csr.aDoclist;
124998 const char *idxStr, /* Unused */
125028 const unsigned char *zStr = sqlite3_value_text(apVal[0]);
125235 const char **azCol; /* Array of column names for fts3 table */
125249 ** an integer that falls outside of the range of the unsigned char type
125251 ** is defined to accept an argument of type char, and always returns 0 for
125252 ** any values that fall outside of the range of the unsigned char type (i.e.
125255 static int fts3isspace(char c){
125273 const char *z,
125313 const char *z, int n, /* Input string */
125326 const char *zToken;
125342 pRet->pPhrase->aToken[0].z = (char *)&pRet->pPhrase[1];
125403 const char *zInput, int nInput, /* Input string */
125411 char *zTemp = 0;
125441 const char *zByte;
125473 char *zBuf = 0;
125477 memset(p, 0, (char *)&(((Fts3Phrase *)&p[1])->aToken[0])-(char *)p);
125483 zBuf = (char *)&p->pPhrase->aToken[nToken];
125515 static int fts3ExprParse(ParseContext *, const char *, int, Fts3Expr **, int *);
125527 const char *z, int n, /* Input string */
125532 char *z; /* Keyword text */
125533 unsigned char n; /* Length of the keyword */
125534 unsigned char parenOnly; /* Only valid in paren mode */
125535 unsigned char eType; /* Keyword code */
125548 const char *zInput = z;
125575 char cNext;
125663 const char *zStr = pParse->azCol[ii];
125751 const char *z, int n, /* Text of MATCH query */
125759 const char *zIn = z;
126071 char **azCol, /* Array of column names for fts3 table */
126075 const char *z, int n, /* Text of MATCH query */
126085 sParse.azCol = (const char **)azCol;
126134 char **azCol, /* Array of column names for fts3 table */
126138 const char *z, int n, /* Text of MATCH query */
126140 char **pzErr /* OUT: Error message (sqlite3_malloc) */
126224 const char *zName,
126229 const char zSql[] = "SELECT fts3_tokenizer(?)";
126257 static char *exprToString(Fts3Expr *pExpr, char *zBuf){
126322 char **azCol = 0;
126323 const char *zExpr;
126328 char *zBuf = 0;
126339 (const char *)sqlite3_value_text(argv[0]), &pModule);
126356 zExpr = (const char *)sqlite3_value_text(argv[1]);
126359 azCol = (char **)sqlite3_malloc(nCol*sizeof(char *));
126365 azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
126369 char *zDummy = 0;
126477 SQLITE_PRIVATE void sqlite3Fts3HashInit(Fts3Hash *pNew, char keyClass, char copyKey){
126516 const char *z = (const char *)pKey;
126527 return strncmp((const char*)pKey1,(const char*)pKey2,n1);
126535 const char *z = (const char *)pKey;
126849 const char *zInput; /* input we are tokenizing */
126853 char *zToken; /* storage for current token */
126862 int argc, const char * const *argv,
126893 const char *zInput, int nInput, /* String to be tokenized */
126933 static const char cType[] = {
126951 static int isVowel(const char*);
126952 static int isConsonant(const char *z){
126954 char x = *z;
126961 static int isVowel(const char *z){
126963 char x = *z;
126990 static int m_gt_0(const char *z){
127000 static int m_eq_1(const char *z){
127014 static int m_gt_1(const char *z){
127028 static int hasVowel(const char *z){
127039 static int doubleConsonant(const char *z){
127051 static int star_oh(const char *z){
127072 char **pz, /* The word being stemmed (Reversed) */
127073 const char *zFrom, /* If the ending matches this... (Reversed) */
127074 const char *zTo, /* ... change the ending to this (not reversed) */
127075 int (*xCond)(const char*) /* Condition that must be true */
127077 char *z = *pz;
127096 static void copy_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
127100 char c = zIn[i];
127143 static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
127145 char zReverse[28];
127146 char *z, *z2;
127154 char c = zIn[i];
127366 static const char porterIdChar[] = {
127382 const char **pzToken, /* OUT: *pzToken is the token text */
127389 const char *z = c->zInput;
127408 char *pNew;
127509 const unsigned char *zName;
127535 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
127545 SQLITE_PRIVATE int sqlite3Fts3IsIdChar(char c){
127546 static const char isFtsIdChar[] = {
127559 SQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *zStr, int *pn){
127560 const char *z1;
127561 const char *z2 = 0;
127566 char c = *z1;
127598 const char *zArg, /* Tokenizer name */
127600 char **pzErr /* OUT: Set to malloced error message */
127603 char *z = (char *)zArg;
127605 char *zCopy;
127606 char *zEnd; /* Pointer to nul-term of zCopy */
127613 z = (char *)sqlite3Fts3NextToken(zCopy, &n);
127622 char const **aArg = 0;
127625 while( z<zEnd && (NULL!=(z = (char *)sqlite3Fts3NextToken(z, &n))) ){
127626 int nNew = sizeof(char *)*(iArg+1);
127627 char const **aNew = (const char **)sqlite3_realloc((void *)aArg, nNew);
127694 const char *zErr = 0;
127696 const char *zName;
127698 const char *zInput;
127701 const char *azArg[64];
127703 const char *zToken;
127718 zName = (const char *)sqlite3_value_text(argv[0]);
127720 zInput = (const char *)sqlite3_value_text(argv[argc-1]);
127726 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
127736 azArg[i-1] = (const char *)sqlite3_value_text(argv[i]);
127778 char *zName,
127783 const char zSql[] = "SELECT fts3_tokenizer(?, ?)";
127800 char *zName,
127805 const char zSql[] = "SELECT fts3_tokenizer(?)";
127898 const char *zName
127905 char *zTest = 0;
127906 char *zTest2 = 0;
127976 char delim[128]; /* flag ASCII delimiters */
127981 const char *pInput; /* input we are tokenizing */
127985 char *pToken; /* storage for current token */
127990 static int simpleDelim(simple_tokenizer *t, unsigned char c){
128001 int argc, const char * const *argv,
128018 unsigned char ch = argv[1][i];
128054 const char *pInput, int nBytes, /* String to be tokenized */
128098 const char **ppToken, /* OUT: *ppToken is the token text */
128106 unsigned char *p = (unsigned char *)c->pInput;
128125 char *pNew;
128135 unsigned char ch = p[iStartOffset+i];
128136 c->pToken[i] = (char)((ch>='A' && ch<='Z') ? ch-'A'+'a' : ch);
128239 char *zInput; /* Input string */
128242 const char *zToken; /* Current 'token' value */
128254 const char *zName,
128256 char **pzErr
128285 const char * const *argv, /* Input array */
128286 char ***pazDequote /* Output array */
128294 char **azDequote;
128300 *pazDequote = azDequote = sqlite3_malloc(sizeof(char *)*argc + nByte);
128304 char *pSpace = (char *)&azDequote[argc];
128337 const char * const *argv, /* xCreate/xConnect argument array */
128339 char **pzErr /* OUT: sqlite3_malloc'd error message */
128345 char **azDequote = 0;
128355 const char *zModule;
128366 const char * const *azArg = (const char * const *)&azDequote[1];
128510 const char *idxStr, /* Unused */
128522 const char *zByte = (const char *)sqlite3_value_text(apVal[0]);
128733 char *aData;
128778 char *aNode; /* Pointer to node data (or NULL) */
128791 char *zTerm; /* Pointer to current term */
128793 char *aDoclist; /* Pointer to doclist of current entry */
128799 char *pOffsetList;
128820 char *zTerm; /* Pointer to previous term buffer */
128823 char *zMalloc; /* Malloc'd space (possibly) used for zTerm */
128826 char *aData; /* Pointer to block from malloc() */
128852 char *zTerm; /* Pointer to previous term buffer */
128855 char *zMalloc; /* Malloc'd space (possibly) used for zTerm */
128857 char *aData; /* Node data */
128919 const char *azSql[] = {
129013 char *zSql;
129274 p->aData = (char *)&p[1];
129286 p->aData = (char *)&p[1];
129372 const char *zToken,
129408 const char *zText, /* Text of document to be inserted */
129418 char const *zToken;
129425 const char**,int*,int*,int*,int*);
129541 const char *zText = (const char *)sqlite3_value_text(apVal[i]);
129693 const char *zText = (const char *)sqlite3_column_text(pSelect, i);
129806 char **paBlob, /* OUT: Blob data in malloc'd buffer */
129831 char *aByte = sqlite3_malloc(nByte + FTS3_NODE_PADDING);
129886 static int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){
129922 char *pNext; /* Cursor variable */
129940 pReader->zTerm = (char *)fts3HashKey(pElem);
129989 char *zNew = sqlite3_realloc(pReader->zTerm, nNew);
130058 char **ppOffsetList, /* OUT: Pointer to current position-list */
130062 char *p = pReader->pOffsetList;
130063 char c = 0;
130086 char *pEnd = &pReader->aDoclist[pReader->nDoclist];
130202 const char *zRoot, /* Buffer containing root node */
130227 pReader->aNode = (char *)&pReader[1];
130245 char *z1 = fts3HashKey(*(Fts3HashElem **)lhs);
130246 char *z2 = fts3HashKey(*(Fts3HashElem **)rhs);
130280 const char *zTerm, /* Term to search for */
130297 char *zKey = (char *)fts3HashKey(pE);
130441 const char *zTerm, /* Term to compare to */
130500 char *z, /* Pointer to buffer containing block data */
130545 char *zRoot, /* Blob value for "root" field */
130572 const char *zPrev, /* Buffer containing previous term */
130574 const char *zNext, /* Buffer containing next term */
130591 const char *zTerm, /* Pointer to buffer containing term */
130621 assert( pTree->aData==(char *)&pTree[1] );
130622 pTree->aData = (char *)sqlite3_malloc(nReq);
130640 char *zNew = sqlite3_realloc(pTree->zMalloc, nTerm*2);
130651 pTree->zTerm = (char *)zTerm;
130672 pNew->aData = (char *)&pNew[1];
130706 pTree->aData[nStart] = (char)iHeight;
130731 char **paRoot, /* OUT: Data for root node */
130774 if( p->aData!=(char *)&p[1] ){
130797 const char *zTerm, /* Pointer to buffer containing term */
130799 const char *aDoclist, /* Pointer to buffer containing doclist */
130819 pWriter->aData = (char *)sqlite3_malloc(p->nNodeSize);
130885 char *aNew = sqlite3_realloc(pWriter->aData, nReq);
130908 char *zNew = sqlite3_realloc(pWriter->zMalloc, nTerm*2);
130919 pWriter->zTerm = (char *)zTerm;
130942 char *zRoot = NULL; /* Pointer to buffer containing root node */
131139 char **ppList, /* IN/OUT: Pointer to position list */
131142 char *pList = *ppList;
131144 char *pEnd = &pList[nList];
131146 char *p = pList;
131150 char c = 0;
131183 char *pList,
131187 char *pNew;
131189 pNew = (char *)sqlite3_realloc(pMsr->aBuffer, pMsr->nBuffer);
131202 char **paPoslist, /* OUT: Pointer to position list */
131225 char *pList;
131269 const char *zTerm, /* Term searched for (or NULL) */
131311 const char *zTerm, /* Term to iterate through a doclist for */
131483 char *pList;
131516 char *aNew;
131526 char *a = &pCsr->aBuffer[nDoclist];
131706 char *zBuf, /* Write the BLOB here */
131722 const char *zBuf, /* The BLOB containing the varints */
131745 char *pBlob; /* The BLOB encoding of the document size */
131791 char *pBlob; /* Storage for BLOB written into %_stat */
131806 pBlob = (char*)&a[nStat];
131911 char *zSql = sqlite3_mprintf("SELECT %s" , p->zReadExprlist);
131937 const char *z = (const char *) sqlite3_column_text(pStmt, iCol+1);
132033 char *a; /* Pointer to allocation */
132071 const char *aNode;
132078 const char *aDoclist; /* Pointer to doclist */
132094 char *a = (char *)sqlite3_realloc(pBlob->a, nAlloc);
132163 static int nodeReaderInit(NodeReader *p, const char *aNode, int nNode){
132192 const char *zTerm, /* Term to write to internal node */
132225 pBlk->a[0] = (char)iLayer;
132250 pNode->block.a[0] = (char)iLayer;
132293 const char *zTerm, /* New term to write */
132295 const char *aDoclist, /* Doclist (or NULL) to write */
132345 const char *zTerm = pCsr->zTerm;
132347 const char *aDoclist = pCsr->aDoclist;
132515 const char *zLhs, int nLhs, /* LHS of comparison */
132516 const char *zRhs, int nRhs /* RHS of comparison */
132575 const char *zKey, /* First key to write */
132587 const char *aRoot = 0; /* Pointer to %_segdir.root buffer */
132610 char *aLeaf = 0;
132666 char *aBlock = 0;
132890 pNode->a[0] = (char)iHeight;
132909 const char *aNode, /* Current node image */
132912 const char *zTerm, /* Omit all terms smaller than this */
132967 const char *zTerm, /* Remove terms smaller than this */
132984 const char *aRoot = sqlite3_column_blob(pFetch, 4);
132994 char *aBlock = 0;
133081 const char *zTerm = pSeg->zTerm;
133132 const char *aHint = sqlite3_column_blob(pSelect, 0);
133292 const char *zKey = pCsr->zTerm;
133340 static int fts3Getint(const char **pz){
133341 const char *z = *pz;
133359 const char *zParam /* Nul-terminated string containing "A,B" */
133364 const char *z = zParam;
133402 const char *zParam /* Nul-terminated string containing boolean */
133426 const char *zTerm, /* Pointer to buffer containing term */
133482 char *pCsr = csr.aDoclist;
133483 char *pEnd = &pCsr[csr.nDoclist];
133556 char *zSql;
133572 const char *zText = (const char *)sqlite3_column_text(pStmt, iCol+1);
133578 char const *zToken; /* Buffer containing token */
133661 const char *zVal = (const char *)sqlite3_value_text(pVal);
133742 const char *zText = (const char *)sqlite3_column_text(pCsr->pStmt, i+1);
133747 char const *zToken; /* Buffer containing token */
133780 char **ppData,
133783 char *pRet;
133794 pRet = (char *)sqlite3_malloc(p->pList->nData);
134110 char *pList; /* Pointer to start of phrase position list */
134112 char *pHead; /* Position list data following iHead */
134114 char *pTail; /* Position list data following iTail */
134146 char *z; /* Pointer to buffer containing string */
134172 static void fts3GetDeltaPosition(char **pp, int *piPos){
134281 static void fts3SnippetAdvance(char **ppIter, int *piIter, int iNext){
134282 char *pIter = *ppIter;
134366 char *pCsr = pPhrase->pTail;
134405 char *pCsr;
134530 const char *zAppend, /* Pointer to data to append to buffer */
134543 char *zNew = sqlite3_realloc(pStr->z, nAlloc);
134583 const char *zDoc, /* Document text to extract snippet from */
134622 const char *ZDUMMY; int DUMMY1 = 0, DUMMY2 = 0, DUMMY3 = 0;
134649 const char *zOpen, /* String inserted before highlighted term */
134650 const char *zClose, /* String inserted after highlighted term */
134651 const char *zEllipsis, /* String inserted between snippets */
134656 const char *zDoc; /* Document text to extract snippet from */
134667 zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol);
134684 const char *ZDUMMY; /* Dummy argument used with tokenizer */
134767 static int fts3ColumnlistCount(char **ppCollist){
134768 char *pEnd = *ppCollist;
134769 char c = 0;
134836 char *pCsr;
134850 char cArg,
134851 char **pzErr
134867 static int fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
134896 const char **paLen
134899 const char *a;
134928 char *pRead; /* Cursor used to iterate through aDoclist */
134954 char *pRead = pIter->pRead;
135069 const char *zArg /* Matchinfo format string */
135098 const char *a; /* Aggregate column length array */
135119 const char *a = sqlite3_column_blob(pSelectDocsize, 0);
135170 const char *zArg /* Second argument to matchinfo() function */
135215 pCsr->zMatchinfo = (char *)&pCsr->aMatchinfo[nMatchinfo];
135239 const char *zStart, /* Snippet start text - "<b>" */
135240 const char *zEnd, /* Snippet end text - "</b>" */
135241 const char *zEllipsis, /* Snippet ellipsis text - "<b>...</b>" */
135339 char *pList; /* Position-list */
135359 char *pList; /* Pointer to position list for phrase */
135422 const char *ZDUMMY; /* Dummy argument used with xNext() */
135427 const char *zDoc;
135444 zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol+1);
135488 char aBuffer[64];
135525 const char *zArg /* Second arg to matchinfo() function */
135530 const char *zFormat;
135534 char *zErr = 0;
135599 static const unsigned char sqlite3Utf8Trans1[] = {
135656 const unsigned char *aInput; /* Input text being tokenized */
135660 char *zToken; /* storage for current token */
135698 const char *zIn, /* Array of characters to make exceptions */
135701 const unsigned char *z = (const unsigned char *)zIn;
135702 const unsigned char *zTerm = &z[nIn];
135726 z = (const unsigned char *)zIn;
135784 const char * const *azArg, /* Tokenizer creation arguments */
135797 const char *z = azArg[i];
135834 const char *aInput, /* Input string */
135846 pCsr->aInput = (const unsigned char *)aInput;
135877 const char **paToken, /* OUT: Token text */
135886 char *zOut;
135887 const unsigned char *z = &pCsr->aInput[pCsr->iOff];
135888 const unsigned char *zStart = z;
135889 const unsigned char *zEnd;
135890 const unsigned char *zTerm = &pCsr->aInput[pCsr->nInput];
135908 char *zNew = sqlite3_realloc(pCsr->zToken, pCsr->nAlloc+64);
136139 char aChar[] = {
136212 unsigned char flags;
136213 unsigned char nRange;
136287 assert( sizeof(unsigned short)==2 && sizeof(unsigned char)==1 );
136439 typedef unsigned char u8;
136477 char *zDb; /* Name of database containing r-tree table */
136478 char *zName; /* Name of r-tree table */
137053 sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int
137062 int argc, const char *const*argv,
137064 char **pzErr
137075 int argc, const char *const*argv,
137077 char **pzErr
137123 char *zCreate = sqlite3_mprintf(
137583 int idxNum, const char *idxStr,
137712 char zIdxStr[RTREE_MAX_DIMENSIONS*8+1];
139223 static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
139226 char *zSql = sqlite3_mprintf(
139270 const char *zDb,
139271 const char *zPrefix,
139277 static const char *azSql[N_STATEMENT] = {
139299 char *zCreate = sqlite3_mprintf(
139327 char *zSql = sqlite3_mprintf(azSql[i], zDb, zPrefix);
139346 static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
139380 char **pzErr /* OUT: Error message, if any */
139383 char *zSql;
139423 int argc, const char *const*argv, /* Parameters to CREATE TABLE statement */
139425 char **pzErr, /* OUT: Error message, if any */
139434 const char *aErrMsg[] = {
139459 pRtree->zDb = (char *)&pRtree[1];
139478 char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]);
139479 char *zTmp;
139526 char *zText = 0;
139539 char zCell[512];
139559 char *zTextNew = sqlite3_mprintf("%s {%s}", zText, zCell);
139660 const char *zGeom,
139682 char **pzErrMsg,
139855 const unsigned char *zA = sqlite3_value_text(argv[0]);
139856 const unsigned char *zB = sqlite3_value_text(argv[1]);
139873 const unsigned char *zE = sqlite3_value_text(argv[2]);
139898 const char *zName, /* Name of ICU function that failed */
139901 char zBuf[128];
140025 const char *zLocale = 0;
140029 zLocale = (const char *)sqlite3_value_text(apArg[1]);
140110 const char *zLocale; /* Locale identifier - (eg. "jp_JP") */
140111 const char *zName; /* SQL Collation sequence name (eg. "japanese") */
140116 zLocale = (const char *)sqlite3_value_text(apArg[0]);
140117 zName = (const char *)sqlite3_value_text(apArg[1]);
140144 const char *zName; /* Function name */
140184 char **pzErrMsg,
140225 char *zLocale;
140237 char *zBuffer;
140247 const char * const *argv, /* Tokenizer creation arguments */
140263 p->zLocale = (char *)&p[1];
140289 const char *zInput, /* Input string */
140372 const char **ppToken, /* OUT: *ppToken is the token text */
140408 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);