Lines Matching defs:check

20 ** The content in this amalgamation comes from Fossil check-in
266 ** For MinGW, check to see if we can include the header file containing its
286 ** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T
451 ** a string which identifies a particular check-in of SQLite
453 ** string contains the date and time of the check-in (UTC) and a SHA1
2115 ** should check the return code from [sqlite3_config()] to make sure that
2497 ** should check the return code from [sqlite3_db_config()] to make sure that
4071 ** that check if a database file was a URI that contained a specific query
5636 ** applications check the return code from [sqlite3_reset(S)] even if
6631 ** check the return code and dispose of the application data pointer
8972 ** might be discontinued. Applications should check the return code from
9597 ** sqlite3_backup_finish(). SQLite does not currently check to see
9737 ** One way around this problem is to check the extended error code returned
11207 sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */
16304 sqlite3 *db, /* Database connection that is running the check */
17759 #define SQLITE_IgnoreChecks 0x00000200 /* Do not enforce check constraints */
18534 #define OE_None 0 /* There is no constraint to check */
19322 ** or all contexts are check. When a match is found, the nRef member of
19682 u8 bMaybeNullRow; /* True if we need an OP_IfNullRow check */
19723 u8 checkSchema; /* Causes schema cookie check after an error */
19746 ** of the base register during check-constraint eval */
20095 ** be used on trunk check-ins. They are a temporary mechanism available
20100 #define SQLITE_NTUNE 6 /* Should be zero for all trunk check-ins */
20122 u8 bJsonSelfcheck; /* Double-check JSON parsing */
24625 ** already, check for an MSVC build environment that provides
27434 ** size parameters for check-out and return a pointer to the
30978 ** Do the size check before the memory allocation to prevent rogue
32809 /* This only happens when coding check constraints */
39122 ** and check for locks already existing on that inode. When locks are
39171 ** One has to do a run-time check to discover the behavior of the
42404 ** Use F_GETLK to check whether or not there are any readers with open
44235 ** filename, check for the "modeof" parameter. If present, interpret
45559 /* for auto-named local lock file, just check the host ID and we'll
46243 /* Double-check that the aSyscall[] array has been constructed
51076 /* Figure out the effective temporary directory. First, check if one
51314 const char *zFilename, /* Name of file to check */
51755 const char *zFilename, /* Name of file to check */
52463 /* Double-check that the aSyscall[] array has been constructed
53644 /* there was a collision, check to see if it's already */
53652 /* available free spot. check to see if this is going to */
54246 ** The createFlags should be 0 to check for existing pages and should
55459 TESTONLY( nPage = -10; ) /* Disable the pCache->nPage validity check */
57148 ** omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK
57482 ** was obtained from /dev/random. It is used only as a sanity check.
58245 /* The random check-hash initializer */
59331 ** Open it and check if it points at the super-journal. If
61536 ** check for a hot-journal before reading.
61842 ** This routine does not check if there is a super-journal filename
61908 ** or greater lock on the database file. Now check that there is
62112 /* The shared-lock has just been acquired then check to
62943 ** making changes to a page. The caller must check the return value
64233 sqlite3 *db, /* Db handle used to check for interrupts */
65897 ** thing to check, so only do this occasionally - not on every
66235 ** value of 120, we need to know that so there is an assert() to check it.
67260 /* If the header is read successfully, check the version number to make
67741 /* Now that the read-lock has been obtained, check that neither the
67745 ** It is necessary to check that the wal-index header did not change
67956 ** not, also check that no checkpointer has attempted to checkpoint any
69814 /* A bunch of assert() statements to check the transaction state variables
69841 ** the database. As the integrity-check proceeds, for each page used in
69842 ** the database the corresponding bit is set. This allows integrity-check to
69851 Pgno nCkPage; /* Pages in the database. 0 for partial check */
69862 sqlite3 *db; /* Database connection running the check */
70383 ** not loaded, then it is too difficult to actually check to see if
70727 Btree *pBtree, /* The database file to check */
72105 ** pointer in the page header) then check to see if iStart should be
72287 ** of the page, then the page must be corrupted. This check also
72299 ** Do additional sanity check after btreeInitPage() if
74797 ** this lock. The iTable<1 term disables the check for corrupt schemas. */
78655 /* Sanity check: For a non-corrupt database file one of the following
79200 ** The purpose of the following assert() is to check that only a
79496 ** So do a complete check.
80586 ** Invoke the progress handler, if appropriate. Also check for an
80668 ** Also check that the page number is in bounds.
80690 IntegrityCk *pCheck, /* Integrity check context */
80764 ** page in this overflow list, check that the pointer-map entry for
80854 IntegrityCk *pCheck, /* Context for the sanity check */
80855 Pgno iPage, /* Page number of the page to check */
80948 /* For leaf pages, the coverage check will occur in the same loop
81114 ** This routine does a complete check of the given BTree file. aRoot[] is
81127 ** root pages is incomplete. This is a "partial integrity-check". This
81128 ** happens when performing an integrity check on a single table. The
81136 sqlite3 *db, /* Database connection that is running the check */
81154 /* aRoot[0]==0 means this is a partial check */
82117 ** no need to check the return values of the btree methods here, as
82383 ** Mem.z = Mem.zMalloc without having to check Mem.flags&MEM_Dyn.
83951 ** check ensures that an EP_TokenOnly expression is never passed down
84803 ** function call. NC_IsCheck means called by a check constraint,
85134 ** Then check that the value of Parse.mayAbort is true if an
86040 ** after an OOM fault without having to check to see if the return from
87511 ** This is an internal self-check only - it is not an essential processing
91806 ** will not bother to check for that condition.
96969 ** SQLite used to check if the root-page flags were sane at this point
96970 ** and report database corruption if they were not, but this check has
97841 ** record are not-NULL then a check is done to determine if any row in the
99709 ** If P5 is not zero, the check is done on the auxiliary database
99715 int nRoot; /* Number of tables to check. (Number of root pages.) */
100671 ** Also, whether or not P4 is set, check that this is not being called from
101215 ** When those function are used in a non-deterministic way, they will check
101946 /* If the value is being opened for writing, check that the
101955 ** is not necessary to check if it is part of a parent key, as parent
101956 ** key columns must be indexed. The check below will pick up this
108017 ** is correlated. It is not required to check the refcount on any
108154 /* If this is part of a compound SELECT, check that it has the right
110459 /* If the RHS is a vector, then we can immediately check to see that
110462 ** we can do the size check, so defer the size check until code generation.
110492 /* Remember the size of the LHS in iTable so that we can check that
110740 ** These routines are Walker callbacks used to check expressions to
110891 ** pSrc = &pSrcList->a[iSrc]. In other words, check to see if pExpr
111004 ** sequence as the GROUP BY term, but that is much harder to check,
111403 ** whether or not the SELECT result contains NULL values, check whether
112264 ** For a scalar LHS, it is sufficient to check just the first row
112798 ** must check the return code and move the results to the desired
114607 ** But it is difficult to check for that condition precisely.
114725 ** This routine is used to check if a LEFT JOIN can be converted into
115706 const char *zTab, /* Table to check for empty */
120285 SrcList *pList /* The Source list to check and modify */
120488 Expr *pExpr, /* The expression to check authorization on */
120538 ** Do an authorization check using the code and arguments given. Return
121069 ** CREATE, then check to see if it is the name of an virtual table that
121437 ** a Table object that was going to be marked ephemeral. So do not check
121650 ** This routine is used to check if the UTF-8 string zName is a legal
121662 const char *zName, /* Name of the object to check */
122525 Expr *pCheckExpr, /* The check expression */
124597 /* If the index name was unqualified, check if the table
124923 ** Either way, check to see if the table already has such an index. If
126393 ** check that it is defined. An undefined collation sequence exists when
128282 ** is essentially a back-out of the bug-fix in check-in [5fc125d362df4b8]
130855 /* If this is a non-composite (single column) foreign key, check if it
130904 ** index matches those columns. Also, check that the index uses
130997 /* If nIncr is less than zero, then check at runtime if there are any
130999 ** to check if deleting this row resolves any outstanding violations.
131032 ** then check if the row being inserted matches itself. If so, do not
131059 ** then check if the row being inserted matches itself. If so, do not
131600 ** before actually dropping it in order to check FK constraints.
133472 /* Generate code to check constraints and generate index keys and
133770 ** This routine also generates code to check constraints. NOT NULL,
133838 int upsertIpkReturn = 0; /* Address of Goto at end of IPK uniqueness check */
133839 int upsertIpkDelay = 0; /* Address of Goto to bypass initial IPK check */
133840 int ipkTop = 0; /* Top of the IPK uniqueness check */
133841 int ipkBottom = 0; /* OP_Goto at the end of the IPK uniqueness check */
133883 Column *pCol = &pTab->aCol[i]; /* The column to check for NOT NULL */
133896 /* Do not check NOT NULL on columns that do not change */
133990 /* The check constraints do not reference any of the columns being
133991 ** updated so there is no point it verifying the check constraint */
134193 && !upsertIpkDelay /* IPK check already deferred by UPSERT */
134210 VdbeNoopComment((v, "uniqueness check for ROWID"));
134312 int addrConflictCk; /* First opcode in the conflict check logic */
134514 int nConflictCk; /* Number of opcodes in conflict check logic */
134552 /* Copy the constraint check code from above, except change
134556 VdbeOp x; /* Conflict check opcode to copy */
134562 int p2; /* New P2 value for copied conflict check opcode */
135005 ** we have to check the semantics.
136305 ** also check to make sure that the pointer to the function is
136443 ** before calling APIs that follow, extension should check the
138539 ** file. Before writing to meta[6], check that meta[3] indicates
139095 /* If there is no index named zRight, check to see if there is a
139411 ** All schemas are checked by default. To check just a single
139452 /* Do an integrity check on each database file */
139466 /* Do an integrity check of the B-Tree
140996 /* If opening a non-empty database, check the text encoding. For the
141327 ** another way to check for early cleanup is to check the return value.
142142 int iStart, /* First member of pSrc->a[] to check */
142143 int iEnd, /* Last member of pSrc->a[] to check */
142640 ** Add code that will check to make sure the array of registers starting at
147443 SrcItem *pFrom /* The FROM clause term to check */
147679 int N /* How many SrcItems to check */
148738 ** Otherwise, return WRC_Prune. In this case, also check if the
149142 /* Clear the SF_UFSrcCheck flag. The check has already been performed,
150088 VdbeComment((v, "check abort flag"));
152151 Index *pIdx, /* The index to check */
152152 int iCol, /* Which column of the index to check */
152181 Index *pIdx, /* The index to check */
152586 ** generated expressions is not used, other than to check to see that it
152982 ** row data. This array is used to check constants, create the new
157326 ** to 0. The OP_Column opcode can check this array to see if the column it
157437 ** index lookup. The idea is that a Bloom filter check is way faster than
158169 /* Except, skip the end-of-range check while doing the NULL-scan */
158183 /* During a NULL-scan, check to see if we have reached the end of
159714 ** will correspond to the common table. We still need to check to make
160930 ** the aggregate-step call to min() or max(), check to see if any
161590 const WhereTerm *pTerm, /* WHERE clause term to check */
161620 const WhereTerm *pTerm, /* WHERE clause term to check */
162465 /* The following assert statements check that the binary search code
164273 ** to check them. But we do need to check any column at 63 or greater.
164345 /* We don't have access to the full query, so we cannot check to see
165511 ExprList *pOrderBy, /* ORDER BY or GROUP BY or DISTINCT clause to check */
165512 WherePath *pPath, /* The WherePath to check */
165678 ** check that it is the only column used by this loop. Otherwise,
169328 ** code to check that the value is a non-negative integer and throws an
170759 ** VM code to check if the input row is the start of a new partition.
178505 /* The following is just a sanity check to make sure SQLite has
179420 ** call will do so. We need to do this before the check for active
191729 /* If this is a "NEAR" keyword, check for an explicit nearness. */
192239 ** 2. It does not check that the expression does not exceed the
192323 /* Rebalance the expression. And check that its depth does not exceed
199820 /* If the hint read from the %_stat table is not empty, check if the
200233 ** Run the integrity-check. If no error occurs and the current contents of
200240 ** The integrity-check works as follows. For each token and indexed token
200255 ** The integrity-check code calculates the same checksum in two ways:
200260 ** If the two checksums are identical, the integrity-check is deemed to have
200292 }else if( nVal==15 && 0==sqlite3_strnicmp(zVal, "integrity-check", 15) ){
201483 /* Now that the shift has been done, check if the initial "..." are
205536 ** For performance reasons, this routine does not do a detailed check of the
207541 ** no errors occur, call that a "strict check". */
207585 ** If the argument is BLOB, do a full validity check and return non-zero
207586 ** if the check fails. The return value is the approximate 1-based offset
208385 jsonEachEof, /* xEof - check for end of scan */
208414 jsonEachEof, /* xEof - check for end of scan */
208616 /* Macro to check for 4-byte alignment. Only used inside of assert() */
209301 /* If no error has occurred so far, check if the "number of entries"
210752 /* First check to see if there is are any cells in pNode that completely
211660 /* If a rowid value was supplied, check if it is already present in
212315 ** implementation of integrity-check function rtreecheck().
212448 ** This function is used to check that the %_parent (if bLeaf==0) or %_rowid
212561 i64 iNode /* Node to check */
212641 ** This function does the bulk of the work for the rtree integrity-check.
212647 const char *zTab, /* Name of rtree table to check */
212650 RtreeCheck check; /* Common context for various routines */
212655 memset(&check, 0, sizeof(check));
212656 check.db = db;
212657 check.zDb = zDb;
212658 check.zTab = zTab;
212661 pStmt = rtreeCheckPrepare(&check, "SELECT * FROM %Q.'%q_rowid'", zDb, zTab);
212666 if( check.rc!=SQLITE_NOMEM ){
212667 check.rc = SQLITE_OK;
212671 pStmt = rtreeCheckPrepare(&check, "SELECT * FROM %Q.%Q", zDb, zTab);
212674 check.nDim = (sqlite3_column_count(pStmt) - 1 - nAux) / 2;
212675 if( check.nDim<1 ){
212676 rtreeCheckAppendMsg(&check, "Schema corrupt or not an rtree");
212678 check.bInt = (sqlite3_column_type(pStmt, 1)==SQLITE_INTEGER);
212681 if( rc!=SQLITE_CORRUPT ) check.rc = rc;
212684 /* Do the actual integrity-check */
212685 if( check.nDim>=1 ){
212686 if( check.rc==SQLITE_OK ){
212687 rtreeCheckNode(&check, 0, 0, 1);
212689 rtreeCheckCount(&check, "_rowid", check.nLeaf);
212690 rtreeCheckCount(&check, "_parent", check.nNonLeaf);
212693 /* Finalize SQL statements used by the integrity-check */
212694 sqlite3_finalize(check.pGetNode);
212695 sqlite3_finalize(check.aCheckMapping[0]);
212696 sqlite3_finalize(check.aCheckMapping[1]);
212698 *pzReport = check.zReport;
212699 return check.rc;
212706 sqlite3_vtab *pVtab, /* The virtual table to check */
212733 ** Invoking this SQL function runs an integrity-check on the named rtree
212734 ** table. The integrity-check verifies the following:
214442 /* If a rowid value was supplied, check if it is already present in
219661 ** explicit INTEGER PRIMARY KEY, check that this is not an attempt
220739 ** 3a. If xAccess() is called to check if there exists a *-wal file
220958 ** SQLite will not check for a *-wal file. */
221074 ** check for the existance of a *-wal file. rbuVfsRead() contains
221464 /* If this call is to check if a *-wal file associated with an RBU target
222581 statEof, /* xEof - check for end of scan */
223019 dbpageEof, /* xEof - check for end of scan */
226812 /* If this is an UPDATE that is part of a changeset, then check that
230499 /* Bucket of terms object used by the integrity-check in offsets=0 mode. */
230663 ** Functions called by the storage module as part of integrity-check.
245638 ** for internal sanity checking by the integrity-check in debug
246289 ** Below this point is the implementation of the integrity-check
246316 ** FTS functionality, or even the integrity-check, in any way.
246433 ** FTS functionality, or even the integrity-check, in any way.
246464 /* If this is a prefix query, check that the results returned if the
246467 ** This check may only be performed if the hash table is empty. This
246518 Fts5StructureSegment *pSeg, /* Segment to check internal consistency */
246525 /* Now check that the iter.nEmpty leaves following the current leaf
246589 Fts5StructureSegment *pSeg /* Segment to check internal consistency */
246624 ** to or larger than the split-key in zIdxTerm. Also check that if there
246663 /* Now check that the iter.nEmpty leaves following the current leaf
246670 /* If there is a doclist-index, check that it looks right. */
249237 }else if( 0==sqlite3_stricmp("integrity-check", zCmd) ){
250620 ** Run an integrity check on the FTS5 data structures. Return a string
250625 sqlite3_vtab *pVtab, /* the FTS5 virtual table to check */
250628 int isQuick, /* True if this is a quick-check */
251642 ** Tokenization callback used by integrity check.
255682 stmtEof, /* xEof - check for end of scan */