Home
last modified time | relevance | path

Searched refs:pParse (Results 1 – 17 of 17) sorted by relevance

/titanic_41/usr/src/lib/libsqlite/src/
H A Dauth.c90 static void sqliteAuthBadReturnCode(Parse *pParse, int rc){ in sqliteAuthBadReturnCode() argument
91 sqliteErrorMsg(pParse, "illegal return value (%d) from the " in sqliteAuthBadReturnCode()
94 pParse->rc = SQLITE_MISUSE; in sqliteAuthBadReturnCode()
107 Parse *pParse, /* The parser context */ in sqliteAuthRead() argument
111 sqlite *db = pParse->db; in sqliteAuthRead()
130 pStack = pParse->trigStack; in sqliteAuthRead()
148 pParse->zAuthContext); in sqliteAuthRead()
153 sqliteErrorMsg(pParse, "access to %s.%s.%s is prohibited", in sqliteAuthRead()
156 sqliteErrorMsg(pParse, "access to %s.%s is prohibited", pTab->zName,zCol); in sqliteAuthRead()
158 pParse->rc = SQLITE_AUTH; in sqliteAuthRead()
[all …]
H A Dtrigger.c45 Parse *pParse, /* The parse context of the CREATE TRIGGER statement */ in sqliteBeginTrigger() argument
58 sqlite *db = pParse->db; in sqliteBeginTrigger()
72 && sqliteFixInit(&sFix, pParse, db->init.iDb, "trigger", pName) in sqliteBeginTrigger()
77 tab = sqliteSrcListLookup(pParse, pTableName); in sqliteBeginTrigger()
83 sqliteErrorMsg(pParse, "triggers may not be added to auxiliary " in sqliteBeginTrigger()
91 sqliteErrorMsg(pParse, "trigger %T already exists", pName); in sqliteBeginTrigger()
95 sqliteErrorMsg(pParse, "cannot create trigger on system table"); in sqliteBeginTrigger()
96 pParse->nErr++; in sqliteBeginTrigger()
100 sqliteErrorMsg(pParse, "cannot create %s trigger on view: %S", in sqliteBeginTrigger()
105 sqliteErrorMsg(pParse, "cannot create INSTEAD OF" in sqliteBeginTrigger()
[all …]
H A Dbuild.c40 void sqliteBeginParse(Parse *pParse, int explainFlag){ in sqliteBeginParse() argument
41 sqlite *db = pParse->db; in sqliteBeginParse()
43 pParse->explain = explainFlag; in sqliteBeginParse()
45 int rc = sqliteInit(db, &pParse->zErrMsg); in sqliteBeginParse()
47 pParse->rc = rc; in sqliteBeginParse()
48 pParse->nErr++; in sqliteBeginParse()
57 pParse->nVar = 0; in sqliteBeginParse()
70 void sqliteExec(Parse *pParse){ in sqliteExec() argument
71 sqlite *db = pParse->db; in sqliteExec()
72 Vdbe *v = pParse->pVdbe; in sqliteExec()
[all …]
H A Dtokenize.c401 int sqliteRunParser(Parse *pParse, const char *zSql, char **pzErrMsg){ in sqliteRunParser() argument
407 sqlite *db = pParse->db; in sqliteRunParser()
413 pParse->rc = SQLITE_OK; in sqliteRunParser()
420 pParse->sLastToken.dyn = 0; in sqliteRunParser()
421 pParse->zTail = zSql; in sqliteRunParser()
424 pParse->sLastToken.z = &zSql[i]; in sqliteRunParser()
425 assert( pParse->sLastToken.dyn==0 ); in sqliteRunParser()
426 pParse->sLastToken.n = sqliteGetToken((unsigned char*)&zSql[i], &tokenType); in sqliteRunParser()
427 i += pParse->sLastToken.n; in sqliteRunParser()
432 pParse->rc = SQLITE_INTERRUPT; in sqliteRunParser()
[all …]
H A Ddelete.c27 Table *sqliteSrcListLookup(Parse *pParse, SrcList *pSrc){ in sqliteSrcListLookup() argument
33 pTab = sqliteLocateTable(pParse, zTab, zDb); in sqliteSrcListLookup()
44 int sqliteIsReadOnly(Parse *pParse, Table *pTab, int viewOk){ in sqliteIsReadOnly() argument
46 sqliteErrorMsg(pParse, "table %s may not be modified", pTab->zName); in sqliteIsReadOnly()
50 sqliteErrorMsg(pParse, "cannot modify %s because it is a view",pTab->zName); in sqliteIsReadOnly()
60 Parse *pParse, /* The parser context */ in sqliteDeleteFrom() argument
81 sContext.pParse = 0; in sqliteDeleteFrom()
82 if( pParse->nErr || sqlite_malloc_failed ){ in sqliteDeleteFrom()
86 db = pParse->db; in sqliteDeleteFrom()
94 pTab = sqliteSrcListLookup(pParse, pTabList); in sqliteDeleteFrom()
[all …]
H A Dupdate.c30 Parse *pParse, /* The parser context */ in sqliteUpdate() argument
66 sContext.pParse = 0; in sqliteUpdate()
67 if( pParse->nErr || sqlite_malloc_failed ) goto update_cleanup; in sqliteUpdate()
68 db = pParse->db; in sqliteUpdate()
70 iStackDepth = pParse->nMem++; in sqliteUpdate()
74 pTab = sqliteSrcListLookup(pParse, pTabList); in sqliteUpdate()
76 before_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, in sqliteUpdate()
78 after_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, in sqliteUpdate()
82 if( sqliteIsReadOnly(pParse, pTab, before_triggers) ){ in sqliteUpdate()
86 if( sqliteViewGetColumnNames(pParse, pTab) ){ in sqliteUpdate()
[all …]
H A Dexpr.c413 Parse *pParse, /* The parsing context */ in lookupName() argument
427 sqlite *db = pParse->db; /* The database */ in lookupName()
490 if( zDb==0 && zTab!=0 && cnt==0 && pParse->trigStack!=0 ){ in lookupName()
491 TriggerStack *pTriggerStack = pParse->trigStack; in lookupName()
583 sqliteErrorMsg(pParse, zErr, z); in lookupName()
597 sqliteAuthRead(pParse, pExpr, pSrcList); in lookupName()
633 Parse *pParse, /* The parser context */ in sqliteExprResolveIds() argument
642 assert( pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab ); in sqliteExprResolveIds()
656 if( lookupName(pParse, 0, 0, &pExpr->token, pSrcList, pEList, pExpr) ){ in sqliteExprResolveIds()
682 if( lookupName(pParse, pDb, pTable, pColumn, pSrcList, 0, pExpr) ){ in sqliteExprResolveIds()
[all …]
H A Dattach.c29 void sqliteAttach(Parse *pParse, Token *pFilename, Token *pDbname, Token *pKey){ in sqliteAttach() argument
36 v = sqliteGetVdbe(pParse); in sqliteAttach()
38 if( pParse->explain ) return; in sqliteAttach()
39 db = pParse->db; in sqliteAttach()
41 sqliteErrorMsg(pParse, "cannot attach auxiliary databases to an " in sqliteAttach()
43 pParse->rc = SQLITE_ERROR; in sqliteAttach()
47 sqliteErrorMsg(pParse, "too many attached databases - max %d", in sqliteAttach()
49 pParse->rc = SQLITE_ERROR; in sqliteAttach()
58 if( sqliteAuthCheck(pParse, SQLITE_ATTACH, zFile, 0, 0)!=SQLITE_OK ){ in sqliteAttach()
70 sqliteErrorMsg(pParse, "database %z is already in use", zName); in sqliteAttach()
[all …]
H A Dselect.c83 int sqliteJoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){ in sqliteJoinType() argument
126 sqliteSetNString(&pParse->zErrMsg, "unknown or unsupported join type: ", 0, in sqliteJoinType()
128 pParse->nErr++; in sqliteJoinType()
131 sqliteErrorMsg(pParse, in sqliteJoinType()
212 static int sqliteProcessJoin(Parse *pParse, Select *p){ in sqliteProcessJoin() argument
228 sqliteErrorMsg(pParse, "a NATURAL join may not have " in sqliteProcessJoin()
243 sqliteErrorMsg(pParse, "cannot have both ON and USING " in sqliteProcessJoin()
276 sqliteErrorMsg(pParse, "cannot join using column %s - column " in sqliteProcessJoin()
306 static void sqliteAggregateInfoReset(Parse *pParse){ in sqliteAggregateInfoReset() argument
307 sqliteFree(pParse->aAgg); in sqliteAggregateInfoReset()
[all …]
H A Dinsert.c90 Parse *pParse, /* Parser context */ in sqliteInsert() argument
122 if( pParse->nErr || sqlite_malloc_failed ) goto insert_cleanup; in sqliteInsert()
123 db = pParse->db; in sqliteInsert()
130 pTab = sqliteSrcListLookup(pParse, pTabList); in sqliteInsert()
136 if( sqliteAuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){ in sqliteInsert()
144 before_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, TK_INSERT, in sqliteInsert()
146 after_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, TK_INSERT, in sqliteInsert()
150 if( sqliteIsReadOnly(pParse, pTab, before_triggers) ){ in sqliteInsert()
157 if( isView && sqliteViewGetColumnNames(pParse, pTab) ){ in sqliteInsert()
163 v = sqliteGetVdbe(pParse); in sqliteInsert()
[all …]
H A Dcopy.c33 Parse *pParse, /* The parser context */ in sqliteCopy() argument
45 sqlite *db = pParse->db; in sqliteCopy()
50 pTab = sqliteSrcListLookup(pParse, pTableName); in sqliteCopy()
51 if( pTab==0 || sqliteIsReadOnly(pParse, pTab, 0) ) goto copy_cleanup; in sqliteCopy()
56 if( sqliteAuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) in sqliteCopy()
57 || sqliteAuthCheck(pParse, SQLITE_COPY, pTab->zName, zFile, zDb) ){ in sqliteCopy()
60 v = sqliteGetVdbe(pParse); in sqliteCopy()
62 sqliteBeginWriteOperation(pParse, 1, pTab->iDb); in sqliteCopy()
65 sqliteOpenTableAndIndices(pParse, pTab, 0); in sqliteCopy()
92 sqliteGenerateConstraintChecks(pParse, pTab, 0, 0, pTab->iPKey>=0, in sqliteCopy()
[all …]
H A Dparse.y22 %extra_argument {Parse *pParse}
24 if( pParse->zErrMsg==0 ){
26 sqliteErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
28 sqliteErrorMsg(pParse, "incomplete SQL statement");
75 cmdx ::= cmd. { sqliteExec(pParse); }
76 explain ::= EXPLAIN. { sqliteBeginParse(pParse, 1); }
77 explain ::= . { sqliteBeginParse(pParse, 0); }
82 cmd ::= BEGIN trans_opt onconf(R). {sqliteBeginTransaction(pParse,R);} in onconf()
86 cmd ::= COMMIT trans_opt. {sqliteCommitTransaction(pParse);}
87 cmd ::= END trans_opt. {sqliteCommitTransaction(pParse);}
[all …]
H A Dwhere.c384 Parse *pParse, /* The parser context */ in sqliteWhereBegin() argument
392 Vdbe *v = pParse->pVdbe; /* The virtual database engine */ in sqliteWhereBegin()
417 sqliteErrorMsg(pParse, "WHERE clause too complex - no more " in sqliteWhereBegin()
430 pWInfo->pParse = pParse; in sqliteWhereBegin()
432 pWInfo->peakNTab = pWInfo->savedNTab = pParse->nTab; in sqliteWhereBegin()
439 sqliteExprIfFalse(pParse, pWhere, pWInfo->iBreak, 1); in sqliteWhereBegin()
451 if( pParse->trigStack ){ in sqliteWhereBegin()
453 if( (x = pParse->trigStack->newIdx) >= 0 ){ in sqliteWhereBegin()
459 if( (x = pParse->trigStack->oldIdx) >= 0 ){ in sqliteWhereBegin()
659 pWInfo->a[i].iCur = pParse->nTab++; in sqliteWhereBegin()
[all …]
H A Dpragma.c94 static int changeTempStorage(Parse *pParse, const char *zStorageType){ in changeTempStorage() argument
96 sqlite *db = pParse->db; in changeTempStorage()
100 sqliteErrorMsg(pParse, "temporary storage cannot be changed " in changeTempStorage()
117 static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ in flagPragma() argument
132 sqlite *db = pParse->db; in flagPragma()
134 if( strcmp(zLeft,zRight)==0 && (v = sqliteGetVdbe(pParse))!=0 ){ in flagPragma()
162 void sqlitePragma(Parse *pParse, Token *pLeft, Token *pRight, int minusFlag){ in sqlitePragma() argument
165 sqlite *db = pParse->db; in sqlitePragma()
166 Vdbe *v = sqliteGetVdbe(pParse); in sqlitePragma()
178 if( sqliteAuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, 0) ){ in sqlitePragma()
[all …]
H A Dvacuum.c212 void sqliteVacuum(Parse *pParse, Token *pTableName){ in sqliteVacuum() argument
213 Vdbe *v = sqliteGetVdbe(pParse); in sqliteVacuum()
H A Dutil.c421 void sqliteErrorMsg(Parse *pParse, const char *zFormat, ...){ in sqliteErrorMsg() argument
423 pParse->nErr++; in sqliteErrorMsg()
424 sqliteFree(pParse->zErrMsg); in sqliteErrorMsg()
426 pParse->zErrMsg = sqliteVMPrintf(zFormat, ap); in sqliteErrorMsg()
H A DsqliteInt.h825 Parse *pParse; member
945 Parse *pParse; /* The Parse structure */ member
1085 Parse *pParse; /* The parsing context. Error messages written here */ member