1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add the SQLITE_OMIT_TEMPDB compile time macro. (CVS 2427)

FossilOrigin-Name: c41d55443c2dd532147962b87f542fb7d37075fd
This commit is contained in:
danielk1977
2005-03-29 03:10:59 +00:00
parent 50f059b871
commit 53c0f7480b
40 changed files with 1755 additions and 1490 deletions

View File

@ -12,7 +12,7 @@
#
# This file implements tests for the PRAGMA command.
#
# $Id: pragma.test,v 1.34 2005/02/13 23:34:25 drh Exp $
# $Id: pragma.test,v 1.35 2005/03/29 03:11:00 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -330,14 +330,16 @@ catchsql {COMMIT;}
# Test schema-query pragmas
#
ifcapable schema_pragmas {
do_test pragma-6.1 {
set res {}
execsql {SELECT * FROM sqlite_temp_master}
foreach {idx name file} [execsql {pragma database_list}] {
lappend res $idx $name
}
set res
} {0 main 1 temp 2 aux}
ifcapable tempdb {
do_test pragma-6.1 {
set res {}
execsql {SELECT * FROM sqlite_temp_master}
foreach {idx name file} [execsql {pragma database_list}] {
lappend res $idx $name
}
set res
} {0 main 1 temp 2 aux}
}
do_test pragma-6.2 {
execsql {
pragma table_info(t2)
@ -387,13 +389,23 @@ ifcapable {utf16} {
}
} {1 {unsupported encoding: bogus}}
}
do_test pragma-7.3 {
db close
sqlite3 db test.db
execsql {
pragma lock_status;
}
} {main unlocked temp closed}
ifcapable tempdb {
do_test pragma-7.3 {
db close
sqlite3 db test.db
execsql {
pragma lock_status;
}
} {main unlocked temp closed}
} else {
do_test pragma-7.3 {
db close
sqlite3 db test.db
execsql {
pragma lock_status;
}
} {main unlocked}
}
#----------------------------------------------------------------------
@ -673,15 +685,17 @@ do_test pragma-9.8 {
PRAGMA temp_store_directory='';
}
} {}
do_test pragma-9.9 {
execsql {
PRAGMA temp_store_directory;
PRAGMA temp_store=FILE;
CREATE TEMP TABLE temp_store_directory_test(a integer);
INSERT INTO temp_store_directory_test values (2);
SELECT * FROM temp_store_directory_test;
}
} {2}
ifcapable tempdb {
do_test pragma-9.9 {
execsql {
PRAGMA temp_store_directory;
PRAGMA temp_store=FILE;
CREATE TEMP TABLE temp_store_directory_test(a integer);
INSERT INTO temp_store_directory_test values (2);
SELECT * FROM temp_store_directory_test;
}
} {2}
}
do_test pragma-9.10 {
catchsql "
PRAGMA temp_store_directory='$pwd';