mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the capability to VACUUM an attached database by specifying the schema
name as an argument to the VACUUM command. Since version 2.0, VACUUM has accepted an argument which was silently ignored. Now it has meaning. FossilOrigin-Name: 29d63059b4d2bb612523ac55ebfef040d054a64f
This commit is contained in:
@@ -6262,15 +6262,14 @@ case OP_JournalMode: { /* out2 */
|
||||
#endif /* SQLITE_OMIT_PRAGMA */
|
||||
|
||||
#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
|
||||
/* Opcode: Vacuum * * * * *
|
||||
/* Opcode: Vacuum P1 * * * *
|
||||
**
|
||||
** Vacuum the entire database. This opcode will cause other virtual
|
||||
** machines to be created and run. It may not be called from within
|
||||
** a transaction.
|
||||
** Vacuum the entire database P1. P1 is 0 for "main", and 2 or more
|
||||
** for an attached database. The "temp" database may not be vacuumed.
|
||||
*/
|
||||
case OP_Vacuum: {
|
||||
assert( p->readOnly==0 );
|
||||
rc = sqlite3RunVacuum(&p->zErrMsg, db);
|
||||
rc = sqlite3RunVacuum(&p->zErrMsg, db, pOp->p1);
|
||||
if( rc ) goto abort_due_to_error;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user