SQLite

Check-in [57400f50c6]
Login

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

Overview
Comment:Add test cases to verify that the file format is preserved across VACUUM. Ticket #2804. (CVS 4572)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 57400f50c600a59b56ba6eadfdc740235c194cd6
User & Date: drh 2007-11-27 23:36:59.000
Context
2007-11-28
00:51
Add an implementation of recursive mutexes for unix systems that lack pthreads recursive mutexes (ex: Solaris 2.6). Modern unix systems continue to use the recursive mutexes provided by pthreads. (CVS 4573) (check-in: f366a776c1 user: drh tags: trunk)
2007-11-27
23:36
Add test cases to verify that the file format is preserved across VACUUM. Ticket #2804. (CVS 4572) (check-in: 57400f50c6 user: drh tags: trunk)
23:11
Use the hexio test utility rather than TCL's binary I/O to avoid 32/64-bit problems in io.test. Ticket #2803. (This is a change to the test harness only - not to SQLite.) (CVS 4571) (check-in: 07f7dde8a6 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/descidx1.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2005 December 21
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is descending indices.
#
# $Id: descidx1.test,v 1.7 2006/07/11 14:17:52 drh Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

db eval {PRAGMA legacy_file_format=OFF}














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2005 December 21
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is descending indices.
#
# $Id: descidx1.test,v 1.8 2007/11/27 23:36:59 drh Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

db eval {PRAGMA legacy_file_format=OFF}

315
316
317
318
319
320
321







322
323
324
325
326
327
328
329
330
331
332
333
334







335
336
337
} {1}
do_test descidx1-6.3 {
  execsql {
    CREATE TABLE t1(a,b,c);
  }
  get_file_format
} {1}







do_test descidx1-6.4 {
  db close
  file delete -force test.db test.db-journal
  sqlite3 db test.db
  execsql {PRAGMA legacy_file_format=NO}
  execsql {PRAGMA legacy_file_format}
} {0}
do_test descidx1-6.5 {
  execsql {
    CREATE TABLE t1(a,b,c);
  }
  get_file_format
} {4}









finish_test







>
>
>
>
>
>
>













>
>
>
>
>
>
>



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
} {1}
do_test descidx1-6.3 {
  execsql {
    CREATE TABLE t1(a,b,c);
  }
  get_file_format
} {1}
ifcapable vacuum {
  # Verify that the file format is preserved across a vacuum.
  do_test descidx1-6.3.1 {
    execsql {VACUUM}
    get_file_format
  } {1}
}
do_test descidx1-6.4 {
  db close
  file delete -force test.db test.db-journal
  sqlite3 db test.db
  execsql {PRAGMA legacy_file_format=NO}
  execsql {PRAGMA legacy_file_format}
} {0}
do_test descidx1-6.5 {
  execsql {
    CREATE TABLE t1(a,b,c);
  }
  get_file_format
} {4}
ifcapable vacuum {
  # Verify that the file format is preserved across a vacuum.
  do_test descidx1-6.6 {
    execsql {VACUUM}
    get_file_format
  } {4}
}


finish_test