/ Check-in [5658da7e]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cleanup the vacuum bug fixes in version 2.8. (CVS 2327)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | version_2
Files: files | file ages | folders
SHA1: 5658da7e5ae2ee4dc7ec45a1914f766dfb4be323
User & Date: drh 2005-02-14 00:25:48
Context
2005-02-14
05:47
Modifications to the publish.sh script prior to 2.8.16. (CVS 2328) check-in: affde443 user: drh tags: version_2
00:25
Cleanup the vacuum bug fixes in version 2.8. (CVS 2327) check-in: 5658da7e user: drh tags: version_2
00:21
Fix the vacuum bug in version 2.8. Also prepare for release 2.8.16. (CVS 2326) check-in: 0eaebad5 user: drh tags: version_2
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vacuum.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
**
*************************************************************************
** This file contains code used to implement the VACUUM command.
**
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
** $Id: vacuum.c,v 1.13.2.4 2005/02/14 00:21:39 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"

/*
** A structure for holding a dynamic string - a string that can grow
** without bound. 
................................................................................
      sqlite_freemem(zErrMsg);
    }
  }
  if( rc!=SQLITE_ABORT ) p->rc = rc;
  return rc;
}

/*
** This callback is used to transfer PRAGMA settings from one database
** to the other.  The value in argv[0] should be passed to a pragma
** identified by ((vacuumStruct*)pArg)->zPragma.
*/
static int vacuumCallback3(void *pArg, int argc, char **argv, char **NotUsed){
  vacuumStruct *p = (vacuumStruct*)pArg;
  char zBuf[200];
  assert( argc==1 );
  if( argv==0 ) return 0;
  assert( argv[0]!=0 );
  assert( strlen(p->zPragma)<100 );
  assert( strlen(argv[0])<30 );
  sprintf(zBuf,"PRAGMA %s=%s;", p->zPragma, argv[0]);
  p->rc = execsql(p->pzErrMsg, p->dbNew, zBuf);
  return p->rc;
}

/*
** Generate a random name of 20 character in length.
*/
static void randomName(unsigned char *zBuf){
  static const unsigned char zChars[] =
    "abcdefghijklmnopqrstuvwxyz"
    "0123456789";
................................................................................
    meta2[1] = meta1[1]+1;
    meta2[3] = meta1[3];
    meta2[4] = meta1[4];
    meta2[6] = meta1[6];
    rc = sqliteBtreeUpdateMeta(dbNew->aDb[0].pBt, meta2);
  }
  if( rc==SQLITE_OK ){
    int meta[SQLITE_N_BTREE_META];
    
    rc = sqliteBtreeCopyFile(db->aDb[0].pBt, dbNew->aDb[0].pBt);
    sqlite_exec(db, "COMMIT", 0, 0, 0);
    sqliteResetInternalSchema(db, 0);
  }

end_of_vacuum:
  if( rc && zErrMsg!=0 ){







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
159
160
161
162
163
164
165


















166
167
168
169
170
171
172
...
274
275
276
277
278
279
280


281
282
283
284
285
286
287
**
*************************************************************************
** This file contains code used to implement the VACUUM command.
**
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
** $Id: vacuum.c,v 1.13.2.5 2005/02/14 00:25:48 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"

/*
** A structure for holding a dynamic string - a string that can grow
** without bound. 
................................................................................
      sqlite_freemem(zErrMsg);
    }
  }
  if( rc!=SQLITE_ABORT ) p->rc = rc;
  return rc;
}



















/*
** Generate a random name of 20 character in length.
*/
static void randomName(unsigned char *zBuf){
  static const unsigned char zChars[] =
    "abcdefghijklmnopqrstuvwxyz"
    "0123456789";
................................................................................
    meta2[1] = meta1[1]+1;
    meta2[3] = meta1[3];
    meta2[4] = meta1[4];
    meta2[6] = meta1[6];
    rc = sqliteBtreeUpdateMeta(dbNew->aDb[0].pBt, meta2);
  }
  if( rc==SQLITE_OK ){


    rc = sqliteBtreeCopyFile(db->aDb[0].pBt, dbNew->aDb[0].pBt);
    sqlite_exec(db, "COMMIT", 0, 0, 0);
    sqliteResetInternalSchema(db, 0);
  }

end_of_vacuum:
  if( rc && zErrMsg!=0 ){