Lines Matching refs:zName
1545 ** The zName field holds the name of the VFS module. The name must
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);
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);
3978 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
5022 const char *zName,
5029 const char *zName,
5037 const void *zName,
5759 int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
5891 const char *zName, /* Name of the module */
5897 const char *zName, /* Name of the module */
9918 char *zName; /* Name of this database */
10233 char *zName; /* SQL name of the function. */
10276 ** FUNCTION(zName, nArg, iArg, bNC, xFunc)
10277 ** Used to create a scalar function definition of a function zName
10283 ** AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)
10289 ** LIKEFUNC(zName, nArg, pArg, flags)
10290 ** Used to create a scalar function definition of a function zName
10297 #define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
10299 SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
10300 #define FUNCTION2(zName, nArg, iArg, bNC, xFunc, extraFlags) \
10302 SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
10303 #define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
10305 pArg, 0, xFunc, 0, 0, #zName, 0, 0}
10306 #define LIKEFUNC(zName, nArg, arg, flags) \
10307 {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0}
10308 #define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \
10310 SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
10319 char *zName; /* Savepoint name (nul-terminated) */
10340 const char *zName; /* Name passed to create_module() */
10350 char *zName; /* Name of this column */
10375 char *zName; /* Name of the collating sequence, UTF-8 encoded */
10480 ** Table.zName is the name of the table. The case of the original
10507 char *zName; /* Name of the table or view */
10704 char *zName; /* Name of this index */
10989 ** also be used as the argument to a function, in which case the a.zName
11005 char *zName; /* Token associated with this expression */
11011 u16 iAlias; /* Index into Parse.aAlias[] for zName */
11043 char *zName; /* Name of the identifier */
11044 int idx; /* Index in some Table.aCol[] of a column named zName */
11088 char *zName; /* Name of the table */
11089 char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
11090 Table *pTab; /* An SQL table corresponding to zName */
11581 char *zName; /* The name of the trigger */
12265 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
15407 if( strcmp(zVfs, pVfs->zName)==0 ) break;
20202 sqlite3StrAccumAppend(pAccum, pItem->zName, -1);
23452 const char *zName; /* Name of the system call */
23571 ** system call named zName.
23575 const char *zName, /* Name of system call to override */
23582 if( zName==0 ){
23583 /* If no zName is given, restore all system calls to their default
23593 /* If zName is specified, operate on only the one system call
23597 if( strcmp(zName, aSyscall[i].zName)==0 ){
23612 ** Return the value of a system call. Return NULL if zName is not a
23618 const char *zName
23624 if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
23630 ** Return the name of the first system call after zName. If zName==NULL
23631 ** then return the name of the first system call. Return NULL if zName
23632 ** is the last system call or if zName is not the name of a valid
23635 static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
23639 if( zName ){
23641 if( strcmp(zName, aSyscall[i].zName)==0 ) break;
23645 if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
26858 *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
28254 if( strcmp(pVfs->zName,"unix-excl")==0 ){
28675 const char *zName = zPath;
28691 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
28692 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
28693 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
28694 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
28707 pUnused = findReusableFd(zName, flags);
28721 assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 );
28723 }else if( !zName ){
28724 /* If zName is NULL, the upper layer is requesting a temp file. */
28730 zName = zTmpname;
28734 assert( zName[strlen(zName)+1]==0 );
28751 rc = findCreateFileMode(zName, flags, &openMode, &uid, &gid);
28757 fd = robust_open(zName, openFlags, openMode);
28758 OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags));
28766 fd = robust_open(zName, openFlags, openMode);
28769 rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
28793 zPath = zName;
28795 osUnlink(zName);
29543 dummyVfs.zName = "dummy";
30432 VFSNAME, /* zName */ \
31037 const char *zName; /* Name of the system call */
31633 ** system call named zName.
31637 const char *zName, /* Name of system call to override */
31644 if( zName==0 ){
31645 /* If no zName is given, restore all system calls to their default
31655 /* If zName is specified, operate on only the one system call
31659 if( strcmp(zName, aSyscall[i].zName)==0 ){
31674 ** Return the value of a system call. Return NULL if zName is not a
31680 const char *zName
31686 if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
31692 ** Return the name of the first system call after zName. If zName==NULL
31693 ** then return the name of the first system call. Return NULL if zName
31694 ** is the last system call or if zName is not the name of a valid
31697 static const char *winNextSystemCall(sqlite3_vfs *p, const char *zName){
31701 if( zName ){
31703 if( strcmp(zName, aSyscall[i].zName)==0 ) break;
31707 if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
32401 LPWSTR zName;
32406 zName = utf8ToUnicode(zFilename);
32407 if( zName==0 ){
32417 zTok = osCharLowerW(zName);
32423 pFile->hMutex = osCreateMutexW(NULL, FALSE, zName);
32428 sqlite3_free(zName);
32439 osCharUpperW(zName);
32442 zName);
32451 sqlite3_free(zName);
33880 int nName; /* Size of zName in bytes */
34700 const char *zName, /* Name of the file (UTF-8) */
34716 const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
34760 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
34761 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
34762 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
34763 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
34912 return winOpen(pVfs, zName, id,
34935 && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK
34939 OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc)));
34956 if( sqlite3_uri_boolean(zName, "psow", SQLITE_POWERSAFE_OVERWRITE) ){
34960 pFile->zPath = zName;
35580 "win32", /* zName */
46255 static char zName[15];
46256 sqlite3_snprintf(sizeof(zName), zName, "READ-LOCK[%d]",
46258 return zName;
60807 const char *zColl = pColl ? pColl->zName : "nil";
60827 sqlite3_snprintf(nTemp, zTemp, "collseq(%.20s)", pColl->zName);
60832 sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
61640 ** zName must be a pointer to a nul terminated string.
61646 ** to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
61650 int idx, /* Index of column zName applies to */
61652 const char *zName, /* Pointer to buffer containing name */
61653 void (*xDel)(void*) /* Memory management strategy for zName */
61660 assert( !zName || xDel!=SQLITE_DYNAMIC );
61665 rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel);
61666 assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 );
63518 rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
63742 const char *zName = context->pFunc->zName;
63746 "unable to use function %s in the requested context", zName);
64385 SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){
64390 if( zName ){
64393 if( z && strncmp(z,zName,nName)==0 && z[nName]==0 ){
64400 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
64401 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
65590 char *zName; /* Name of savepoint */
68022 char *zName; /* Name of savepoint */
68032 u.as.zName = pOp->p4.z;
68051 u.as.nName = sqlite3Strlen30(u.as.zName);
68067 u.as.pNew->zName = (char *)&u.as.pNew[1];
68068 memcpy(u.as.pNew->zName, u.as.zName, u.as.nName+1);
68092 u.as.pSavepoint && sqlite3StrICmp(u.as.pSavepoint->zName, u.as.zName);
68098 sqlite3SetString(&p->zErrMsg, db, "no such savepoint: %s", u.as.zName);
69480 u.bi.zDb = db->aDb[u.bi.pC->iDb].zName;
69548 const char *zDb = db->aDb[u.bj.pC->iDb].zName;
70302 db->aDb[u.bz.iDb].zName, u.bz.zMaster, pOp->p4.z);
71412 ** in register P1 is passed as the zName argument to the xRename method.
71902 if( sqlite3StrICmp(pTab->aCol[iCol].zName, zColumn)==0 ){
71983 sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
73417 const char *zName, /* Name of the journal file */
73430 return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
73435 p->zJournal = zName;
74035 if( sqlite3StrICmp(pUsing->a[k].zName, zCol)==0 ) return 1;
74132 assert( db->aDb[i].zName );
74133 if( sqlite3StrICmp(db->aDb[i].zName,zDb)==0 ){
74151 assert( pTab!=0 && pTab->zName!=0 );
74171 const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
74181 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
74227 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
74284 char *zAs = pEList->a[j].zName;
74527 auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef->zName, 0);
74531 pDef->zName);
74626 char *zAs = pEList->a[i].zName;
74995 if( pItem->zName ) pParse->zAuthContext = pItem->zName;
76142 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
76175 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
76215 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
76300 ** Set the ExprList.a[].zName element of the most recently added item
76318 assert( pItem->zName==0 );
76319 pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
76320 if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
76376 sqlite3DbFree(db, pItem->zName);
76761 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
76804 VdbeComment((v, "%s", pIdx->zName));
78035 (pExpr->iColumn<0 ? "rowid" : pExpr->pTab->aCol[pExpr->iColumn].zName),
78506 if( pList->a[i].zName ){
78507 sqlite3ExplainPrintf(pOut, " AS %s", pList->a[i].zName);
79701 zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
79727 zWhere = whereOrName(db, zWhere, pTrig->zName);
79742 ** Argument zName is the name of the table in the database schema at
79744 ** pTab->zName if this function is being called to code part of an
79747 static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
79766 sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
79771 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
79774 zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
79789 ** Parameter zName is the name of a table that is about to be altered
79794 ** Or, if zName is not a system table, zero is returned.
79796 static int isSystemTable(Parse *pParse, const char *zName){
79797 if( sqlite3Strlen30(zName)>6 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
79798 sqlite3ErrorMsg(pParse, "table %s may not be altered", zName);
79816 char *zName = 0; /* NULL-terminated version of pName */
79835 zDb = db->aDb[iDb].zName;
79839 zName = sqlite3NameFromToken(db, pName);
79840 if( !zName ) goto exit_rename_table;
79842 /* Check that a table or index named 'zName' does not already exist
79845 if( sqlite3FindTable(db, zName, zDb) || sqlite3FindIndex(db, zName, zDb) ){
79847 "there is already another table or index with this name: %s", zName);
79854 if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
79857 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){ goto
79863 sqlite3ErrorMsg(pParse, "view %s may not be altered", pTab->zName);
79870 if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
79907 sqlite3VdbeAddOp4(v, OP_String8, 0, i, 0, zName, 0);
79913 /* figure out how many UTF-8 characters are in zName */
79914 zTabName = pTab->zName;
79926 "WHERE %s;", zDb, SCHEMA_TABLE(iDb), zTabName, zName, zWhere);
79950 zDb, SCHEMA_TABLE(iDb), zName, zName, zName,
79952 zName,
79954 zName, nTabName, zTabName
79964 zDb, zName, pTab->zName);
79978 "WHERE %s;", zName, zName, zWhere);
79989 reloadTableSchema(pParse, p->pFrom, pFrom->zName);
79996 reloadTableSchema(pParse, pTab, zName);
80000 sqlite3DbFree(db, zName);
80056 zDb = db->aDb[iDb].zName;
80057 zTab = &pNew->zName[16]; /* Skip the "sqlite_altertab_" prefix on the name */
80065 if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
80144 reloadTableSchema(pParse, pTab, pTab->zName);
80190 if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
80213 pNew->zName = sqlite3MPrintf(db, "sqlite_altertab_%s", pTab->zName);
80214 if( !pNew->aCol || !pNew->zName ){
80221 pCol->zName = sqlite3DbStrDup(db, pCol->zName);
80386 const char *zName;
80411 const char *zTab = aTable[i].zName;
80413 if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
80419 "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
80431 "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere
80523 "stat3_init", /* zName */
80616 "stat3_push", /* zName */
80658 "stat3_get", /* zName */
80719 if( sqlite3_strnicmp(pTab->zName, "sqlite_", 7)==0 ){
80728 if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,
80729 db->aDb[iDb].zName ) ){
80735 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
80738 sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
80746 VdbeNoopComment((v, "Begin analysis of %s", pIdx->zName));
80759 VdbeComment((v, "%s", pIdx->zName));
80762 sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, pIdx->zName, 0);
80928 VdbeComment((v, "%s", pTab->zName));
80996 openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
80998 openStatTable(pParse, iDb, iStatCur, pTab->zName, "tbl");
81059 zDb = db->aDb[iDb].zName;
81334 sInfo.zDatabase = db->aDb[iDb].zName;
81440 const char *zName;
81452 zName = (const char *)sqlite3_value_text(argv[1]);
81454 if( zName==0 ) zName = "";
81473 char *z = db->aDb[i].zName;
81474 assert( z && zName );
81475 if( sqlite3StrICmp(z, zName)==0 ){
81476 zErrDyn = sqlite3MPrintf(db, "database %s is already in use", zName);
81501 rc = sqlite3ParseUri(db->pVfs->zName, zFile, &flags, &pVfs, &zPath, &zErr);
81532 aNew->zName = sqlite3DbStrDup(db, zName);
81533 if( rc==SQLITE_OK && aNew->zName==0 ){
81624 const char *zName = (const char *)sqlite3_value_text(argv[0]);
81632 if( zName==0 ) zName = "";
81636 if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
81640 sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName);
81644 sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName);
81653 sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
81755 "sqlite_detach", /* zName */
81777 "sqlite_attach", /* zName */
81805 pFix->zDb = db->aDb[iDb].zName;
82038 char *zDb = db->aDb[iDb].zName; /* Name of attached database */
82102 zCol = pTab->aCol[iCol].zName;
82105 zCol = pTab->aCol[pTab->iPKey].zName;
82110 if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){
82226 const char *zName; /* Name of the table */
82244 const char *zName /* Name of the table to be locked */
82268 p->zName = zName;
82290 p->zName, P4_STATIC);
82449 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
82453 assert( zName!=0 );
82454 nName = sqlite3Strlen30(zName);
82459 if( zDatabase!=0 && sqlite3StrICmp(zDatabase, db->aDb[j].zName) ) continue;
82461 p = sqlite3HashFind(&db->aDb[j].pSchema->tblHash, zName, nName);
82480 const char *zName, /* Name of the table we are looking for */
82491 p = sqlite3FindTable(pParse->db, zName, zDbase);
82495 sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
82497 sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName);
82522 zDb = pParse->db->aDb[iDb].zName;
82526 return sqlite3LocateTable(pParse, isView, p->zName, zDb);
82541 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
82544 int nName = sqlite3Strlen30(zName);
82551 if( zDb && sqlite3StrICmp(zDb, db->aDb[j].zName) ) continue;
82553 p = sqlite3HashFind(&pSchema->idxHash, zName, nName);
82616 sqlite3DbFree(db, pDb->zName);
82617 pDb->zName = 0;
82696 sqlite3DbFree(db, pCol->zName);
82742 char *zName = pIndex->zName;
82744 &pIndex->pSchema->idxHash, zName, sqlite3Strlen30(zName), 0
82758 sqlite3DbFree(db, pTable->zName);
82807 char *zName;
82809 zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
82810 sqlite3Dequote(zName);
82812 zName = 0;
82814 return zName;
82832 ** Parameter zName points to a nul-terminated buffer containing the name
82837 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
82839 if( zName ){
82841 int n = sqlite3Strlen30(zName);
82843 if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) &&
82844 0==sqlite3StrICmp(pDb->zName, zName) ){
82860 char *zName; /* Name we are searching for */
82861 zName = sqlite3NameFromToken(db, pName);
82862 i = sqlite3FindDbName(db, zName);
82863 sqlite3DbFree(db, zName);
82914 ** This routine is used to check if the UTF-8 string zName is a legal
82920 SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
82923 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
82924 sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
82956 char *zName = 0; /* The name of the new table */
82990 zName = sqlite3NameFromToken(db, pName);
82991 if( zName==0 ) return;
82992 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
83000 char *zDb = db->aDb[iDb].zName;
83017 if( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){
83031 char *zDb = db->aDb[iDb].zName;
83035 pTable = sqlite3FindTable(db, zName, zDb);
83045 if( sqlite3FindIndex(db, zName, zDb)!=0 ){
83046 sqlite3ErrorMsg(pParse, "there is already an index named %s", zName);
83058 pTable->zName = zName;
83071 if( !pParse->nested && strcmp(zName, "sqlite_sequence")==0 ){
83144 sqlite3DbFree(db, zName);
83178 sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
83185 if( STRICMP(z, p->aCol[i].zName) ){
83202 pCol->zName = z;
83326 pCol->zName);
83373 "table \"%s\" has more than one primary key", pTab->zName);
83383 if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
83479 ** encoding identified by the string zName, length nName.
83497 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
83503 pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
83505 pColl = sqlite3GetCollSeq(pParse, enc, pColl, zName);
83602 n += identLength(pCol->zName) + 5;
83604 n += identLength(p->zName);
83622 identPut(zStmt, &k, p->zName);
83638 identPut(zStmt, &k, pCol->zName);
83711 sSrc.a[0].zName = p->zName;
83823 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
83825 p->zName,
83826 p->zName,
83844 pDb->zName
83852 sqlite3MPrintf(db, "tbl_name='%q'", p->zName));
83862 pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName,
83863 sqlite3Strlen30(p->zName),p);
83874 const char *zName = (const char *)pParse->sNameToken.z;
83880 nName = (int)((const char *)pCons->z - zName);
83881 p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
84008 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
84147 pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
84220 const char *zName /* Name of index or table */
84223 const char *zDbName = pParse->db->aDb[iDb].zName;
84230 zDbName, zTab, zType, zName
84276 pDb->zName, pTab->zName
84290 pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
84299 sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0);
84301 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
84342 const char *zDb = db->aDb[iDb].zName;
84356 zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;
84365 if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
84368 if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
84373 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0
84374 && sqlite3StrNICmp(pTab->zName, "sqlite_stat", 11)!=0 ){
84375 sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
84384 sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
84388 sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
84399 sqlite3ClearStatTables(pParse, iDb, "tbl", pTab->zName);
84449 p->aCol[iCol].zName, pTo);
84464 nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
84486 if( sqlite3StrICmp(p->aCol[j].zName, pFromCol->a[i].zName)==0 ){
84494 pFromCol->a[i].zName);
84501 int n = sqlite3Strlen30(pToCol->a[i].zName);
84503 memcpy(z, pToCol->a[i].zName, n);
84581 if( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex->zName, 0,
84582 db->aDb[iDb].zName ) ){
84588 sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
84672 char *zName = 0; /* Name of the index */
84673 int nName; /* Number of characters in zName */
84745 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0
84746 && sqlite3StrNICmp(&pTab->zName[7],"altertab_",9)!=0 ){
84747 sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
84777 zName = sqlite3NameFromToken(db, pName);
84778 if( zName==0 ) goto exit_create_index;
84780 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
84784 if( sqlite3FindTable(db, zName, 0)!=0 ){
84785 sqlite3ErrorMsg(pParse, "there is already a table named %s", zName);
84789 if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
84791 sqlite3ErrorMsg(pParse, "index %s already exists", zName);
84802 zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
84803 if( zName==0 ){
84812 const char *zDb = pDb->zName;
84818 if( sqlite3AuthCheck(pParse, i, zName, pTab->zName, zDb) ){
84829 nullId.z = pTab->aCol[pTab->nCol-1].zName;
84851 nName = sqlite3Strlen30(zName);
84859 nName + 1 + /* Index.zName */
84873 pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]);
84874 zExtra = (char *)(&pIndex->zName[nName+1]);
84875 memcpy(pIndex->zName, zName, nName+1);
84902 const char *zColName = pListItem->zName;
84908 if( sqlite3StrICmp(zColName, pTabCol->zName)==0 ) break;
84912 pTab->zName, zColName);
85007 pIndex->zName, sqlite3Strlen30(pIndex->zName),
85069 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
85070 pIndex->zName,
85071 pTab->zName,
85084 sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName));
85120 sqlite3DbFree(db, zName);
85177 pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
85197 const char *zDb = db->aDb[iDb].zName;
85203 if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){
85215 db->aDb[iDb].zName, SCHEMA_TABLE(iDb), pIndex->zName
85217 sqlite3ClearStatTables(pParse, iDb, "idx", pIndex->zName);
85220 sqlite3VdbeAddOp4(v, OP_DropIndex, iDb, 0, 0, pIndex->zName, 0);
85292 pList->a[i].zName = sqlite3NameFromToken(db, pToken);
85303 sqlite3DbFree(db, pList->a[i].zName);
85313 SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
85317 if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
85401 ** The SrcList.a[].zName field is filled with the table name which might
85450 pItem->zName = sqlite3NameFromToken(db, pTable);
85482 sqlite3DbFree(db, pItem->zName);
85659 char *zName = sqlite3NameFromToken(pParse->db, pName);
85660 if( zName ){
85666 if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){
85667 sqlite3DbFree(pParse->db, zName);
85670 sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);
85774 if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
85964 zDb = db->aDb[iDb].zName;
86040 ** in the encoding enc of name zName, length nName.
86042 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
86045 char *zExternal = sqlite3DbStrDup(db, zName);
86054 sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);
86073 char *z = pColl->zName;
86093 ** collation sequence with name zName, length nName.
86096 ** db for collation type name zName, length nName, or NULL, if no collation
86105 const char *zName /* Collating sequence name */
86112 p = sqlite3FindCollSeq(db, enc, zName, 0);
86118 callCollNeeded(db, enc, zName);
86119 p = sqlite3FindCollSeq(db, enc, zName, 0);
86126 sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
86144 const char *zName = pColl->zName;
86146 CollSeq *p = sqlite3GetCollSeq(pParse, ENC(db), pColl, zName);
86159 ** specified by zName and nName is not found and parameter 'create' is
86172 const char *zName, /* Name of the collating sequence */
86176 int nName = sqlite3Strlen30(zName);
86177 pColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
86183 pColl[0].zName = (char*)&pColl[3];
86185 pColl[1].zName = (char*)&pColl[3];
86187 pColl[2].zName = (char*)&pColl[3];
86189 memcpy(pColl[0].zName, zName, nName);
86190 pColl[0].zName[nName] = 0;
86191 pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, nName, pColl);
86209 ** Parameter zName points to a UTF-8 encoded string nName bytes long.
86210 ** Return the CollSeq* pointer for the collation sequence named zName
86226 const char *zName,
86230 if( zName ){
86231 pColl = findCollSeqEntry(db, zName, create);
86313 if( sqlite3StrNICmp(p->zName, zFunc, nFunc)==0 && p->zName[nFunc]==0 ){
86328 int nName = sqlite3Strlen30(pDef->zName);
86329 u8 c1 = (u8)pDef->zName[0];
86331 pOther = functionSearch(pHash, h, pDef->zName, nName);
86357 ** case is used to see if zName is a valid function name for some number
86366 const char *zName, /* Name of the function. Not null-terminated */
86380 h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % ArraySize(db->aFunc.a);
86384 p = functionSearch(&db->aFunc, h, zName, nName);
86409 p = functionSearch(pHash, h, zName, nName);
86426 pBest->zName = (char *)&pBest[1];
86429 memcpy(pBest->zName, zName, nName);
86430 pBest->zName[nName] = 0;
86568 sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
86574 sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
86605 pFrom->a[0].zName = sqlite3DbStrDup(db, pView->zName);
86606 pFrom->a[0].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
86786 zDb = db->aDb[iDb].zName;
86787 rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);
86805 sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
86853 pTab->zName, P4_STATIC);
87048 sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
88708 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
88710 pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
89094 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
89140 zIdxCol = pParent->aCol[iCol].zName;
89158 pFKey->pFrom->zName, pFKey->zTo);
89401 if( zColl==0 ) zColl = db->pDfltColl->zName;
89410 zCol = pFKey->pFrom->aCol[iCol].zName;
89477 int nName = sqlite3Strlen30(pTab->zName);
89478 return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName, nName);
89597 zDb = db->aDb[iDb].zName;
89658 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
89659 rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
89668 sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
89712 pItem->zName = pFKey->pFrom->zName;
89728 pItem->zName = 0;
89811 if( (zKey ? !sqlite3StrICmp(pCol->zName, zKey)
89893 tToCol.z = pIdx ? pTab->aCol[pIdx->aiColumn[i]].zName : "oid";
89894 tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
89954 zFrom = pFKey->pFrom->zName;
90136 sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite)?1:0, pTab->zName);
90139 VdbeComment((v, "%s", pTab->zName));
90349 sqlite3VdbeAddOp4(v, OP_String8, 0, memId-1, 0, p->pTab->zName, 0);
90685 zTab = pTabList->a[0].zName;
90694 zDb = pDb->zName;
90695 if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){
90875 if( sqlite3StrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){
90884 if( sqlite3IsRowid(pColumn->a[i].zName) ){
90888 pTabList, 0, pColumn->a[i].zName);
91355 pTab->zName, pTab->aCol[i].zName);
91386 char *zConsName = pCheck->a[i].zName;
91545 char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
91643 sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
91676 VdbeComment((v, "%s", pIdx->zName));
91975 sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
91987 VdbeComment((v, "%s", pSrcIdx->zName));
91991 VdbeComment((v, "%s", pDestIdx->zName));
92220 int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
93544 const char *zName; /* Name of the pragma */
93586 if( sqlite3StrICmp(zLeft, p->zName)==0 ){
93593 returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 );
93628 const char *zName;
93630 case OE_SetNull: zName = "SET NULL"; break;
93631 case OE_SetDflt: zName = "SET DEFAULT"; break;
93632 case OE_Cascade: zName = "CASCADE"; break;
93633 case OE_Restrict: zName = "RESTRICT"; break;
93634 default: zName = "NO ACTION";
93637 return zName;
93725 zDb = pId2->n>0 ? pDb->zName : 0;
94388 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pCol->zName, 0);
94429 sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pTab->aCol[cnum].zName, 0);
94453 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
94473 assert( db->aDb[i].zName!=0 );
94475 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, db->aDb[i].zName, 0);
94492 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pColl->zName, 0);
94530 pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
94585 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
94588 sqlite3VdbeAddOp4(v, OP_String8, 0, regResult, 0, pTab->zName,
94594 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
94780 sqlite3MPrintf(db, "*** in database %s ***\n", db->aDb[i].zName),
94823 sqlite3VdbeChangeP4(v, addr+4, pIdx->zName, P4_TRANSIENT);
94853 sqlite3VdbeChangeP4(v, addr+7, pIdx->zName, P4_TRANSIENT);
94889 char *zName;
94911 sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
94923 for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
94924 if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
94929 if( !pEnc->zName ){
95127 if( db->aDb[i].zName==0 ) continue;
95128 sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, db->aDb[i].zName, P4_STATIC);
95132 }else if( sqlite3_file_control(db, i ? db->aDb[i].zName : 0,
95313 pIndex = sqlite3FindIndex(db, argv[0], db->aDb[iDb].zName);
95407 pTab = sqlite3FindTable(db, zMasterName, db->aDb[iDb].zName);
95530 db->aDb[iDb].zName, zMasterName);
95786 const char *zDb = db->aDb[i].zName;
96263 if( sqlite3StrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;
96423 char *zName; /* Name of column in the right table */
96427 zName = pRightTab->aCol[j].zName;
96428 if( tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol) ){
96462 char *zName; /* Name of the term in the USING clause */
96467 zName = pList->a[j].zName;
96468 iRightCol = columnIndex(pRightTab, zName);
96470 || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol)
96473 "not present in both tables", zName);
97222 zOriginCol = pTab->aCol[iCol].zName;
97224 zOriginTab = pTab->zName;
97227 zOriginDb = pNC->pParse->db->aDb[iDb].zName;
97330 if( pEList->a[i].zName ){
97331 char *zName = pEList->a[i].zName;
97332 sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);
97347 zCol = pTab->aCol[iCol].zName;
97353 char *zName = 0;
97354 zName = sqlite3MPrintf(db, "%s.%s", pTab->zName, zCol);
97355 sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);
97392 char *zName; /* Column name */
97393 int nName; /* Size of name in zName[] */
97410 if( (zName = pEList->a[i].zName)!=0 ){
97412 zName = sqlite3DbStrDup(db, zName);
97425 zName = sqlite3MPrintf(db, "%s",
97426 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
97429 zName = sqlite3MPrintf(db, "%s", pColExpr->u.zToken);
97432 zName = sqlite3MPrintf(db, "%s", pEList->a[i].zSpan);
97436 sqlite3DbFree(db, zName);
97443 nName = sqlite3Strlen30(zName);
97445 if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
97448 for(k=nName-1; k>1 && sqlite3Isdigit(zName[k]); k--){}
97449 if( zName[k]==':' ) nName = k;
97450 zName[nName] = 0;
97451 zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
97452 sqlite3DbFree(db, zName);
97453 zName = zNewName;
97455 if( zName==0 ) break;
97458 pCol->zName = zName;
97462 sqlite3DbFree(db, aCol[j].zName);
97511 pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
97540 pTab->zName = 0;
98416 sqlite3ExprAddCollateString(pParse, pTerm, pColl->zName);
98992 pParse->zAuthContext = pSubitem->zName;
99067 sqlite3DbFree(db, pSubitem->zName);
99070 pSubitem->zName = 0;
99171 if( pList->a[i].zName==0 ){
99172 char *zName = sqlite3DbStrDup(db, pList->a[i].zSpan);
99173 sqlite3Dequote(zName);
99174 pList->a[i].zName = zName;
99322 pIdx && sqlite3StrICmp(pIdx->zName, zIndex);
99459 if( pFrom->zName==0 ){
99469 pTab->zName = sqlite3MPrintf(db, "sqlite_subquery_%p_", (void*)pTab);
99483 pTab->zName);
99556 pNew->a[pNew->nExpr-1].zName = a[k].zName;
99558 a[k].zName = 0;
99579 zTabName = pTab->zName;
99588 zSchemaName = iDb>=0 ? db->aDb[iDb].zName : "*";
99591 char *zName = pTab->aCol[j].zName;
99596 assert( zName );
99615 && tableAndColumnIndex(pTabList, i, zName, 0, 0)
99621 if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
99627 pRight = sqlite3Expr(db, TK_ID, zName);
99628 zColname = zName;
99639 zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
99959 pTab->zName,
99961 pIdx ? pIdx->zName : "",
100158 VdbeComment((v, "coroutine for %s", pItem->pTab->zName));
100171 VdbeComment((v, "end %s", pItem->pTab->zName));
100187 VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
100200 VdbeComment((v, "end %s", pItem->pTab->zName));
100662 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
100839 sqlite3ExplainPrintf(pVdbe, " (tabname=%s)", pItem->pTab->zName);
100841 }else if( pItem->zName ){
100842 sqlite3ExplainPrintf(pVdbe, "%s", pItem->zName);
101170 && 0==sqlite3StrICmp(pTrig->table, pTab->zName)
101203 char *zName = 0; /* Name of the trigger */
101287 zName = sqlite3NameFromToken(db, pName);
101288 if( !zName || SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
101293 zName, sqlite3Strlen30(zName)) ){
101304 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
101328 const char *zDb = db->aDb[iTabDb].zName;
101329 const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
101331 if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
101352 pTrigger->zName = zName;
101353 zName = 0;
101354 pTrigger->table = sqlite3DbStrDup(db, pTableName->a[0].zName);
101365 sqlite3DbFree(db, zName);
101386 char *zName; /* Name of trigger */
101394 zName = pTrig->zName;
101401 nameToken.z = pTrig->zName;
101422 db->aDb[iDb].zName, SCHEMA_TABLE(iDb), zName,
101427 sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName));
101434 pTrig = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), pTrig);
101583 sqlite3DbFree(db, pTrigger->zName);
101602 const char *zName;
101613 zName = pName->a[0].zName;
101614 nName = sqlite3Strlen30(zName);
101618 if( zDb && sqlite3StrICmp(db->aDb[j].zName, zDb) ) continue;
101620 pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName, nName);
101665 const char *zDb = db->aDb[iDb].zName;
101668 if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
101695 sqlite3VdbeChangeP4(v, base+1, pTrigger->zName, P4_TRANSIENT);
101699 sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
101709 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
101715 pTrigger = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), 0);
101741 if( sqlite3IdListIndex(pIdList, pEList->a[e].zName)>=0 ) return 1;
101803 pSrc->a[pSrc->nSrc-1].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
101948 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
101975 pSubParse->zAuthContext = pTrigger->zName;
101982 pTrigger->zName, onErrorText(orconf),
101987 pTab->zName
101991 sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
102017 VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
102054 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
102095 int bRecursive = (p->zName && 0==(pParse->db->flags&SQLITE_RecTriggers));
102100 (v, "Call: %s.%s", (p->zName?p->zName:"fkey"), onErrorText(orconf)));
102311 VdbeComment((v, "%s.%s", pTab->zName, pCol->zName));
102444 if( sqlite3StrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){
102454 if( sqlite3IsRowid(pChanges->a[i].zName) ){
102459 sqlite3ErrorMsg(pParse, "no such column: %s", pChanges->a[i].zName);
102467 rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,
102468 j<0 ? "ROWID" : pTab->aCol[j].zName,
102469 db->aDb[iDb].zName);
102539 sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
102880 pExpr = sqlite3Expr(db, TK_ID, pTab->aCol[i].zName);
103076 assert( strcmp(pDb->zName,"vacuum_db")==0 );
103307 const char *zName, /* Name assigned to this module */
103316 nName = sqlite3Strlen30(zName);
103317 if( sqlite3HashFind(&db->aModule, zName, nName) ){
103325 memcpy(zCopy, zName, nName+1);
103326 pMod->zName = zCopy;
103351 const char *zName, /* Name assigned to this module */
103355 return createModule(db, zName, pModule, pAux, 0);
103363 const char *zName, /* Name assigned to this module */
103368 return createModule(db, zName, pModule, pAux, xDestroy);
103599 addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
103609 sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName,
103610 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
103673 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
103674 pTab->zName,
103675 pTab->zName,
103684 zWhere = sqlite3MPrintf(db, "name='%q' AND type='table'", pTab->zName);
103687 pTab->zName, sqlite3Strlen30(pTab->zName) + 1);
103698 const char *zName = pTab->zName;
103699 int nName = sqlite3Strlen30(zName);
103701 pOld = sqlite3HashInsert(&pSchema->tblHash, zName, nName, pTab);
103754 char *zModuleName = sqlite3MPrintf(db, "%s", pTab->zName);
103770 pTab->azModuleArg[1] = db->aDb[iDb].zName;
103798 *pzErr = sqlite3MPrintf(db, zFormat, pTab->zName);
103930 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
104032 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
104266 zLowerName = sqlite3DbStrDup(db, pDef->zName);
104281 + sqlite3Strlen30(pDef->zName) + 1);
104286 pNew->zName = (char *)&pNew[1];
104287 memcpy(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
105076 if( sqlite3StrICmp(pColl->zName, pIdx->azColl[j]) ){
105922 if( ALWAYS(pColl) && 0==sqlite3StrICmp(pColl->zName, zColl) ){
105955 if( pIdx->zName==0 || pDistinct->nExpr>=BMS ) return 0;
106406 pIdx->zName = "auto-index";
106420 pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : "BINARY";
106450 VdbeComment((v, "for %s", pTable->zName));
106488 WHERETRACE(("Recomputing index info for %s...\n", pSrc->pTab->zName));
106597 WHERETRACE(("xBestIndex for %s\n", pTab->zName));
106617 "table %s: xBestIndex returned an invalid plan", pTab->zName);
107340 assert( pIdx->zName || (pIdx->nColumn==1 && pIdx->aiColumn[0]==-1) );
107372 if( pIdx->zName && i<pIdx->nColumn ){
107393 isMatch = sqlite3StrICmp(pColl->zName, zColl)==0;
107696 pSrc->pTab->zName, (pIdx ? pIdx->zName : "ipk")
108053 p->cost.plan.u.pIdx ? p->cost.plan.u.pIdx->zName : "ipk",
108421 explainAppendTerm(&txt, i, aCol[aiColumn[i]].zName, "=");
108426 char *z = (j==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[j]].zName;
108430 char *z = (j==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[j]].zName;
108471 zMsg = sqlite3MAppendf(db, zMsg, "%s TABLE %s", zMsg, pItem->zName);
108483 ((flags & WHERE_TEMP_INDEX)?"": pLevel->plan.u.pIdx->zName),
108588 VdbeComment((v, "next row of co-routine %s", pTabItem->pTab->zName));
109684 j, sWBI.pSrc->pTab->zName, isOptimal));
109748 j, sWBI.pSrc->pTab->zName,
109769 bestJ, pTabList->a[bestJ].pTab->zName,
109806 sqlite3ErrorMsg(pParse, "cannot use index: %s", pIdx->zName);
109888 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
109903 VdbeComment((v, "%s", pIx->zName));
109940 if( z==0 ) z = pTabItem->pTab->zName;
109958 n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
109960 memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
112608 pNew->zName = pOld->zName;
112611 pOld->zName = pOld->zDatabase = 0;
115836 const char *zName = 0;
115838 for(i=0; i<2 && zName==0; i++, rc &= 0xff){
115840 case SQLITE_OK: zName = "SQLITE_OK"; break;
115841 case SQLITE_ERROR: zName = "SQLITE_ERROR"; break;
115842 case SQLITE_INTERNAL: zName = "SQLITE_INTERNAL"; break;
115843 case SQLITE_PERM: zName = "SQLITE_PERM"; break;
115844 case SQLITE_ABORT: zName = "SQLITE_ABORT"; break;
115845 case SQLITE_ABORT_ROLLBACK: zName = "SQLITE_ABORT_ROLLBACK"; break;
115846 case SQLITE_BUSY: zName = "SQLITE_BUSY"; break;
115847 case SQLITE_BUSY_RECOVERY: zName = "SQLITE_BUSY_RECOVERY"; break;
115848 case SQLITE_LOCKED: zName = "SQLITE_LOCKED"; break;
115849 case SQLITE_LOCKED_SHAREDCACHE: zName = "SQLITE_LOCKED_SHAREDCACHE";break;
115850 case SQLITE_NOMEM: zName = "SQLITE_NOMEM"; break;
115851 case SQLITE_READONLY: zName = "SQLITE_READONLY"; break;
115852 case SQLITE_READONLY_RECOVERY: zName = "SQLITE_READONLY_RECOVERY"; break;
115853 case SQLITE_READONLY_CANTLOCK: zName = "SQLITE_READONLY_CANTLOCK"; break;
115854 case SQLITE_READONLY_ROLLBACK: zName = "SQLITE_READONLY_ROLLBACK"; break;
115855 case SQLITE_INTERRUPT: zName = "SQLITE_INTERRUPT"; break;
115856 case SQLITE_IOERR: zName = "SQLITE_IOERR"; break;
115857 case SQLITE_IOERR_READ: zName = "SQLITE_IOERR_READ"; break;
115858 case SQLITE_IOERR_SHORT_READ: zName = "SQLITE_IOERR_SHORT_READ"; break;
115859 case SQLITE_IOERR_WRITE: zName = "SQLITE_IOERR_WRITE"; break;
115860 case SQLITE_IOERR_FSYNC: zName = "SQLITE_IOERR_FSYNC"; break;
115861 case SQLITE_IOERR_DIR_FSYNC: zName = "SQLITE_IOERR_DIR_FSYNC"; break;
115862 case SQLITE_IOERR_TRUNCATE: zName = "SQLITE_IOERR_TRUNCATE"; break;
115863 case SQLITE_IOERR_FSTAT: zName = "SQLITE_IOERR_FSTAT"; break;
115864 case SQLITE_IOERR_UNLOCK: zName = "SQLITE_IOERR_UNLOCK"; break;
115865 case SQLITE_IOERR_RDLOCK: zName = "SQLITE_IOERR_RDLOCK"; break;
115866 case SQLITE_IOERR_DELETE: zName = "SQLITE_IOERR_DELETE"; break;
115867 case SQLITE_IOERR_BLOCKED: zName = "SQLITE_IOERR_BLOCKED"; break;
115868 case SQLITE_IOERR_NOMEM: zName = "SQLITE_IOERR_NOMEM"; break;
115869 case SQLITE_IOERR_ACCESS: zName = "SQLITE_IOERR_ACCESS"; break;
115871 zName = "SQLITE_IOERR_CHECKRESERVEDLOCK"; break;
115872 case SQLITE_IOERR_LOCK: zName = "SQLITE_IOERR_LOCK"; break;
115873 case SQLITE_IOERR_CLOSE: zName = "SQLITE_IOERR_CLOSE"; break;
115874 case SQLITE_IOERR_DIR_CLOSE: zName = "SQLITE_IOERR_DIR_CLOSE"; break;
115875 case SQLITE_IOERR_SHMOPEN: zName = "SQLITE_IOERR_SHMOPEN"; break;
115876 case SQLITE_IOERR_SHMSIZE: zName = "SQLITE_IOERR_SHMSIZE"; break;
115877 case SQLITE_IOERR_SHMLOCK: zName = "SQLITE_IOERR_SHMLOCK"; break;
115878 case SQLITE_IOERR_SHMMAP: zName = "SQLITE_IOERR_SHMMAP"; break;
115879 case SQLITE_IOERR_SEEK: zName = "SQLITE_IOERR_SEEK"; break;
115880 case SQLITE_IOERR_DELETE_NOENT: zName = "SQLITE_IOERR_DELETE_NOENT";break;
115881 case SQLITE_IOERR_MMAP: zName = "SQLITE_IOERR_MMAP"; break;
115882 case SQLITE_CORRUPT: zName = "SQLITE_CORRUPT"; break;
115883 case SQLITE_CORRUPT_VTAB: zName = "SQLITE_CORRUPT_VTAB"; break;
115884 case SQLITE_NOTFOUND: zName = "SQLITE_NOTFOUND"; break;
115885 case SQLITE_FULL: zName = "SQLITE_FULL"; break;
115886 case SQLITE_CANTOPEN: zName = "SQLITE_CANTOPEN"; break;
115887 case SQLITE_CANTOPEN_NOTEMPDIR: zName = "SQLITE_CANTOPEN_NOTEMPDIR";break;
115888 case SQLITE_CANTOPEN_ISDIR: zName = "SQLITE_CANTOPEN_ISDIR"; break;
115889 case SQLITE_CANTOPEN_FULLPATH: zName = "SQLITE_CANTOPEN_FULLPATH"; break;
115890 case SQLITE_PROTOCOL: zName = "SQLITE_PROTOCOL"; break;
115891 case SQLITE_EMPTY: zName = "SQLITE_EMPTY"; break;
115892 case SQLITE_SCHEMA: zName = "SQLITE_SCHEMA"; break;
115893 case SQLITE_TOOBIG: zName = "SQLITE_TOOBIG"; break;
115894 case SQLITE_CONSTRAINT: zName = "SQLITE_CONSTRAINT"; break;
115895 case SQLITE_CONSTRAINT_UNIQUE: zName = "SQLITE_CONSTRAINT_UNIQUE"; break;
115896 case SQLITE_CONSTRAINT_TRIGGER: zName = "SQLITE_CONSTRAINT_TRIGGER";break;
115898 zName = "SQLITE_CONSTRAINT_FOREIGNKEY"; break;
115899 case SQLITE_CONSTRAINT_CHECK: zName = "SQLITE_CONSTRAINT_CHECK"; break;
115901 zName = "SQLITE_CONSTRAINT_PRIMARYKEY"; break;
115902 case SQLITE_CONSTRAINT_NOTNULL: zName = "SQLITE_CONSTRAINT_NOTNULL";break;
115904 zName = "SQLITE_CONSTRAINT_COMMITHOOK"; break;
115905 case SQLITE_CONSTRAINT_VTAB: zName = "SQLITE_CONSTRAINT_VTAB"; break;
115907 zName = "SQLITE_CONSTRAINT_FUNCTION"; break;
115908 case SQLITE_MISMATCH: zName = "SQLITE_MISMATCH"; break;
115909 case SQLITE_MISUSE: zName = "SQLITE_MISUSE"; break;
115910 case SQLITE_NOLFS: zName = "SQLITE_NOLFS"; break;
115911 case SQLITE_AUTH: zName = "SQLITE_AUTH"; break;
115912 case SQLITE_FORMAT: zName = "SQLITE_FORMAT"; break;
115913 case SQLITE_RANGE: zName = "SQLITE_RANGE"; break;
115914 case SQLITE_NOTADB: zName = "SQLITE_NOTADB"; break;
115915 case SQLITE_ROW: zName = "SQLITE_ROW"; break;
115916 case SQLITE_NOTICE: zName = "SQLITE_NOTICE"; break;
115917 case SQLITE_NOTICE_RECOVER_WAL: zName = "SQLITE_NOTICE_RECOVER_WAL";break;
115919 zName = "SQLITE_NOTICE_RECOVER_ROLLBACK"; break;
115920 case SQLITE_WARNING: zName = "SQLITE_WARNING"; break;
115921 case SQLITE_DONE: zName = "SQLITE_DONE"; break;
115924 if( zName==0 ){
115927 zName = zBuf;
115929 return zName;
116304 const char *zName,
116307 int nName = sqlite3Strlen30(zName);
116310 if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){
116311 rc = sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8,
116723 ** Create a new collating function for database "db". The name is zName
116728 const char *zName,
116736 int nName = sqlite3Strlen30(zName);
116758 pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 0);
116774 CollSeq *aColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
116788 pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 1);
117298 db->aDb[0].zName = "main";
117300 db->aDb[1].zName = "temp";
117464 const char *zName,
117472 rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, 0);
117483 const char *zName,
117492 rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, xDel);
117504 const void *zName,
117513 zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE);
117680 if( 0==sqlite3StrICmp(pCol->zName, zColumnName) ){
118093 && (zDbName==0 || sqlite3StrICmp(zDbName, db->aDb[i].zName)==0)
119217 const char *zName; /* virtual table name */
119811 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_content'", zDb, p->zName);
119813 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segments'", zDb,p->zName);
119814 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segdir'", zDb, p->zName);
119815 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_docsize'", zDb, p->zName);
119816 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_stat'", zDb, p->zName);
119855 zCols, p->zName, zLanguageid
119876 p->zDb, p->zName
119913 p->zDb, p->zName, zContentCols
119921 p->zDb, p->zName
119933 p->zDb, p->zName
119938 p->zDb, p->zName
120120 (p->zContentTbl ? p->zContentTbl : p->zName),
120567 nName + /* zName */
120601 /* Fill in the zName and zDb fields of the vtab structure. */
120603 p->zName = zCsr;
120645 p->zDb, p->zName);
122675 const char *zName, /* Name of SQL function */
122680 const char *zName;
122695 if( strcmp(zName, aOverload[i].zName)==0 ){
122710 const char *zName /* New name of table */
122728 p->zDb, p->zName, zName
122735 p->zDb, p->zName, zName
122741 p->zDb, p->zName, zName
122746 p->zDb, p->zName, zName
122750 p->zDb, p->zName, zName
124755 p->pFts3Tab->zName = &p->pFts3Tab->zDb[nDb+1];
124760 memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
124761 sqlite3Fts3Dequote((char *)p->pFts3Tab->zName);
126224 const char *zName,
126237 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
127509 const unsigned char *zName;
127516 zName = sqlite3_value_text(argv[0]);
127527 pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
127533 pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
127535 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
127696 const char *zName;
127718 zName = (const char *)sqlite3_value_text(argv[0]);
127723 p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
127726 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
127778 char *zName,
127790 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
127800 char *zName,
127813 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
127892 ** The third argument to this function, zName, is used as the name
127898 const char *zName
127908 zTest = sqlite3_mprintf("%s_test", zName);
127909 zTest2 = sqlite3_mprintf("%s_internal_test", zName);
127916 rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
127919 rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
128250 ** Query FTS for the tokenizer implementation named zName.
128254 const char *zName,
128259 int nName = (int)strlen(zName);
128261 p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
128263 *pzErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
129015 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName, p->zWriteExprlist);
129019 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName);
129819 p->zSegmentsTbl = sqlite3_mprintf("%s_segments", p->zName);
136478 char *zName; /* Name of r-tree table */
137127 pRtree->zDb, pRtree->zName,
137128 pRtree->zDb, pRtree->zName,
137129 pRtree->zDb, pRtree->zName
139230 , pRtree->zDb, pRtree->zName, zNewName
139231 , pRtree->zDb, pRtree->zName, zNewName
139232 , pRtree->zDb, pRtree->zName, zNewName
139399 pRtree->zDb, pRtree->zName
139460 pRtree->zName = &pRtree->zDb[nDb+1];
139465 memcpy(pRtree->zName, argv[2], nName);
139898 const char *zName, /* Name of ICU function that failed */
139902 sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
140111 const char *zName; /* SQL Collation sequence name (eg. "japanese") */
140117 zName = (const char *)sqlite3_value_text(apArg[1]);
140119 if( !zLocale || !zName ){
140130 rc = sqlite3_create_collation_v2(db, zName, SQLITE_UTF16, (void *)pUCollator,
140144 const char *zName; /* Function name */
140174 db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0