Lines Matching full:rollback
230 ** compiled with the default page-size limit will not be able to rollback
1363 ** that does not care about crash recovery or rollback might make
2036 ** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
2077 ** rollback, ABORT processing, [DROP TABLE], or by any other
2261 ** forces an automatic rollback of the changes. See the
3208 ** not limited to [ATTACH], [DETACH], [COMMIT], [ROLLBACK], [RELEASE],
3575 ** explicit transaction then you should rollback the transaction before
4602 ** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
4645 ** CAPI3REF: Commit And Rollback Notification Callbacks
4652 ** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
4657 ** then the commit is converted into a rollback.
4668 ** or rollback hook in the first place.
4676 ** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
4677 ** ^The rollback hook is invoked on a rollback that results from a commit
4678 ** hook returning non-zero, just as it would be with any other rollback.
4681 ** rolled back if an explicit "ROLLBACK" statement is executed, or
4682 ** an error or constraint causes an implicit rollback to occur.
4683 ** ^The rollback callback is not invoked if a transaction is
7484 #define BTREE_OMIT_JOURNAL 1 /* Do not create or use a rollback journal */
8107 ** at a time and provides a journal for rollback.
8153 #define PAGER_OMIT_JOURNAL 0x0001 /* Do not use a rollback journal */
8328 rollback journal before
9490 ** error. ROLLBACK processing means that a constraint violation
9496 ** changes due to the same operation are not backed out and no rollback
9505 ** same as ROLLBACK for DEFERRED keys. SETNULL means that the foreign
9514 #define OE_Rollback 1 /* Fail the operation and rollback the transaction */
9515 #define OE_Abort 2 /* Back out changes but do no rollback transaction */
24239 ** write operation (not a hot journal rollback).
25833 ** doing a hot-journal rollback or a write to some file other than a
26093 ** doing a hot-journal rollback or a write to some file other than a
26216 ** a rollback and that the database is therefore unchanged and
34711 ** atomic commit and rollback through the use of a journal file that
34798 ** response to a ROLLBACK TO command. */
34839 ** This comment block describes invariants that hold when using a rollback
34852 ** the transaction has been written into the rollback journal and
34869 ** (2) The content of a page written into the rollback journal exactly matches
34870 ** both the content in the database when the rollback journal was written
34881 ** (5) All writes to the database file are synced prior to the rollback journal
34894 ** of the unsynced changes to a rollback journal are removed and the
34996 ** rollback (non-WAL) mode are met. Unless the pager is (or recently
35024 ** In rollback mode, a RESERVED or (if the transaction was opened with
35036 ** * If the connection is open in rollback-mode, a RESERVED or greater
35049 ** first modified by the upper layer. In rollback mode the journal file
35077 ** A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD
35082 ** layer must either commit or rollback the transaction.
35089 ** to rollback the transaction.
35101 ** For example, if an IO error occurs while performing a rollback,
35104 ** (as usually happens after a rollback). Any subsequent readers might
35115 ** is reloaded from disk (and, if necessary, hot-journal rollback peformed)
35122 ** 1. An error occurs while attempting a rollback. This happens in
35133 ** layer then attempts a rollback operation. If the error condition
35139 ** automatically attempt a rollback, as it assumes that an error in a
35253 ** rollback (see pagerPlaybackSavepoint()).
35325 ** master journal pointer could interfere with hot-journal rollback of any
35341 ** comes up during savepoint rollback that requires the pcache module
35382 ** variable at the start of the transaction. It is used during rollback,
35425 u8 useJournal; /* Use a rollback journal on this file */
35476 u32 sectorSize; /* Assumed sector size during rollback */
35591 ** rollback journal. Otherwise false.
35642 ** either SQLITE_IOERR or SQLITE_FULL during rollback or while finalizing
35694 ** a rollback transaction that switches from journal_mode=off
35920 ** contains rollback data for exactly one page.
36442 ** dangerous because the code to rollback a hot-journal file
36624 ** the persistent error occurred, then the rollback journal may need
36645 ** either a COMMIT or a ROLLBACK operation. This routine may be called
36646 ** after rollback of a hot-journal, or if an error occurs while opening
36684 ** If running in non-exclusive rollback mode, the lock on the file is
36705 ** 1. After a successful hot-journal rollback, it is called with
36795 ** Execute a rollback if a transaction is active and unlock the
36799 ** the rollback at this time. Instead, pager_unlock() is called. The
36807 ** malloc error occurs during a rollback, then this will itself cause
36876 ** The main rollback journal uses checksums - the statement journal does
36901 ** Neither of these two scenarios are possible during a savepoint rollback.
36903 ** If this is a savepoint rollback, then memory may have to be dynamically
36912 int isSavepnt /* True for a savepoint rollback */
36932 ** or savepoint rollback done at the request of the caller) or this is
36933 ** a hot-journal rollback. If it is a hot-journal rollback, the pager
36934 ** is in state OPEN and holds an EXCLUSIVE lock. Hot-journal rollback
36973 ** rollback, then don't bother to play it back again.
37000 ** a hot-journal rollback, it is guaranteed that the page-cache is empty
37008 ** for certain that original page contents are synced into the main rollback
37010 ** database file without an entry in the rollback journal that can
37054 /* If this is a rollback of a savepoint and data was not written to
37099 ** back as part of a savepoint (or statement) rollback from an
37199 ** journal files extracted from regular rollback-journals.
37355 ** database to during a rollback.
37392 ** The isHot parameter indicates that we are trying to rollback a journal
37408 int needPagerReset; /* True to reset page prior to first page rollback */
37470 /* If nRec is 0 and this rollback is of a transaction created by this
37479 ** when doing a ROLLBACK and the nRec==0 chunk is the last chunk in
37519 ** first place so it is OK to simply abandon the rollback. */
37523 /* If we are unable to rollback, quit and return the error
37526 ** process to come along will be able to rollback the database.
37537 /* Following a rollback, the database file should be back in its original
37691 ** updated as data is copied out of the rollback journal and into the
37693 ** rollback involves simply truncating the log file. Therefore, if one
37704 ** This function is called to rollback a transaction on a WAL database.
37941 ** a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction
37945 ** being rolled back), then the rollback consists of up to three stages,
37961 ** Throughout the rollback process, each time a page is rolled back, the
38001 /* Use pPager->journalOff as the effective size of the main rollback
38056 /* Finally, rollback pages from the sub-journal. Page that were
38092 ** the rollback journal. There are three levels:
38110 ** point of causing damage to the database during rollback.
38112 ** The above is for a rollback-journal mode. For WAL mode, OFF continues
38208 ** (which occurs during hot-journal rollback). Summary:
38314 ** during rollback and will be overwritten whenever a rollback
38461 ** the database file or the portion of the rollback journal and
38493 ** This function is called before attempting a hot-journal rollback. It
38499 ** that if a power-failure occurs during the rollback, the process that
38500 ** attempts rollback following system recovery sees the same journal
38527 rollback
38555 ** rollback before accessing the database file.
38601 ** disk and can be restored in the event of a hot-journal rollback.
38661 ** hot-journal rollback following recovery. It may roll back all
38694 ** it as a candidate for rollback.
38779 /* This function is only called for rollback pagers in WRITER_DBMOD state. */
38959 ** or not a sync is required. This is set during a rollback.
39005 ** ROLLBACK TO sp;
39009 ** following the "ROLLBACK TO sp" statement, reading page X will read
39016 ** be restored to its current value when the "ROLLBACK TO sp" is
39248 ** disk and uses an in-memory rollback journal.
39435 /* If we cannot open the rollback journal file in order to see if
39468 ** rollback, the contents of the cache are validated by checking
39686 ** If the reference count has reached zero, rollback any active
39690 ** the rollback journal, the unlock is not performed and there is
39691 ** nothing to rollback, so this routine is a no-op.
39877 ** are released, a rollback occurs and the lock on the database is
39896 ** opened to write a rollback log for a transaction. It is not used
40093 ** rollback journal might not yet be open. Open it now if this is the case.
40449 ** rollback. If the connection is in WAL mode, this call is a no-op.
40685 ** for hot-journal rollback. Once this is done the transaction is
40711 ** a hot-journal during hot-journal rollback, 0 changes will be made
40739 ** Otherwise, in rollback mode, this function performs two functions:
40746 ** rollback at any point in the future.
40749 ** rollback is successful.
40758 PAGERTRACE(("ROLLBACK %d\n", PAGERID(pPager)));
40761 ** the pager is already in the ERROR state, the rollback is not
40782 /* If an error occurs during a ROLLBACK, we can no longer trust the pager
40910 ** This function is called to rollback or release (commit) a savepoint.
40911 ** The savepoint to release or rollback need not be the most recently
40916 ** index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes
40919 ** The savepoint to rollback or release is identified by parameter
40971 /* Else this is a rollback operation, playback the specified savepoint.
41054 ** in the rollback journal, it is not put there by by this routine.
41085 /* In order to be able to rollback, an in-memory database must journal
41101 ** ROLLBACK TO one;
41104 ** be possible to restore its contents when the "ROLLBACK TO one"
41147 ** need to rollback later. Just move the page out of the way. */
41504 /* Close any rollback journal previously open */
41521 ** to switching from WAL to rollback mode.
41535 ** rollback mode. Open it now so this can happen.
41822 ** When a rollback occurs, the value of K is decreased. Hash table entries
42467 ** to a rollback or savepoint.
43278 ** ordinary, rollback-mode locking methods, this guarantees that the
43929 ** If the upper layer is doing a rollback, it is guaranteed that there
43946 ** "rollback" the write position of the WAL handle back to the current
43947 ** point in the event of a savepoint rollback (via WalSavepointUndo()).
45879 ** may be lost. In the event of a rollback, it may not be possible
46999 ** During a rollback, when the pager reloads information into the cache
47396 /* Rollback any active transaction and free the handle structure.
48002 ** rollback occurs within the transaction.
48439 ** causes a rollback journal to be created (if it does not already exist)
48445 ** At the end of this call, the rollback journal still exists on the
48529 ** the rollback journal (which causes the transaction to commit) and
48606 ** This routine gets called when a rollback occurs.
48609 ** the rollback. The rollback may have deleted tables
48631 ** Rollback the transaction in progress. All cursors will be
48649 ** trying to save cursor positions. If this is an automatic rollback (as
48669 /* The rollback may have destroyed the pPage1->aData value. So
48698 ** can be rolled back without having to rollback the entire transaction.
48718 ** SQL statements. It is illegal to open, release or rollback any
48735 ** from a normal transaction rollback, as no locks are released and the
51004 ** rollback, undoing any changes made to the parent page.
57199 ** can never be used again. This happens when a rollback
57204 ** to the rollback.
57206 ** Remember that a rollback can delete tables complete and
57237 ** is that an IO error may have occured, causing an emergency rollback.
57329 ** changes. If a rollback is needed, then do the rollback.
57355 ** state. We need to rollback the statement transaction, if there is
57368 /* No commit or rollback needed if the program never started */
57384 ** no rollback is necessary. Otherwise, at least a savepoint
57389 ** a statement or transaction rollback operation. If the error
57392 ** pagerStress() in pager.c), the rollback is required to restore
57416 ** VM, then we do either a commit or rollback of the current transaction.
57501 /* Rollback or commit any schema changes that occurred. */
61229 ** whether or not to rollback the current transaction. Do not rollback
61230 ** if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort,
61232 ** VDBE, but do not rollback the transaction.
62963 ** Open, release or rollback the savepoint named by parameter P4, depending
62965 ** existing savepoint, P1==1, or to rollback an existing savepoint P1==2.
63041 ** active write statements. It is not possible to rollback a savepoint
63046 (u.aq.p1==SAVEPOINT_ROLLBACK ? "rollback": "release")
63084 /* Regardless of whether this is a RELEASE or ROLLBACK, destroy all
63094 ** too. If it is a ROLLBACK TO, then set the number of deferred
63117 ** VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if
63137 /* If this instruction implements a ROLLBACK and other VMs are
63141 sqlite3SetString(&p->zErrMsg, db, "cannot rollback transaction - "
63178 (u.ar.iRollback)?"cannot rollback - no transaction is active":
63188 ** Begin a transaction. The transaction ends when a Commit or Rollback
63200 ** underway. Starting a write transaction also creates a rollback journal. A
65753 ** PAGER_JOURNALMODE_XXX values. If changing between the various rollback
65848 ** mode, this transaction always uses a rollback journal.
67220 ** This file contains code use to implement an in-memory rollback journal.
67221 ** The in-memory rollback journal is used to journal transactions for
67230 /* Space to hold the rollback journal is allocated in increments of
67247 ** The rollback journal is composed of a linked list of these structures.
67255 ** An instance of this object serves as a cursor into the rollback journal.
67290 /* SQLite never tries to read past the end of a rollback journal file */
74881 ** ROLLBACK
75247 ** before the database closes. It is also called during a rollback
78198 ** Rollback a transaction
78208 if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "ROLLBACK", 0, 0) ){
78219 ** release or rollback an SQL savepoint.
78226 static const char * const az[] = { "BEGIN", "RELEASE", "ROLLBACK" };
78327 ** rollback the whole transaction. For operations where all constraints
81887 ** transactions are not able to rollback schema changes. */
83523 ** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
83527 ** any ROLLBACK The current transaction is rolled back and
83532 ** only (do not do a complete rollback) then
83700 ** statement rollback (if the statement is aborted after the delete
86053 ** Get or set the size limit on rollback journal files.
93230 case OE_Rollback: return "rollback";
100985 26, /* ROLLBACK => ID */
101120 "ROLLBACK", "SAVEPOINT", "RELEASE", "TO",
101206 /* 19 */ "cmd ::= ROLLBACK trans_opt",
101211 /* 24 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
101484 /* 297 */ "raisetype ::= ROLLBACK",
102315 case 19: /* cmd ::= ROLLBACK trans_opt */
102328 case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
103275 case 297: /* raisetype ::= ROLLBACK */
103958 testcase( i==113 ); /* ROLLBACK */
105588 ** Rollback all database files.
105615 /* If one has been configured, invoke the rollback-hook callback */
106042 ** rollback.
106977 ** by the next COMMIT or ROLLBACK.
117469 sqlite3_exec(p->db, "ROLLBACK TO fts3", 0, 0, 0);
121977 0, /* xRollback - rollback transaction */