aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test60
1 files changed, 60 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test b/libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test
new file mode 100644
index 0000000..5a6aca7
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/vacuum2.test
@@ -0,0 +1,60 @@
1# 2005 February 15
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11# This file implements regression tests for SQLite library. The
12# focus of this file is testing the VACUUM statement.
13#
14# $Id: vacuum2.test,v 1.3 2007/07/19 16:35:17 drh Exp $
15
16set testdir [file dirname $argv0]
17source $testdir/tester.tcl
18
19# If the VACUUM statement is disabled in the current build, skip all
20# the tests in this file.
21#
22ifcapable {!vacuum||!autoinc} {
23 finish_test
24 return
25}
26if $AUTOVACUUM {
27 finish_test
28 return
29}
30
31# Ticket #1121 - make sure vacuum works if all autoincrement tables
32# have been deleted.
33#
34do_test vacuum2-1.1 {
35 execsql {
36 CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
37 DROP TABLE t1;
38 VACUUM;
39 }
40} {}
41
42# Ticket #2518. Make sure vacuum increments the change counter
43# in the database header.
44#
45do_test vacuum2-2.1 {
46 execsql {
47 CREATE TABLE t1(x);
48 CREATE TABLE t2(y);
49 INSERT INTO t1 VALUES(1);
50 }
51 hexio_get_int [hexio_read test.db 24 4]
52} [expr {[hexio_get_int [hexio_read test.db 24 4]]+3}]
53do_test vacuum2-2.1 {
54 execsql {
55 VACUUM
56 }
57 hexio_get_int [hexio_read test.db 24 4]
58} [expr {[hexio_get_int [hexio_read test.db 24 4]]+1}]
59
60finish_test