Lines Matching refs:zName
1384 ** The zName field holds the name of the VFS module. The name must
1516 const char *zName; /* Name of this virtual file system */
1518 int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
1520 int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
1521 int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
1522 int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
1540 int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
1541 sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
1542 const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
3686 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4715 const char *zName,
4722 const char *zName,
4730 const void *zName,
5346 int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
5478 const char *zName, /* Name of the module */
5484 const char *zName, /* Name of the module */
9309 char *zName; /* Name of this database */
9634 char *zName; /* SQL name of the function. */
9674 ** FUNCTION(zName, nArg, iArg, bNC, xFunc)
9675 ** Used to create a scalar function definition of a function zName
9681 ** AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)
9687 ** LIKEFUNC(zName, nArg, pArg, flags)
9688 ** Used to create a scalar function definition of a function zName
9695 #define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
9697 SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
9698 #define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
9700 pArg, 0, xFunc, 0, 0, #zName, 0, 0}
9701 #define LIKEFUNC(zName, nArg, arg, flags) \
9702 {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0}
9703 #define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \
9705 SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
9714 char *zName; /* Savepoint name (nul-terminated) */
9735 const char *zName; /* Name passed to create_module() */
9745 char *zName; /* Name of this column */
9780 char *zName; /* Name of the collating sequence, UTF-8 encoded */
9894 ** Table.zName is the name of the table. The case of the original
9921 char *zName; /* Name of the table or view */
10123 char *zName; /* Name of this index */
10400 ** also be used as the argument to a function, in which case the a.zName
10409 char *zName; /* Token associated with this expression */
10414 u16 iAlias; /* Index into Parse.aAlias[] for zName */
10446 char *zName; /* Name of the identifier */
10447 int idx; /* Index in some Table.aCol[] of a column named zName */
10491 char *zName; /* Name of the table */
10492 char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
10493 Table *pTab; /* An SQL table corresponding to zName */
10959 char *zName; /* The name of the trigger */
11590 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
14602 if( strcmp(zVfs, pVfs->zName)==0 ) break;
19584 sqlite3StrAccumAppend(pAccum, pItem->zName, -1);
23907 const char *zName, /* Name of the file (UTF-8) */
23918 const char *zUtf8Name = zName;
23953 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
23954 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
23955 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
23956 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
24022 OSTRACE(( "OPEN Invalid handle rc=%d: zName=%s, ulAction=%#lx, ulFlags=%#lx, ulMode=%#lx\n",
24026 return os2Open( pVfs, zName, id,
24340 "os2", /* zName */
24895 const char *zName; /* Name of the sytem call */
24996 ** system call named zName.
25000 const char *zName, /* Name of system call to override */
25007 if( zName==0 ){
25008 /* If no zName is given, restore all system calls to their default
25018 /* If zName is specified, operate on only the one system call
25022 if( strcmp(zName, aSyscall[i].zName)==0 ){
25037 ** Return the value of a system call. Return NULL if zName is not a
25043 const char *zName
25049 if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
25055 ** Return the name of the first system call after zName. If zName==NULL
25056 ** then return the name of the first system call. Return NULL if zName
25057 ** is the last system call or if zName is not the name of a valid
25060 static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
25064 if( zName ){
25066 if( strcmp(zName, aSyscall[i].zName)==0 ) break;
25070 if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
29135 if( memcmp(pVfs->zName,"unix-excl",10)==0 ){
29549 const char *zName = zPath;
29565 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
29566 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
29567 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
29568 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
29581 pUnused = findReusableFd(zName, flags);
29591 }else if( !zName ){
29592 /* If zName is NULL, the upper layer is requesting a temp file. */
29598 zName = zTmpname;
29613 rc = findCreateFileMode(zName, flags, &openMode);
29619 fd = robust_open(zName, openFlags, openMode);
29620 OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags));
29628 fd = robust_open(zName, openFlags, openMode);
29631 rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
29647 zPath = zName;
29649 osUnlink(zName);
30384 dummyVfs.zName = "dummy";
31275 VFSNAME, /* zName */ \
32326 WCHAR *zName = utf8ToUnicode(zFilename);
32334 zTok = CharLowerW(zName);
32340 pFile->hMutex = CreateMutexW(NULL, FALSE, zName);
32344 free(zName);
32355 CharUpperW(zName);
32358 zName);
32366 free(zName);
33470 int nName; /* Size of zName in bytes */
34009 const char *zName, /* Name of the file (UTF-8) */
34024 const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
34067 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
34068 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
34069 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
34070 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
34171 h, zName, dwDesiredAccess,
34179 return winOpen(pVfs, zName, id,
34200 pFile->zPath = zName;
34205 && !winceCreateLock(zName, pFile)
34729 "win32", /* zName */
45122 static char zName[15];
45123 sqlite3_snprintf(sizeof(zName), zName, "READ-LOCK[%d]",
45125 return zName;
59177 int n = sqlite3Strlen30(pColl->zName);
59186 memcpy(&zTemp[i], pColl->zName,n+1);
59200 sqlite3_snprintf(nTemp, zTemp, "collseq(%.20s)", pColl->zName);
59205 sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
60000 ** zName must be a pointer to a nul terminated string.
60006 ** to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
60010 int idx, /* Index of column zName applies to */
60012 const char *zName, /* Pointer to buffer containing name */
60013 void (*xDel)(void*) /* Memory management strategy for zName */
60020 assert( !zName || xDel!=SQLITE_DYNAMIC );
60025 rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel);
60026 assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 );
61868 rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
62098 const char *zName = context->pFunc->zName;
62102 "unable to use function %s in the requested context", zName);
62741 SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){
62746 if( zName ){
62749 if( z && memcmp(z,zName,nName)==0 && z[nName]==0 ){
62756 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
62757 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
63797 char *zName; /* Name of savepoint */
66142 char *zName; /* Name of savepoint */
66152 u.aq.zName = pOp->p4.z;
66171 u.aq.nName = sqlite3Strlen30(u.aq.zName);
66187 u.aq.pNew->zName = (char *)&u.aq.pNew[1];
66188 memcpy(u.aq.pNew->zName, u.aq.zName, u.aq.nName+1);
66212 u.aq.pSavepoint && sqlite3StrICmp(u.aq.pSavepoint->zName, u.aq.zName);
66218 sqlite3SetString(&p->zErrMsg, db, "no such savepoint: %s", u.aq.zName);
67593 u.bg.zDb = db->aDb[u.bg.pC->iDb].zName;
67661 const char *zDb = db->aDb[u.bh.pC->iDb].zName;
68429 db->aDb[u.bx.iDb].zName, u.bx.zMaster, pOp->p4.z);
69525 ** in register P1 is passed as the zName argument to the xRename method.
70007 if( sqlite3StrICmp(pTab->aCol[iCol].zName, zColumn)==0 ){
70088 sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
71358 const char *zName, /* Name of the journal file */
71371 return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
71376 p->zJournal = zName;
71967 assert( pTab!=0 && pTab->zName!=0 );
71975 char *zTabName = pTab->zName;
71979 if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){
71991 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
72012 if( sqlite3StrICmp(pUsing->a[k].zName, zCol)==0 ){
72048 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
72102 char *zAs = pEList->a[j].zName;
72342 auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef->zName, 0);
72346 pDef->zName);
72435 char *zAs = pEList->a[i].zName;
72810 if( pItem->zName ) pParse->zAuthContext = pItem->zName;
73888 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
73920 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
73956 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
74040 ** Set the ExprList.a[].zName element of the most recently added item
74058 assert( pItem->zName==0 );
74059 pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
74060 if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
74117 sqlite3DbFree(db, pItem->zName);
74474 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
74520 VdbeComment((v, "%s", pIdx->zName));
75741 (pExpr->iColumn<0 ? "rowid" : pExpr->pTab->aCol[pExpr->iColumn].zName),
77063 zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
77089 zWhere = whereOrName(db, zWhere, pTrig->zName);
77104 ** Argument zName is the name of the table in the database schema at
77106 ** pTab->zName if this function is being called to code part of an
77109 static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
77128 sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
77133 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
77136 zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
77151 ** Parameter zName is the name of a table that is about to be altered
77156 ** Or, if zName is not a system table, zero is returned.
77158 static int isSystemTable(Parse *pParse, const char *zName){
77159 if( sqlite3Strlen30(zName)>6 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
77160 sqlite3ErrorMsg(pParse, "table %s may not be altered", zName);
77178 char *zName = 0; /* NULL-terminated version of pName */
77194 pTab = sqlite3LocateTable(pParse, 0, pSrc->a[0].zName, pSrc->a[0].zDatabase);
77197 zDb = db->aDb[iDb].zName;
77201 zName = sqlite3NameFromToken(db, pName);
77202 if( !zName ) goto exit_rename_table;
77204 /* Check that a table or index named 'zName' does not already exist
77207 if( sqlite3FindTable(db, zName, zDb) || sqlite3FindIndex(db, zName, zDb) ){
77209 "there is already another table or index with this name: %s", zName);
77216 if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
77219 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){ goto
77225 sqlite3ErrorMsg(pParse, "view %s may not be altered", pTab->zName);
77232 if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
77269 sqlite3VdbeAddOp4(v, OP_String8, 0, i, 0, zName, 0);
77275 /* figure out how many UTF-8 characters are in zName */
77276 zTabName = pTab->zName;
77288 "WHERE %s;", zDb, SCHEMA_TABLE(iDb), zTabName, zName, zWhere);
77312 zDb, SCHEMA_TABLE(iDb), zName, zName, zName,
77314 zName,
77316 zName, nTabName, zTabName
77326 zDb, zName, pTab->zName);
77340 "WHERE %s;", zName, zName, zWhere);
77351 reloadTableSchema(pParse, p->pFrom, pFrom->zName);
77358 reloadTableSchema(pParse, pTab, zName);
77362 sqlite3DbFree(db, zName);
77418 zDb = db->aDb[iDb].zName;
77419 zTab = &pNew->zName[16]; /* Skip the "sqlite_altertab_" prefix on the name */
77427 if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
77506 reloadTableSchema(pParse, pTab, pTab->zName);
77537 pTab = sqlite3LocateTable(pParse, 0, pSrc->a[0].zName, pSrc->a[0].zDatabase);
77552 if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
77575 pNew->zName = sqlite3MPrintf(db, "sqlite_altertab_%s", pTab->zName);
77576 if( !pNew->aCol || !pNew->zName ){
77583 pCol->zName = sqlite3DbStrDup(db, pCol->zName);
77646 const char *zName;
77668 const char *zTab = aTable[i].zName;
77670 if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
77676 "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
77688 "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere
77750 if( memcmp(pTab->zName, "sqlite_", 7)==0 ){
77759 if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,
77760 db->aDb[iDb].zName ) ){
77766 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
77769 sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
77785 VdbeComment((v, "%s", pIdx->zName));
77788 sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, pIdx->zName, 0);
77956 VdbeComment((v, "%s", pTab->zName));
78023 openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
78025 openStatTable(pParse, iDb, iStatCur, pTab->zName, "tbl");
78086 zDb = db->aDb[iDb].zName;
78226 sInfo.zDatabase = db->aDb[iDb].zName;
78397 const char *zName;
78409 zName = (const char *)sqlite3_value_text(argv[1]);
78411 if( zName==0 ) zName = "";
78430 char *z = db->aDb[i].zName;
78431 assert( z && zName );
78432 if( sqlite3StrICmp(z, zName)==0 ){
78433 zErrDyn = sqlite3MPrintf(db, "database %s is already in use", zName);
78458 rc = sqlite3ParseUri(db->pVfs->zName, zFile, &flags, &pVfs, &zPath, &zErr);
78489 aNew->zName = sqlite3DbStrDup(db, zName);
78490 if( rc==SQLITE_OK && aNew->zName==0 ){
78581 const char *zName = (const char *)sqlite3_value_text(argv[0]);
78589 if( zName==0 ) zName = "";
78593 if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
78597 sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName);
78601 sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName);
78610 sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
78712 "sqlite_detach", /* zName */
78734 "sqlite_attach", /* zName */
78762 pFix->zDb = db->aDb[iDb].zName;
78993 char *zDb = db->aDb[iDb].zName; /* Name of attached database */
79057 zCol = pTab->aCol[iCol].zName;
79060 zCol = pTab->aCol[pTab->iPKey].zName;
79065 if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){
79181 const char *zName; /* Name of the table */
79199 const char *zName /* Name of the table to be locked */
79223 p->zName = zName;
79245 p->zName, P4_STATIC);
79403 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
79407 assert( zName!=0 );
79408 nName = sqlite3Strlen30(zName);
79413 if( zDatabase!=0 && sqlite3StrICmp(zDatabase, db->aDb[j].zName) ) continue;
79415 p = sqlite3HashFind(&db->aDb[j].pSchema->tblHash, zName, nName);
79434 const char *zName, /* Name of the table we are looking for */
79445 p = sqlite3FindTable(pParse->db, zName, zDbase);
79449 sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
79451 sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName);
79470 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
79473 int nName = sqlite3Strlen30(zName);
79480 if( zDb && sqlite3StrICmp(zDb, db->aDb[j].zName) ) continue;
79482 p = sqlite3HashFind(&pSchema->idxHash, zName, nName);
79588 sqlite3DbFree(db, pDb->zName);
79589 pDb->zName = 0;
79623 sqlite3DbFree(db, pCol->zName);
79656 char *zName = pIndex->zName;
79658 &pIndex->pSchema->idxHash, zName, sqlite3Strlen30(zName), 0
79672 sqlite3DbFree(db, pTable->zName);
79718 char *zName;
79720 zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
79721 sqlite3Dequote(zName);
79723 zName = 0;
79725 return zName;
79743 ** Parameter zName points to a nul-terminated buffer containing the name
79748 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
79750 if( zName ){
79752 int n = sqlite3Strlen30(zName);
79754 if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) &&
79755 0==sqlite3StrICmp(pDb->zName, zName) ){
79771 char *zName; /* Name we are searching for */
79772 zName = sqlite3NameFromToken(db, pName);
79773 i = sqlite3FindDbName(db, zName);
79774 sqlite3DbFree(db, zName);
79825 ** This routine is used to check if the UTF-8 string zName is a legal
79831 SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
79834 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
79835 sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
79867 char *zName = 0; /* The name of the new table */
79901 zName = sqlite3NameFromToken(db, pName);
79902 if( zName==0 ) return;
79903 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
79911 char *zDb = db->aDb[iDb].zName;
79928 if( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){
79942 char *zDb = db->aDb[iDb].zName;
79946 pTable = sqlite3FindTable(db, zName, zDb);
79956 if( sqlite3FindIndex(db, zName, zDb)!=0 ){
79957 sqlite3ErrorMsg(pParse, "there is already an index named %s", zName);
79969 pTable->zName = zName;
79982 if( !pParse->nested && strcmp(zName, "sqlite_sequence")==0 ){
80055 sqlite3DbFree(db, zName);
80089 sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
80096 if( STRICMP(z, p->aCol[i].zName) ){
80113 pCol->zName = z;
80237 pCol->zName);
80284 "table \"%s\" has more than one primary key", pTab->zName);
80294 if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
80388 ** encoding identified by the string zName, length nName.
80406 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
80412 pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
80414 pColl = sqlite3GetCollSeq(db, enc, pColl, zName);
80416 sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
80514 n += identLength(pCol->zName) + 5;
80516 n += identLength(p->zName);
80534 identPut(zStmt, &k, p->zName);
80550 identPut(zStmt, &k, pCol->zName);
80621 sSrc.a[0].zName = p->zName;
80730 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
80732 p->zName,
80733 p->zName,
80751 pDb->zName
80759 sqlite3MPrintf(db, "tbl_name='%q'", p->zName));
80769 pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName,
80770 sqlite3Strlen30(p->zName),p);
80782 const char *zName = (const char *)pParse->sNameToken.z;
80788 nName = (int)((const char *)pCons->z - zName);
80789 p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
80916 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
81055 pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
81127 const char *zName /* Name of index or table */
81131 const char *zDbName = pParse->db->aDb[iDb].zName;
81136 zDbName, azStatTab[i], zType, zName
81159 pName->a[0].zName, pName->a[0].zDatabase);
81179 const char *zDb = db->aDb[iDb].zName;
81193 zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;
81202 if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
81205 if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
81210 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
81211 sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
81220 sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
81224 sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
81266 pDb->zName, pTab->zName
81280 pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
81281 sqlite3ClearStatTables(pParse, iDb, "tbl", pTab->zName);
81290 sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0);
81292 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
81342 p->aCol[iCol].zName, pTo);
81357 nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
81379 if( sqlite3StrICmp(p->aCol[j].zName, pFromCol->a[i].zName)==0 ){
81387 pFromCol->a[i].zName);
81394 int n = sqlite3Strlen30(pToCol->a[i].zName);
81396 memcpy(z, pToCol->a[i].zName, n);
81475 if( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex->zName, 0,
81476 db->aDb[iDb].zName ) ){
81482 sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
81594 char *zName = 0; /* Name of the index */
81595 int nName; /* Number of characters in zName */
81651 pTab = sqlite3LocateTable(pParse, 0, pTblName->a[0].zName,
81665 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0
81666 && memcmp(&pTab->zName[7],"altertab_",9)!=0 ){
81667 sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
81697 zName = sqlite3NameFromToken(db, pName);
81698 if( zName==0 ) goto exit_create_index;
81699 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
81703 if( sqlite3FindTable(db, zName, 0)!=0 ){
81704 sqlite3ErrorMsg(pParse, "there is already a table named %s", zName);
81708 if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
81710 sqlite3ErrorMsg(pParse, "index %s already exists", zName);
81721 zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
81722 if( zName==0 ){
81731 const char *zDb = pDb->zName;
81737 if( sqlite3AuthCheck(pParse, i, zName, pTab->zName, zDb) ){
81748 nullId.z = pTab->aCol[pTab->nCol-1].zName;
81766 nExtra += (1 + sqlite3Strlen30(pColl->zName));
81774 nName = sqlite3Strlen30(zName);
81782 nName + 1 + /* Index.zName */
81792 pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]);
81793 zExtra = (char *)(&pIndex->zName[nName+1]);
81794 memcpy(pIndex->zName, zName, nName+1);
81821 const char *zColName = pListItem->zName;
81827 if( sqlite3StrICmp(zColName, pTabCol->zName)==0 ) break;
81831 pTab->zName, zColName);
81843 zColl = pListItem->pExpr->pColl->zName;
81853 zColl = db->pDfltColl->zName;
81932 pIndex->zName, sqlite3Strlen30(pIndex->zName),
81994 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
81995 pIndex->zName,
81996 pTab->zName,
82009 sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName));
82045 sqlite3DbFree(db, zName);
82102 pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
82122 const char *zDb = db->aDb[iDb].zName;
82128 if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){
82140 db->aDb[iDb].zName, SCHEMA_TABLE(iDb), pIndex->zName
82142 sqlite3ClearStatTables(pParse, iDb, "idx", pIndex->zName);
82145 sqlite3VdbeAddOp4(v, OP_DropIndex, iDb, 0, 0, pIndex->zName, 0);
82222 pList->a[i].zName = sqlite3NameFromToken(db, pToken);
82233 sqlite3DbFree(db, pList->a[i].zName);
82243 SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
82247 if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
82331 ** The SrcList.a[].zName field is filled with the table name which might
82380 pItem->zName = sqlite3NameFromToken(db, pTable);
82412 sqlite3DbFree(db, pItem->zName);
82595 char *zName = sqlite3NameFromToken(pParse->db, pName);
82596 if( zName ){
82602 if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){
82603 sqlite3DbFree(pParse->db, zName);
82606 sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);
82701 if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
82884 zDb = db->aDb[iDb].zName;
82960 ** in the encoding enc of name zName, length nName.
82962 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
82965 char *zExternal = sqlite3DbStrDup(db, zName);
82974 sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);
82993 char *z = pColl->zName;
83013 ** collation sequence with name zName, length nName.
83016 ** db for collation type name zName, length nName, or NULL, if no collation
83025 const char *zName /* Collating sequence name */
83031 p = sqlite3FindCollSeq(db, enc, zName, 0);
83037 callCollNeeded(db, enc, zName);
83038 p = sqlite3FindCollSeq(db, enc, zName, 0);
83060 const char *zName = pColl->zName;
83062 CollSeq *p = sqlite3GetCollSeq(db, ENC(db), pColl, zName);
83064 sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
83077 ** specified by zName and nName is not found and parameter 'create' is
83090 const char *zName, /* Name of the collating sequence */
83094 int nName = sqlite3Strlen30(zName);
83095 pColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
83101 pColl[0].zName = (char*)&pColl[3];
83103 pColl[1].zName = (char*)&pColl[3];
83105 pColl[2].zName = (char*)&pColl[3];
83107 memcpy(pColl[0].zName, zName, nName);
83108 pColl[0].zName[nName] = 0;
83109 pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, nName, pColl);
83127 ** Parameter zName points to a UTF-8 encoded string nName bytes long.
83128 ** Return the CollSeq* pointer for the collation sequence named zName
83144 const char *zName,
83148 if( zName ){
83149 pColl = findCollSeqEntry(db, zName, create);
83212 if( sqlite3StrNICmp(p->zName, zFunc, nFunc)==0 && p->zName[nFunc]==0 ){
83227 int nName = sqlite3Strlen30(pDef->zName);
83228 u8 c1 = (u8)pDef->zName[0];
83230 pOther = functionSearch(pHash, h, pDef->zName, nName);
83266 const char *zName, /* Name of the function. Not null-terminated */
83279 h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % ArraySize(db->aFunc.a);
83283 p = functionSearch(&db->aFunc, h, zName, nName);
83308 p = functionSearch(pHash, h, zName, nName);
83325 pBest->zName = (char *)&pBest[1];
83328 memcpy(pBest->zName, zName, nName);
83329 pBest->zName[nName] = 0;
83433 pTab = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
83467 sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
83473 sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
83505 pFrom->a[0].zAlias = sqlite3DbStrDup(db, pView->zName);
83687 zDb = db->aDb[iDb].zName;
83688 rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);
83706 sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
83754 pTab->zName, P4_STATIC);
83949 sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
85493 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
85495 pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
85876 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
85922 zIdxCol = pParent->aCol[iCol].zName;
86187 zCol = pFKey->pFrom->aCol[iCol].zName;
86254 int nName = sqlite3Strlen30(pTab->zName);
86255 return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName, nName);
86374 zDb = db->aDb[iDb].zName;
86435 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
86436 rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
86445 sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
86489 pItem->zName = pFKey->pFrom->zName;
86505 pItem->zName = 0;
86588 if( (zKey ? !sqlite3StrICmp(pCol->zName, zKey) : pCol->isPrimKey) ){
86669 tToCol.z = pIdx ? pTab->aCol[pIdx->aiColumn[i]].zName : "oid";
86670 tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
86730 zFrom = pFKey->pFrom->zName;
86911 sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite)?1:0, pTab->zName);
86914 VdbeComment((v, "%s", pTab->zName));
87123 sqlite3VdbeAddOp4(v, OP_String8, 0, memId-1, 0, p->pTab->zName, 0);
87368 zTab = pTabList->a[0].zName;
87377 zDb = pDb->zName;
87378 if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){
87597 if( sqlite3StrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){
87606 if( sqlite3IsRowid(pColumn->a[i].zName) ){
87610 pTabList, 0, pColumn->a[i].zName);
88075 pTab->zName, pTab->aCol[i].zName);
88255 char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
88352 sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
88385 VdbeComment((v, "%s", pIdx->zName));
88570 pSrc = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
88686 sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
88698 VdbeComment((v, "%s", pSrcIdx->zName));
88702 VdbeComment((v, "%s", pDestIdx->zName));
88935 int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
90127 const char *zName; /* Name of the pragma */
90167 if( sqlite3StrICmp(zLeft, p->zName)==0 ){
90174 returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 );
90209 const char *zName;
90211 case OE_SetNull: zName = "SET NULL"; break;
90212 case OE_SetDflt: zName = "SET DEFAULT"; break;
90213 case OE_Cascade: zName = "CASCADE"; break;
90214 case OE_Restrict: zName = "RESTRICT"; break;
90215 default: zName = "NO ACTION";
90218 return zName;
90303 zDb = pId2->n>0 ? pDb->zName : 0;
90847 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pCol->zName, 0);
90880 sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pTab->aCol[cnum].zName, 0);
90903 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
90923 assert( db->aDb[i].zName!=0 );
90925 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, db->aDb[i].zName, 0);
90942 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pColl->zName, 0);
90979 pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
91099 sqlite3MPrintf(db, "*** in database %s ***\n", db->aDb[i].zName),
91142 sqlite3VdbeChangeP4(v, addr+4, pIdx->zName, P4_TRANSIENT);
91172 sqlite3VdbeChangeP4(v, addr+7, pIdx->zName, P4_TRANSIENT);
91208 char *zName;
91230 sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
91242 for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
91243 if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
91248 if( !pEnc->zName ){
91412 if( db->aDb[i].zName==0 ) continue;
91413 sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, db->aDb[i].zName, P4_STATIC);
91417 }else if( sqlite3_file_control(db, i ? db->aDb[i].zName : 0,
91598 pIndex = sqlite3FindIndex(db, argv[0], db->aDb[iDb].zName);
91690 pTab = sqlite3FindTable(db, zMasterName, db->aDb[iDb].zName);
91806 db->aDb[iDb].zName, zMasterName);
92062 const char *zDb = db->aDb[i].zName;
92536 if( sqlite3StrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;
92696 char *zName; /* Name of column in the right table */
92700 zName = pRightTab->aCol[j].zName;
92701 if( tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol) ){
92735 char *zName; /* Name of the term in the USING clause */
92740 zName = pList->a[j].zName;
92741 iRightCol = columnIndex(pRightTab, zName);
92743 || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol)
92746 "not present in both tables", zName);
93432 zOriginCol = pTab->aCol[iCol].zName;
93434 zOriginTab = pTab->zName;
93437 zOriginDb = pNC->pParse->db->aDb[iDb].zName;
93540 if( pEList->a[i].zName ){
93541 char *zName = pEList->a[i].zName;
93542 sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);
93557 zCol = pTab->aCol[iCol].zName;
93563 char *zName = 0;
93564 zName = sqlite3MPrintf(db, "%s.%s", pTab->zName, zCol);
93565 sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);
93602 char *zName; /* Column name */
93603 int nName; /* Size of name in zName[] */
93614 if( (zName = pEList->a[i].zName)!=0 ){
93616 zName = sqlite3DbStrDup(db, zName);
93626 zName = sqlite3MPrintf(db, "%s",
93627 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
93630 zName = sqlite3MPrintf(db, "%s", pColExpr->u.zToken);
93633 zName = sqlite3MPrintf(db, "%s", pEList->a[i].zSpan);
93637 sqlite3DbFree(db, zName);
93644 nName = sqlite3Strlen30(zName);
93646 if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
93648 zName[nName] = 0;
93649 zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
93650 sqlite3DbFree(db, zName);
93651 zName = zNewName;
93653 if( zName==0 ) break;
93656 pCol->zName = zName;
93660 sqlite3DbFree(db, aCol[j].zName);
93709 pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
93738 pTab->zName = 0;
95175 pParse->zAuthContext = pSubitem->zName;
95246 sqlite3DbFree(db, pSubitem->zName);
95249 pSubitem->zName = 0;
95350 if( pList->a[i].zName==0 ){
95353 pList->a[i].zName = sqlite3DbStrDup(db, zSpan);
95492 pIdx && sqlite3StrICmp(pIdx->zName, zIndex);
95564 if( pFrom->zName==0 ){
95574 pTab->zName = sqlite3MPrintf(db, "sqlite_subquery_%p_", (void*)pTab);
95585 sqlite3LocateTable(pParse,0,pFrom->zName,pFrom->zDatabase);
95648 pNew->a[pNew->nExpr-1].zName = a[k].zName;
95650 a[k].zName = 0;
95670 zTabName = pTab->zName;
95679 char *zName = pTab->aCol[j].zName;
95695 && tableAndColumnIndex(pTabList, i, zName, 0, 0)
95701 if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
95707 pRight = sqlite3Expr(db, TK_ID, zName);
95708 zColname = zName;
95715 zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
96007 pTab->zName,
96009 pIdx ? pIdx->zName : "",
96189 VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
96203 VdbeComment((v, "end %s", pItem->pTab->zName));
96698 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
96895 }else if( pItem->zName ){
96896 sqlite3DebugPrintf("%s", pItem->zName);
96899 sqlite3DebugPrintf("(table: %s)", pItem->pTab->zName);
97195 && 0==sqlite3StrICmp(pTrig->table, pTab->zName)
97228 char *zName = 0; /* Name of the trigger */
97312 zName = sqlite3NameFromToken(db, pName);
97313 if( !zName || SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
97318 zName, sqlite3Strlen30(zName)) ){
97329 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
97353 const char *zDb = db->aDb[iTabDb].zName;
97354 const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
97356 if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
97377 pTrigger->zName = zName;
97378 zName = 0;
97379 pTrigger->table = sqlite3DbStrDup(db, pTableName->a[0].zName);
97390 sqlite3DbFree(db, zName);
97411 char *zName; /* Name of trigger */
97419 zName = pTrig->zName;
97426 nameToken.z = pTrig->zName;
97447 db->aDb[iDb].zName, SCHEMA_TABLE(iDb), zName,
97452 sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName));
97459 pTrig = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), pTrig);
97608 sqlite3DbFree(db, pTrigger->zName);
97627 const char *zName;
97638 zName = pName->a[0].zName;
97639 nName = sqlite3Strlen30(zName);
97643 if( zDb && sqlite3StrICmp(db->aDb[j].zName, zDb) ) continue;
97645 pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName, nName);
97690 const char *zDb = db->aDb[iDb].zName;
97693 if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
97720 sqlite3VdbeChangeP4(v, base+1, pTrigger->zName, P4_TRANSIENT);
97724 sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
97734 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
97740 pTrigger = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), 0);
97766 if( sqlite3IdListIndex(pIdList, pEList->a[e].zName)>=0 ) return 1;
97828 pSrc->a[pSrc->nSrc-1].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
97964 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
97991 pSubParse->zAuthContext = pTrigger->zName;
97998 pTrigger->zName, onErrorText(orconf),
98003 pTab->zName
98007 sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
98033 VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
98069 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
98110 int bRecursive = (p->zName && 0==(pParse->db->flags&SQLITE_RecTriggers));
98115 (v, "Call: %s.%s", (p->zName?p->zName:"fkey"), onErrorText(orconf)));
98326 VdbeComment((v, "%s.%s", pTab->zName, pCol->zName));
98459 if( sqlite3StrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){
98469 if( sqlite3IsRowid(pChanges->a[i].zName) ){
98473 sqlite3ErrorMsg(pParse, "no such column: %s", pChanges->a[i].zName);
98481 rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,
98482 pTab->aCol[j].zName, db->aDb[iDb].zName);
98551 sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
98890 pExpr = sqlite3Expr(db, TK_ID, pTab->aCol[i].zName);
99085 assert( strcmp(pDb->zName,"vacuum_db")==0 );
99313 const char *zName, /* Name assigned to this module */
99322 nName = sqlite3Strlen30(zName);
99327 memcpy(zCopy, zName, nName+1);
99328 pMod->zName = zCopy;
99355 const char *zName, /* Name assigned to this module */
99359 return createModule(db, zName, pModule, pAux, 0);
99367 const char *zName, /* Name assigned to this module */
99372 return createModule(db, zName, pModule, pAux, xDestroy);
99576 addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
99577 addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
99587 sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName,
99588 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
99651 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
99652 pTab->zName,
99653 pTab->zName,
99662 zWhere = sqlite3MPrintf(db, "name='%q' AND type='table'", pTab->zName);
99665 pTab->zName, sqlite3Strlen30(pTab->zName) + 1);
99676 const char *zName = pTab->zName;
99677 int nName = sqlite3Strlen30(zName);
99679 pOld = sqlite3HashInsert(&pSchema->tblHash, zName, nName, pTab);
99732 char *zModuleName = sqlite3MPrintf(db, "%s", pTab->zName);
99771 *pzErr = sqlite3MPrintf(db, zFormat, pTab->zName);
99903 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
100005 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
100239 zLowerName = sqlite3DbStrDup(db, pDef->zName);
100254 + sqlite3Strlen30(pDef->zName) + 1);
100259 pNew->zName = (char *)&pNew[1];
100260 memcpy(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
100959 if( pColl && sqlite3StrICmp(pColl->zName, pIdx->azColl[j]) ) continue;
101781 if( ALWAYS(pColl) && 0==sqlite3StrICmp(pColl->zName, zColl) ){
101813 if( pIdx->zName==0 || pDistinct==0 || pDistinct->nExpr>=BMS ) return 0;
101956 assert( pIdx->zName || (pIdx->nColumn==1 && pIdx->aiColumn[0]==-1) );
101984 if( pIdx->zName && i<pIdx->nColumn ){
101994 zColl = pColl->zName;
101996 if( pExpr->iColumn!=iColumn || sqlite3StrICmp(pColl->zName, zColl) ){
102404 pIdx->zName = "auto-index";
102418 pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : "BINARY";
102448 VdbeComment((v, "for %s", pTable->zName));
102487 WHERETRACE(("Recomputing index info for %s...\n", pSrc->pTab->zName));
102592 WHERETRACE(("xBestIndex for %s\n", pTab->zName));
102612 "table %s: xBestIndex returned an invalid plan", pTab->zName);
103619 pSrc->pTab->zName, (pIdx ? pIdx->zName : "ipk"),
103665 pCost->plan.u.pIdx ? pCost->plan.u.pIdx->zName : "ipk")
104017 explainAppendTerm(&txt, i, aCol[aiColumn[i]].zName, "=");
104022 explainAppendTerm(&txt, i++, aCol[aiColumn[j]].zName, ">");
104025 explainAppendTerm(&txt, i, aCol[aiColumn[j]].zName, "<");
104065 zMsg = sqlite3MAppendf(db, zMsg, "%s TABLE %s", zMsg, pItem->zName);
104077 ((flags & WHERE_TEMP_INDEX)?"": pLevel->plan.u.pIdx->zName),
105240 sqlite3ErrorMsg(pParse, "cannot use index: %s", pIdx->zName);
105313 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
105328 VdbeComment((v, "%s", pIx->zName));
105361 if( z==0 ) z = pTabItem->pTab->zName;
105379 n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
105381 memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
111357 const char *zName,
111360 int nName = sqlite3Strlen30(zName);
111363 if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){
111364 sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8,
111768 ** Create a new collating function for database "db". The name is zName
111773 const char *zName,
111782 int nName = sqlite3Strlen30(zName);
111804 pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 0);
111820 CollSeq *aColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
111834 pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 1);
112346 db->aDb[0].zName = "main";
112348 db->aDb[1].zName = "temp";
112501 const char *zName,
112509 rc = createCollation(db, zName, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, 0);
112520 const char *zName,
112529 rc = createCollation(db, zName, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, xDel);
112541 const void *zName,
112550 zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE);
112717 if( 0==sqlite3StrICmp(pCol->zName, zColumnName) ){
112815 if( strcmp(db->aDb[iDb].zName, zDbName)==0 ) break;
114181 const char *zName; /* virtual table name */
114732 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_content'", p->zDb, p->zName);
114733 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segments'", p->zDb,p->zName);
114734 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segdir'", p->zDb, p->zName);
114735 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_docsize'", p->zDb, p->zName);
114736 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_stat'", p->zDb, p->zName);
114772 "CREATE TABLE x(%s %Q HIDDEN, docid HIDDEN)", zCols, p->zName
114812 p->zDb, p->zName, zContentCols
114818 p->zDb, p->zName
114830 p->zDb, p->zName
114835 p->zDb, p->zName
114841 p->zDb, p->zName
115310 nName + /* zName */
115338 /* Fill in the zName and zDb fields of the vtab structure. */
115340 p->zName = zCsr;
116935 zSql = sqlite3_mprintf(zTmpl, p->zReadExprlist, p->zDb, p->zName, zSort);
116938 zSql = sqlite3_mprintf(zTmpl, p->zReadExprlist, p->zDb, p->zName);
117253 const char *zName, /* Name of SQL function */
117258 const char *zName;
117273 if( strcmp(zName, aOverload[i].zName)==0 ){
117288 const char *zName /* New name of table */
117301 p->zDb, p->zName, zName
117306 p->zDb, p->zName, zName
117312 p->zDb, p->zName, zName
117317 p->zDb, p->zName, zName
117321 p->zDb, p->zName, zName
119158 p->pFts3Tab->zName = &p->pFts3Tab->zDb[nDb+1];
119163 memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
119164 sqlite3Fts3Dequote((char *)p->pFts3Tab->zName);
120329 const char *zName,
120342 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
121593 const unsigned char *zName;
121600 zName = sqlite3_value_text(argv[0]);
121611 pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
121617 pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
121619 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
121781 const char *zName;
121799 zName = (const char *)sqlite3_value_text(argv[0]);
121808 p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
121811 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
121860 char *zName,
121872 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
121882 char *zName,
121895 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
121974 ** The third argument to this function, zName, is used as the name
121980 const char *zName
121990 zTest = sqlite3_mprintf("%s_test", zName);
121991 zTest2 = sqlite3_mprintf("%s_internal_test", zName);
121998 rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
122001 rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
122558 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName, p->zWriteExprlist);
122560 zSql = sqlite3_mprintf(azSql[eStmt], p->zReadExprlist, p->zDb, p->zName);
122562 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName);
123249 p->zSegmentsTbl = sqlite3_mprintf("%s_segments", p->zName);
127180 char *zName; /* Name of r-tree table */
127811 pRtree->zDb, pRtree->zName,
127812 pRtree->zDb, pRtree->zName,
127813 pRtree->zDb, pRtree->zName
129869 , pRtree->zDb, pRtree->zName, zNewName
129870 , pRtree->zDb, pRtree->zName, zNewName
129871 , pRtree->zDb, pRtree->zName, zNewName
130035 pRtree->zDb, pRtree->zName
130093 pRtree->zName = &pRtree->zDb[nDb+1];
130098 memcpy(pRtree->zName, argv[2], nName);
130517 const char *zName, /* Name of ICU function that failed */
130521 sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
130730 const char *zName; /* SQL Collation sequence name (eg. "japanese") */
130736 zName = (const char *)sqlite3_value_text(apArg[1]);
130738 if( !zLocale || !zName ){
130749 rc = sqlite3_create_collation_v2(db, zName, SQLITE_UTF16, (void *)pUCollator,
130763 const char *zName; /* Function name */
130793 db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0