1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Fix vacuum so that it works with blobs. (CVS 1490)

FossilOrigin-Name: 4feb4b9a71ce7a92924d2358a7ccecb4cca19223
This commit is contained in:
danielk1977
2004-05-29 10:23:19 +00:00
parent e7d00f5825
commit 3df6b2570f
11 changed files with 229 additions and 304 deletions

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: attach.test,v 1.17 2004/05/29 02:37:20 danielk1977 Exp $
# $Id: attach.test,v 1.18 2004/05/29 10:23:20 danielk1977 Exp $
#
set testdir [file dirname $argv0]
@ -72,17 +72,17 @@ do_test attach-1.8 {
catchsql {
ATTACH DATABASE 'test3.db' AS three;
}
} {1 {cannot attach empty database: three}}
} {0 {}}
do_test attach-1.9 {
catchsql {
SELECT * FROM three.sqlite_master;
}
} {1 {no such table: three.sqlite_master}}
} {0 {}}
do_test attach-1.10 {
catchsql {
DETACH DATABASE three;
}
} {1 {no such database: three}}
} {0 {}}
do_test attach-1.11 {
execsql {
ATTACH 'test.db' AS db2;
@ -563,7 +563,7 @@ do_test attach-6.1 {
catchsql {
ATTACH DATABASE 'no-such-file' AS nosuch;
}
} {1 {cannot attach empty database: nosuch}}
} {0 {}}
file delete -force no-such-file
if {$tcl_platform(platform)=="unix"} {
do_test attach-6.2 {

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and schema changes to attached databases.
#
# $Id: attach3.test,v 1.4 2004/05/29 02:37:20 danielk1977 Exp $
# $Id: attach3.test,v 1.5 2004/05/29 10:23:20 danielk1977 Exp $
#
@ -172,7 +172,7 @@ do_test attach3-5.3 {
execsql {
SELECT * FROM aux.sqlite_master WHERE name = 'tr1';
}
} {trigger tr1 t3 0 {CREATE TRIGGER aux.tr1 AFTER INSERT ON t3 BEGIN
} {trigger tr1 t3 0 {CREATE TRIGGER tr1 AFTER INSERT ON t3 BEGIN
INSERT INTO t3 VALUES(new.e*2, new.f*2);
END}}

View File

@ -11,14 +11,16 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the VACUUM statement.
#
# $Id: vacuum.test,v 1.18 2004/05/26 10:11:07 danielk1977 Exp $
# $Id: vacuum.test,v 1.19 2004/05/29 10:23:20 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
proc cksum {{db db}} {
set txt [$db eval {SELECT name, type, sql FROM sqlite_master}]\n
foreach tbl [$db eval {SELECT name FROM sqlite_master WHERE type='table'}] {
set sql "SELECT name, type, sql FROM sqlite_master ORDER BY name, type"
set txt [$db eval $sql]\n
set sql "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"
foreach tbl [$db eval $sql] {
append txt [$db eval "SELECT * FROM $tbl"]\n
}
foreach prag {default_synchronous default_cache_size} {