Lines Matching defs:zSql
2707 const char *zSql, /* SQL to be evaluated */
3600 ** The second argument, "zSql", is the statement to be compiled, encoded
3605 ** ^If the nByte argument is less than zero, then zSql is read up to the
3607 ** number of bytes read from zSql. ^When nByte is non-negative, the
3608 ** zSql string ends at either the first '\000' or '\u0000' character or
3617 ** past the end of the first SQL statement in zSql. These routines only
3618 ** compile the first statement in zSql, so *pzTail is left pointing to
3673 const char *zSql, /* SQL statement, UTF-8 encoded */
3674 int nByte, /* Maximum length of zSql in bytes. */
3676 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3680 const char *zSql, /* SQL statement, UTF-8 encoded */
3681 int nByte, /* Maximum length of zSql in bytes. */
3683 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3687 const void *zSql, /* SQL statement, UTF-16 encoded */
3688 int nByte, /* Maximum length of zSql in bytes. */
3690 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3694 const void *zSql, /* SQL statement, UTF-16 encoded */
3695 int nByte, /* Maximum length of zSql in bytes. */
3697 const void **pzTail /* OUT: Pointer to unused portion of zSql */
13596 char *zSql; /* Text of the SQL statement that generated this */
59995 assert( p->zSql==0 );
59996 p->zSql = sqlite3DbStrNDup(p->db, z, n);
60005 return (p && p->isPrepareV2) ? p->zSql : 0;
60023 zTmp = pA->zSql;
60024 pA->zSql = pB->zSql;
60025 pB->zSql = zTmp;
62270 if( sqlite3GlobalConfig.xSqllog && v->rc==SQLITE_OK && v->zSql && v->pc>=0 ){
62271 char *zExpanded = sqlite3VdbeExpandSql(v, v->zSql);
62416 sqlite3DbFree(db, p->zSql);
63615 if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){
63618 db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000);
64186 "bind on a busy prepared statement: [%s]", p->zSql);
64527 ** zSql is a zero-terminated string of UTF-8 SQL text. Return the number of
64532 static int findNextHostParameter(const char *zSql, int *pnToken){
64538 while( zSql[0] ){
64539 n = sqlite3GetToken((u8*)zSql, &tokenType);
64546 zSql += n;
65771 char *zSql;
66177 sqlite3_log(pOp->p1, "abort at %d in [%s]: %s", pc, p->zSql, pOp->p4.z);
66180 sqlite3_log(pOp->p1, "constraint failed at %d in [%s]", pc, p->zSql);
70278 char *zSql;
70300 u.bz.zSql = sqlite3MPrintf(db,
70303 if( u.bz.zSql==0 ){
70310 rc = sqlite3_exec(db, u.bz.zSql, sqlite3InitCallback, &u.bz.initData, 0);
70312 sqlite3DbFree(db, u.bz.zSql);
71565 && (u.cs.zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
71573 && (u.cs.zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
71649 pc, p->zSql, p->zErrMsg);
79457 unsigned char const *zSql = sqlite3_value_text(argv[0]);
79462 unsigned char const *zCsr = zSql;
79474 if( zSql ){
79495 zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql,
79577 unsigned char const *zSql = sqlite3_value_text(argv[0]);
79583 unsigned char const *zCsr = zSql;
79595 if( zSql ){
79634 zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql,
81171 char *zSql; /* Text of the SQL statement */
81182 zSql = sqlite3MPrintf(db,
81185 if( !zSql ){
81188 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
81189 sqlite3DbFree(db, zSql);
81215 zSql = sqlite3MPrintf(db,
81217 if( !zSql ){
81220 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
81221 sqlite3DbFree(db, zSql);
81315 char *zSql;
81340 zSql = sqlite3MPrintf(db,
81342 if( zSql==0 ){
81345 rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0);
81346 sqlite3DbFree(db, zSql);
82413 char *zSql;
82422 zSql = sqlite3VMPrintf(db, zFormat, ap);
82424 if( zSql==0 ){
82430 sqlite3RunParser(pParse, zSql, &zErrMsg);
82432 sqlite3DbFree(db, zSql);
92046 const char *zSql, /* The SQL to be executed */
92058 if( zSql==0 ) zSql = "";
92062 while( rc==SQLITE_OK && zSql[0] ){
92067 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);
92074 zSql = zLeftover;
92124 zSql = zLeftover;
92125 while( sqlite3Isspace(zSql[0]) ) zSql++;
95527 char *zSql;
95528 zSql = sqlite3MPrintf(db,
95537 rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);
95543 sqlite3DbFree(db, zSql);
95730 ** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
95734 const char *zSql, /* UTF-8 encoded SQL statement. */
95735 int nBytes, /* Length of zSql in bytes. */
95798 if( nBytes>=0 && (nBytes==0 || zSql[nBytes-1]!=0) ){
95808 zSqlCopy = sqlite3DbStrNDup(db, zSql, nBytes);
95812 pParse->zTail = &zSql[pParse->zTail-zSqlCopy];
95814 pParse->zTail = &zSql[nBytes];
95817 sqlite3RunParser(pParse, zSql, &zErrMsg);
95861 sqlite3VdbeSetSql(pVdbe, zSql, (int)(pParse->zTail-zSql), saveSqlFlag);
95893 const char *zSql, /* UTF-8 encoded SQL statement. */
95894 int nBytes, /* Length of zSql in bytes. */
95908 rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
95911 rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
95930 const char *zSql;
95934 zSql = sqlite3_sql((sqlite3_stmt *)p);
95935 assert( zSql!=0 ); /* Reprepare only called for prepare_v2() statements */
95938 rc = sqlite3LockAndPrepare(db, zSql, -1, 0, p, &pNew, 0);
95966 const char *zSql, /* UTF-8 encoded SQL statement. */
95967 int nBytes, /* Length of zSql in bytes. */
95972 rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
95978 const char *zSql, /* UTF-8 encoded SQL statement. */
95979 int nBytes, /* Length of zSql in bytes. */
95984 rc = sqlite3LockAndPrepare(db,zSql,nBytes,1,0,ppStmt,pzTail);
95992 ** Compile the UTF-16 encoded SQL statement zSql into a statement handle.
95996 const void *zSql, /* UTF-16 encoded SQL statement. */
95997 int nBytes, /* Length of zSql in bytes. */
96016 zSql8 = sqlite3Utf16to8(db, zSql, nBytes, SQLITE_UTF16NATIVE);
96028 *pzTail = (u8 *)zSql + sqlite3Utf16ByteLen(zSql, chars_parsed);
96046 const void *zSql, /* UTF-16 encoded SQL statement. */
96047 int nBytes, /* Length of zSql in bytes. */
96052 rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
96058 const void *zSql, /* UTF-16 encoded SQL statement. */
96059 int nBytes, /* Length of zSql in bytes. */
96064 rc = sqlite3Prepare16(db,zSql,nBytes,1,ppStmt,pzTail);
101030 const char *zSql, /* The SQL to be executed */
101055 rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
102955 ** Execute zSql on database db. Return an error code.
102957 static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
102960 if( !zSql ){
102963 if( SQLITE_OK!=sqlite3_prepare(db, zSql, -1, &pStmt, 0) ){
102973 ** Execute zSql on database db. The statement returns exactly
102976 static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
102980 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
103020 char *zSql = 0; /* SQL statements */
103069 zSql = "ATTACH ':memory:' AS vacuum_db;";
103071 zSql = "ATTACH '' AS vacuum_db;";
103073 rc = execSql(db, pzErrMsg, zSql);
114267 SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
114283 pParse->zTail = zSql;
114298 while( !db->mallocFailed && zSql[i]!=0 ){
114300 pParse->sLastToken.z = &zSql[i];
114301 pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
114324 pParse->zTail = &zSql[i];
114338 if( zSql[i]==0 && nErr==0 && pParse->rc==SQLITE_OK ){
114341 pParse->zTail = &zSql[i];
114512 SQLITE_API int sqlite3_complete(const char *zSql){
114545 while( *zSql ){
114546 switch( *zSql ){
114560 if( zSql[1]!='*' ){
114564 zSql += 2;
114565 while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; }
114566 if( zSql[0]==0 ) return 0;
114567 zSql++;
114572 if( zSql[1]!='-' ){
114576 while( *zSql && *zSql!='\n' ){ zSql++; }
114577 if( *zSql==0 ) return state==1;
114582 zSql++;
114583 while( *zSql && *zSql!=']' ){ zSql++; }
114584 if( *zSql==0 ) return 0;
114591 int c = *zSql;
114592 zSql++;
114593 while( *zSql && *zSql!=c ){ zSql++; }
114594 if( *zSql==0 ) return 0;
114602 if( IdChar((u8)*zSql) ){
114605 for(nId=1; IdChar(zSql[nId]); nId++){}
114609 switch( *zSql ){
114611 if( nId==6 && sqlite3StrNICmp(zSql, "create", 6)==0 ){
114619 if( nId==7 && sqlite3StrNICmp(zSql, "trigger", 7)==0 ){
114621 }else if( nId==4 && sqlite3StrNICmp(zSql, "temp", 4)==0 ){
114623 }else if( nId==9 && sqlite3StrNICmp(zSql, "temporary", 9)==0 ){
114631 if( nId==3 && sqlite3StrNICmp(zSql, "end", 3)==0 ){
114635 if( nId==7 && sqlite3StrNICmp(zSql, "explain", 7)==0 ){
114650 zSql += nId-1;
114659 zSql++;
114670 SQLITE_API int sqlite3_complete16(const void *zSql){
114680 sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
119787 char *zSql;
119790 zSql = sqlite3_vmprintf(zFormat, ap);
119792 if( zSql==0 ){
119795 *pRc = sqlite3_exec(db, zSql, 0, 0, 0);
119796 sqlite3_free(zSql);
119839 char *zSql; /* SQL statement passed to declare_vtab() */
119853 zSql = sqlite3_mprintf(
119857 if( !zCols || !zSql ){
119860 rc = sqlite3_declare_vtab(p->db, zSql);
119863 sqlite3_free(zSql);
119958 char *zSql; /* SQL text "PRAGMA %Q.page_size" */
119961 zSql = sqlite3_mprintf("PRAGMA %Q.page_size", p->zDb);
119962 if( !zSql ){
119965 rc = sqlite3_prepare(p->db, zSql, -1, &pStmt, 0);
119976 sqlite3_free(zSql);
120283 char *zSql; /* "SELECT *" statement on zTbl */
120284 sqlite3_stmt *pStmt = 0; /* Compiled version of zSql */
120286 zSql = sqlite3_mprintf("SELECT * FROM %Q.%Q", zDb, zTbl);
120287 if( !zSql ){
120290 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
120292 sqlite3_free(zSql);
120841 char *zSql;
120842 zSql = sqlite3_mprintf("SELECT %s WHERE rowid = ?", p->zReadExprlist);
120843 if( !zSql ) return SQLITE_NOMEM;
120844 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pCsr->pStmt, 0);
120845 sqlite3_free(zSql);
122238 char *zSql; /* SQL statement used to access %_content */
122300 zSql = sqlite3_mprintf(
122304 if( zSql ){
122305 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pCsr->pStmt, 0);
122306 sqlite3_free(zSql);
126229 const char zSql[] = "SELECT fts3_tokenizer(?)";
126232 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
127783 const char zSql[] = "SELECT fts3_tokenizer(?, ?)";
127785 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
127805 const char zSql[] = "SELECT fts3_tokenizer(?)";
127808 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
129013 char *zSql;
129015 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName, p->zWriteExprlist);
129017 zSql = sqlite3_mprintf(azSql[eStmt], p->zReadExprlist);
129019 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName);
129021 if( !zSql ){
129024 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, NULL);
129025 sqlite3_free(zSql);
131911 char *zSql = sqlite3_mprintf("SELECT %s" , p->zReadExprlist);
131912 if( !zSql ){
131915 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
131916 sqlite3_free(zSql);
133556 char *zSql;
133558 zSql = sqlite3_mprintf("SELECT %s" , p->zReadExprlist);
133559 if( !zSql ){
133562 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
133563 sqlite3_free(zSql);
139226 char *zSql = sqlite3_mprintf(
139234 if( zSql ){
139235 rc = sqlite3_exec(pRtree->db, zSql, 0, 0, 0);
139236 sqlite3_free(zSql);
139327 char *zSql = sqlite3_mprintf(azSql[i], zDb, zPrefix);
139328 if( zSql ){
139329 rc = sqlite3_prepare_v2(db, zSql, -1, appStmt[i], 0);
139333 sqlite3_free(zSql);
139346 static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
139348 if( zSql ){
139350 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
139383 char *zSql;
139386 zSql = sqlite3_mprintf("PRAGMA %Q.page_size", pRtree->zDb);
139387 rc = getIntFromStmt(db, zSql, &iPageSize);
139397 zSql = sqlite3_mprintf(
139401 rc = getIntFromStmt(db, zSql, &pRtree->iNodeSize);
139407 sqlite3_free(zSql);
139478 char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]);
139481 for(ii=4; zSql && ii<argc; ii++){
139482 zTmp = zSql;
139483 zSql = sqlite3_mprintf("%s, %s", zTmp, argv[ii]);
139486 if( zSql ){
139487 zTmp = zSql;
139488 zSql = sqlite3_mprintf("%s);", zTmp);
139491 if( !zSql ){
139493 }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){
139496 sqlite3_free(zSql);