1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +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:
drh
2016-08-19 14:20:56 +00:00
parent 61ea610cd0
commit 9ef5e7708a
11 changed files with 228 additions and 138 deletions

View File

@@ -200,7 +200,9 @@ static int readsTable(Parse *p, int iDb, Table *pTab){
/*
** Locate or create an AutoincInfo structure associated with table pTab
** which is in database iDb. Return the register number for the register
** that holds the maximum rowid.
** that holds the maximum rowid. Return zero if pTab is not an AUTOINCREMENT
** table. (Also return zero when doing a VACUUM since we do not want to
** update the AUTOINCREMENT counters during a VACUUM.)
**
** There is at most one AutoincInfo structure per table even if the
** same table is autoincremented multiple times due to inserts within
@@ -223,7 +225,9 @@ static int autoIncBegin(
Table *pTab /* The table we are writing to */
){
int memId = 0; /* Register holding maximum rowid */
if( pTab->tabFlags & TF_Autoincrement ){
if( (pTab->tabFlags & TF_Autoincrement)!=0
&& (pParse->db->flags & SQLITE_Vacuum)==0
){
Parse *pToplevel = sqlite3ParseToplevel(pParse);
AutoincInfo *pInfo;