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

More work on optionally removing unused features at compile-time. (CVS 2049)

FossilOrigin-Name: a82980fd70285820c64b42393ef85a9e21addc5d
This commit is contained in:
drh
2004-11-03 13:59:04 +00:00
parent a19df67c58
commit a71aa00102
13 changed files with 87 additions and 64 deletions

View File

@ -1,5 +1,5 @@
C Auto-vacuum\sbug:\sDeallocate\spointer-map\spages\swhen\sshrinking\sa\sdatabase\sfile.\s(CVS\s2048) C More\swork\son\soptionally\sremoving\sunused\sfeatures\sat\scompile-time.\s(CVS\s2049)
D 2004-11-03T11:37:08 D 2004-11-03T13:59:05
F Makefile.in c4d2416860f472a1e3393714d0372074197565df F Makefile.in c4d2416860f472a1e3393714d0372074197565df
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
@ -54,7 +54,7 @@ F src/os_win.c 9482dfc92f289b68205bb2c9315757c7e3946bfb
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c 9ce238f9540eb56b21fef085dc038dffca75835b F src/pager.c 9ce238f9540eb56b21fef085dc038dffca75835b
F src/pager.h cbe4ba356d9dd3f30260f322b3dc77408164df14 F src/pager.h cbe4ba356d9dd3f30260f322b3dc77408164df14
F src/parse.y 625750bf4b01a7c2b4c15e5367a7539a66e6c909 F src/parse.y 4a27450611ed2b8c359078e04daf93c50b1d22dd
F src/pragma.c 44e192eb5928157bdb015926f858a7c6e3ef6c98 F src/pragma.c 44e192eb5928157bdb015926f858a7c6e3ef6c98
F src/printf.c 7a92adc00b758cd5ce087dae80181a8bbdb70ed2 F src/printf.c 7a92adc00b758cd5ce087dae80181a8bbdb70ed2
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3 F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
@ -73,9 +73,9 @@ F src/tokenize.c bf9de9689b3bb813d65784bf54472804bf9595e6
F src/trigger.c f9a0a8d3a87238de1a934eeb7d0b6b1f13e6a55b F src/trigger.c f9a0a8d3a87238de1a934eeb7d0b6b1f13e6a55b
F src/update.c ee15b7ba712c2292802eba2d465f039b5deada39 F src/update.c ee15b7ba712c2292802eba2d465f039b5deada39
F src/utf.c f4f83acd73389090e32d6589d307fc55d794c7ed F src/utf.c f4f83acd73389090e32d6589d307fc55d794c7ed
F src/util.c f4ab796b9def353feed2191d7ce8e39a0f5059cd F src/util.c 1126ae62ee772feaa64697e4b67244fbde68228a
F src/vacuum.c ecb4a2c6f1ac5cc9b394dc64d3bb14ca650c4f60 F src/vacuum.c ecb4a2c6f1ac5cc9b394dc64d3bb14ca650c4f60
F src/vdbe.c 253beaae665f50a1320f0a068f9dda68e3c3df47 F src/vdbe.c c68b1e2b935a83ce94c34689b3f9cd80e2e7e5ce
F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181 F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
F src/vdbeInt.h 6017100adff362b8dfa37a69e3f1431f084bfa5b F src/vdbeInt.h 6017100adff362b8dfa37a69e3f1431f084bfa5b
F src/vdbeapi.c 3965bf4678ae32c05f73550c1b5be3268f9f3006 F src/vdbeapi.c 3965bf4678ae32c05f73550c1b5be3268f9f3006
@ -91,7 +91,7 @@ F test/autovacuum.test 832bcbb0086b7a1a5af24f32399e02304f0056d4
F test/bigfile.test d3744a8821ce9abb8697f2826a3e3d22b719e89f F test/bigfile.test d3744a8821ce9abb8697f2826a3e3d22b719e89f
F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747 F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
F test/bind.test a8682ba41433b93bb36a4213a43f282ca9aec5a9 F test/bind.test a8682ba41433b93bb36a4213a43f282ca9aec5a9
F test/blob.test 8727a7b46b2073a369cfc9bcb6f54dd366b9d884 F test/blob.test fc41fe95bdc10da51f0dee73ce86e75ce1d6eb9d
F test/btree.test ac0e3327d09ca3daace57aefb7423d1766d2bcfd F test/btree.test ac0e3327d09ca3daace57aefb7423d1766d2bcfd
F test/btree2.test aa4a6d05b1ea90b1acaf83ba89039dd302a88635 F test/btree2.test aa4a6d05b1ea90b1acaf83ba89039dd302a88635
F test/btree4.test 3797b4305694c7af6828675b0f4b1424b8ca30e4 F test/btree4.test 3797b4305694c7af6828675b0f4b1424b8ca30e4
@ -117,7 +117,7 @@ F test/delete2.test 050a3a6e8ea0f83aed817d164b16af2a499fb452
F test/diskfull.test e2f6cfd868713ead06dc82b84a4938e868128fc0 F test/diskfull.test e2f6cfd868713ead06dc82b84a4938e868128fc0
F test/enc.test 2f5463af488d50aef60c6110bec6b21b5efba961 F test/enc.test 2f5463af488d50aef60c6110bec6b21b5efba961
F test/enc2.test 7a60971a62748be6b607b4b4380eb4c5e151a6ec F test/enc2.test 7a60971a62748be6b607b4b4380eb4c5e151a6ec
F test/enc3.test 2ae80b11adf5b2c171d2e17214dabd356b9672c1 F test/enc3.test a96f4a7c44bac4d63bdc4ff422b8049912083998
F test/expr.test 91358521f8ec41cd0fd1c5370c93104265f1fefc F test/expr.test 91358521f8ec41cd0fd1c5370c93104265f1fefc
F test/fkey1.test d65c824459916249bee501532d6154ddab0b5db7 F test/fkey1.test d65c824459916249bee501532d6154ddab0b5db7
F test/func.test 830d352574c7f5cd15149a9be58a6dcc2b995c05 F test/func.test 830d352574c7f5cd15149a9be58a6dcc2b995c05
@ -127,7 +127,7 @@ F test/index.test 31ed90af028d1ec9a3a8a4f0d7021717ba05dd16
F test/insert.test ebbab63db4ad69395a058514bccb3cdb0a029d48 F test/insert.test ebbab63db4ad69395a058514bccb3cdb0a029d48
F test/insert2.test 614a29d3ed7dd0d8644a059c6d8ce742c63a734a F test/insert2.test 614a29d3ed7dd0d8644a059c6d8ce742c63a734a
F test/interrupt.test 6b6b8b86cdeb66d5488bd1db74b4bb3c46e4f565 F test/interrupt.test 6b6b8b86cdeb66d5488bd1db74b4bb3c46e4f565
F test/intpkey.test 3956a34cc82374821a017cf1646c9ff32f5e3c81 F test/intpkey.test b57cf5236fde1bd8cbc1388fa0c91908f6fd9194
F test/ioerr.test 3ce897ee998ee874073f3b23b0396d9ff804759c F test/ioerr.test 3ce897ee998ee874073f3b23b0396d9ff804759c
F test/join.test 9ef6aabaac9de51d5fc41e68d1f4355da05a84cd F test/join.test 9ef6aabaac9de51d5fc41e68d1f4355da05a84cd
F test/join2.test c97e4c5aa65dea462145529e58212a709b4722b8 F test/join2.test c97e4c5aa65dea462145529e58212a709b4722b8
@ -155,7 +155,7 @@ F test/pager.test 394455707a079804e8a4e431d12edce831a065f0
F test/pager2.test c7e731ac56a2984a605b032ffd19b9deee820377 F test/pager2.test c7e731ac56a2984a605b032ffd19b9deee820377
F test/pager3.test 16f546293bb751b8151dc17df613fca938bbec8b F test/pager3.test 16f546293bb751b8151dc17df613fca938bbec8b
F test/pagesize.test f4b97dc161c99f9712ffa8ebe6c0eb62c2209ee6 F test/pagesize.test f4b97dc161c99f9712ffa8ebe6c0eb62c2209ee6
F test/pragma.test 128ed309441fa057717dbf10ce8f20d68cf940fc F test/pragma.test 5f5c82ccc2da54e1fb48507841606c7370f70e27
F test/printf.test 92ba4c510b4fc61120ffa4a01820446ed917ae57 F test/printf.test 92ba4c510b4fc61120ffa4a01820446ed917ae57
F test/progress.test 5ddba78cb6011fba36093973cfb3ac473b8fb96a x F test/progress.test 5ddba78cb6011fba36093973cfb3ac473b8fb96a x
F test/quick.test 2dca186ebd5c418a7699944ba3b5e437d765eddd F test/quick.test 2dca186ebd5c418a7699944ba3b5e437d765eddd
@ -169,13 +169,13 @@ F test/select4.test 86e72fc3b07de4fe11439aa419e37db3c49467e2
F test/select5.test 94db800bbeff2e426c0175e07f7a71d4617853b5 F test/select5.test 94db800bbeff2e426c0175e07f7a71d4617853b5
F test/select6.test 7a4c572ada0c2f969cecacd76f1f5c1533a22bbb F test/select6.test 7a4c572ada0c2f969cecacd76f1f5c1533a22bbb
F test/select7.test c71c822a82c80bbd55558b4b69d35442dfe22ffd F test/select7.test c71c822a82c80bbd55558b4b69d35442dfe22ffd
F test/sort.test 35e9d6bd6930969050606c8feb9c6745469720e3 F test/sort.test c97c1a3289337b1dc349ac8a59e0780d2dcfd90b
F test/subselect.test 50f98723f00e97b1839d36410ee63597ca82d775 F test/subselect.test 50f98723f00e97b1839d36410ee63597ca82d775
F test/table.test fd9a0f4992230e4ca89cd37ae3191a12750df1d0 F test/table.test fd9a0f4992230e4ca89cd37ae3191a12750df1d0
F test/tableapi.test b21ab097e87a5484bb61029e69e1a4e5c5e65ede F test/tableapi.test b21ab097e87a5484bb61029e69e1a4e5c5e65ede
F test/tclsqlite.test 1288e6278e094c58ce650d7cbf3c4f39317d9a34 F test/tclsqlite.test 1288e6278e094c58ce650d7cbf3c4f39317d9a34
F test/temptable.test 63a16e3ad19adf073cfbcdf7624c92ac5236522c F test/temptable.test 63a16e3ad19adf073cfbcdf7624c92ac5236522c
F test/tester.tcl 6dd72b79878a1b7076156cd1f0e674415dd91bc6 F test/tester.tcl 7ef4fb786e64de47052f3a41e23e863e2b1d6dfb
F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35 F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35
F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b
F test/threadtest2.c 97a830d53c24c42290501fdfba4a6e5bdd34748b F test/threadtest2.c 97a830d53c24c42290501fdfba4a6e5bdd34748b
@ -186,12 +186,12 @@ F test/trigger2.test fec8f9091ff1248eafb5a33690ad4ff7615f5215
F test/trigger3.test f1c0cc1365f00b21a8cd41c189edca139c2d6cc6 F test/trigger3.test f1c0cc1365f00b21a8cd41c189edca139c2d6cc6
F test/trigger4.test ce5c97aba6a8a11be5820e694659438c3e982ada F test/trigger4.test ce5c97aba6a8a11be5820e694659438c3e982ada
F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83 F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83
F test/types.test 1f5f0670cf07e44c0a5b03a31e31ec5ed39a482e F test/types.test ccb0a435851486a046ab5c2c743d1c75b4a22171
F test/types2.test f23c147a2ab3e51d5dbcfa9987200db5acba7aa7 F test/types2.test f23c147a2ab3e51d5dbcfa9987200db5acba7aa7
F test/unique.test 0e38d4cc7affeef2527720d1dafd1f6870f02f2b F test/unique.test 0e38d4cc7affeef2527720d1dafd1f6870f02f2b
F test/update.test b29bd9061a1150426dab6959806fcc73a41b1217 F test/update.test b29bd9061a1150426dab6959806fcc73a41b1217
F test/utf16.test 459c2f5ab80c60092c603630a348c32d6e59c558 F test/utf16.test 459c2f5ab80c60092c603630a348c32d6e59c558
F test/vacuum.test 05959d8e6caf26d4d06cae19df49c41a4991676d F test/vacuum.test 98831051cff8e6084f22785c79bdb10080c42dde
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/view.test ca5c296989d3045f121be9a67588ff88c64874a8 F test/view.test ca5c296989d3045f121be9a67588ff88c64874a8
F test/where.test 40dcffcb77ad0a00960cef2b5b1212c77fd02199 F test/where.test 40dcffcb77ad0a00960cef2b5b1212c77fd02199
@ -252,7 +252,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c
P 2eacd38620f7270467b16e9e2f350aa0b4869a10 P bec6a65acaa8bfd8fe2cb475ba2e992a1993e4e7
R 1a71d8fcc37c235323656a96ea8a7620 R 6e0d3930c320ce3bcc70ab4dd9b4be5a
U danielk1977 U drh
Z 59b70c0385282e17202d4be1d5800074 Z 1a8d22166b9da77be53ea3527cb5f275

View File

@ -1 +1 @@
bec6a65acaa8bfd8fe2cb475ba2e992a1993e4e7 a82980fd70285820c64b42393ef85a9e21addc5d

View File

@ -14,7 +14,7 @@
** the parser. Lemon will also generate a header file containing ** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens. ** numeric codes for all of the tokens.
** **
** @(#) $Id: parse.y,v 1.146 2004/11/03 03:59:57 drh Exp $ ** @(#) $Id: parse.y,v 1.147 2004/11/03 13:59:05 drh Exp $
*/ */
%token_prefix TK_ %token_prefix TK_
%token_type {Token} %token_type {Token}

View File

@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing ** This file contains functions for allocating memory, comparing
** strings, and stuff like that. ** strings, and stuff like that.
** **
** $Id: util.c,v 1.119 2004/09/30 13:43:13 drh Exp $ ** $Id: util.c,v 1.120 2004/11/03 13:59:05 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include <stdarg.h> #include <stdarg.h>
@ -899,6 +899,8 @@ int sqlite3VarintLen(u64 v){
return i; return i;
} }
#if (!defined(SQLITE_OMIT_BLOB_LITERAL) && !defined(SQLITE_HAS_CODEC)) \
|| defined(SQLITE_TEST)
/* /*
** Translate a single byte of Hex into an integer. ** Translate a single byte of Hex into an integer.
*/ */
@ -913,7 +915,9 @@ static int hexToInt(int h){
return 0; return 0;
} }
} }
#endif /* (!SQLITE_OMIT_BLOB_LITERAL && !SQLITE_HAS_CODEC) || SQLITE_TEST */
#if !defined(SQLITE_OMIT_BLOB_LITERAL) && !defined(SQLITE_HAS_CODEC)
/* /*
** Convert a BLOB literal of the form "x'hhhhhh'" into its binary ** Convert a BLOB literal of the form "x'hhhhhh'" into its binary
** value. Return a pointer to its binary value. Space to hold the ** value. Return a pointer to its binary value. Space to hold the
@ -932,6 +936,7 @@ void *sqlite3HexToBlob(const char *z){
} }
return zBlob; return zBlob;
} }
#endif /* !SQLITE_OMIT_BLOB_LITERAL && !SQLITE_HAS_CODEC */
#if defined(SQLITE_TEST) #if defined(SQLITE_TEST)
/* /*

View File

@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing ** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code. ** commenting and indentation practices when changing or adding code.
** **
** $Id: vdbe.c,v 1.420 2004/10/31 02:22:50 drh Exp $ ** $Id: vdbe.c,v 1.421 2004/11/03 13:59:06 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include "os.h" #include "os.h"
@ -713,6 +713,7 @@ case OP_String: {
break; break;
} }
#ifndef SQLITE_OMIT_BLOB_LITERAL
/* Opcode: HexBlob * * P3 /* Opcode: HexBlob * * P3
** **
** P3 is an UTF-8 SQL hex encoding of a blob. The blob is pushed onto the ** P3 is an UTF-8 SQL hex encoding of a blob. The blob is pushed onto the
@ -742,6 +743,7 @@ case OP_HexBlob: { /* same as TK_BLOB */
/* Fall through to the next case, OP_Blob. */ /* Fall through to the next case, OP_Blob. */
} }
#endif /* SQLITE_OMIT_BLOB_LITERAL */
/* Opcode: Blob P1 * P3 /* Opcode: Blob P1 * P3
** **

View File

@ -10,11 +10,16 @@
#*********************************************************************** #***********************************************************************
# This file implements regression tests for SQLite library. # This file implements regression tests for SQLite library.
# #
# $Id: blob.test,v 1.2 2004/06/19 00:16:31 drh Exp $ # $Id: blob.test,v 1.3 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
ifcapable {!bloblit} {
finish_test
return
}
proc bin_to_hex {blob} { proc bin_to_hex {blob} {
set bytes {} set bytes {}
binary scan $blob \c* bytes binary scan $blob \c* bytes
@ -116,5 +121,3 @@ do_test blob-2.3 {
} {CDEF12 345678} } {CDEF12 345678}
finish_test finish_test

View File

@ -13,7 +13,7 @@
# The focus of this file is testing of the proper handling of conversions # The focus of this file is testing of the proper handling of conversions
# to the native text representation. # to the native text representation.
# #
# $Id: enc3.test,v 1.2 2004/06/30 03:08:25 drh Exp $ # $Id: enc3.test,v 1.3 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -36,18 +36,20 @@ do_test enc3-1.3 {
SELECT quote(x) || ' ' || quote(y) FROM t1 SELECT quote(x) || ' ' || quote(y) FROM t1
} }
} {{'abc''123' 5}} } {{'abc''123' 5}}
do_test enc3-1.4 { ifcapable {bloblit} {
execsql { do_test enc3-1.4 {
DELETE FROM t1; execsql {
INSERT INTO t1 VALUES(x'616263646566',NULL); DELETE FROM t1;
SELECT * FROM t1 INSERT INTO t1 VALUES(x'616263646566',NULL);
} SELECT * FROM t1
} {abcdef {}} }
do_test enc3-1.5 { } {abcdef {}}
execsql { do_test enc3-1.5 {
SELECT quote(x) || ' ' || quote(y) FROM t1 execsql {
} SELECT quote(x) || ' ' || quote(y) FROM t1
} {{X'616263646566' NULL}} }
} {{X'616263646566' NULL}}
}
finish_test finish_test

View File

@ -13,7 +13,7 @@
# This file implements tests for the special processing associated # This file implements tests for the special processing associated
# with INTEGER PRIMARY KEY columns. # with INTEGER PRIMARY KEY columns.
# #
# $Id: intpkey.test,v 1.19 2004/10/18 21:34:47 drh Exp $ # $Id: intpkey.test,v 1.20 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -506,11 +506,13 @@ do_test intpkey-13.3 {
INSERT INTO t1 VALUES('1.5',3,4); INSERT INTO t1 VALUES('1.5',3,4);
} }
} {1 {datatype mismatch}} } {1 {datatype mismatch}}
do_test intpkey-13.4 { ifcapable {bloblit} {
catchsql { do_test intpkey-13.4 {
INSERT INTO t1 VALUES(x'123456',3,4); catchsql {
} INSERT INTO t1 VALUES(x'123456',3,4);
} {1 {datatype mismatch}} }
} {1 {datatype mismatch}}
}
do_test intpkey-13.5 { do_test intpkey-13.5 {
catchsql { catchsql {
INSERT INTO t1 VALUES('+1234567890',3,4); INSERT INTO t1 VALUES('+1234567890',3,4);

View File

@ -12,7 +12,7 @@
# #
# This file implements tests for the PRAGMA command. # This file implements tests for the PRAGMA command.
# #
# $Id: pragma.test,v 1.18 2004/11/02 18:15:49 drh Exp $ # $Id: pragma.test,v 1.19 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -311,7 +311,7 @@ do_test pragma-6.1 {
lappend res $idx $name lappend res $idx $name
} }
set res set res
} {0 main 2 aux} } {0 main 1 temp 2 aux}
do_test pragma-6.2 { do_test pragma-6.2 {
execsql { execsql {
pragma table_info(t2) pragma table_info(t2)

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE TABLE statement. # focus of this file is testing the CREATE TABLE statement.
# #
# $Id: sort.test,v 1.15 2004/08/20 18:34:20 drh Exp $ # $Id: sort.test,v 1.16 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -355,6 +355,8 @@ do_test sort-8.1 {
} }
} {100 A1 100.0 A2} } {100 A1 100.0 A2}
ifcapable {bloblit} {
# BLOBs should sort after TEXT # BLOBs should sort after TEXT
# #
do_test sort-9.1 { do_test sort-9.1 {
@ -397,6 +399,6 @@ do_test sort-9.7 {
SELECT x FROM t6 WHERE y>'1' SELECT x FROM t6 WHERE y>'1'
} }
} {3} } {3}
} ;# endif bloblit
finish_test finish_test

View File

@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression # This file implements some common TCL routines used for regression
# testing the SQLite library # testing the SQLite library
# #
# $Id: tester.tcl,v 1.39 2004/10/30 20:23:10 drh Exp $ # $Id: tester.tcl,v 1.40 2004/11/03 13:59:06 drh Exp $
# Make sure tclsqlite3 was compiled correctly. Abort now with an # Make sure tclsqlite3 was compiled correctly. Abort now with an
# error message if not. # error message if not.
@ -242,5 +242,6 @@ proc integrity_check {name} {
# #
proc ifcapable {expr code} { proc ifcapable {expr code} {
regsub -all {[a-z]+} $expr {$::sqlite_options(&)} e2 regsub -all {[a-z]+} $expr {$::sqlite_options(&)} e2
if $e2 {uplevel 1 $code} if !($e2) return
return -code [catch {uplevel 1 $code}]
} }

View File

@ -12,7 +12,7 @@
# it tests that the different storage classes (integer, real, text etc.) # it tests that the different storage classes (integer, real, text etc.)
# all work correctly. # all work correctly.
# #
# $Id: types.test,v 1.11 2004/08/20 18:34:20 drh Exp $ # $Id: types.test,v 1.12 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -64,7 +64,11 @@ set values {
{ '5' integer integer text text } { '5' integer integer text text }
{ 'abc' text text text text } { 'abc' text text text text }
{ NULL null null null null } { NULL null null null null }
{ X'00' blob blob blob blob } }
ifcapable {bloblit} {
lappend values {
{ X'00' blob blob blob blob }
}
} }
# This code tests that the storage classes specified above (in the $values # This code tests that the storage classes specified above (in the $values

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this file is testing the VACUUM statement. # focus of this file is testing the VACUUM statement.
# #
# $Id: vacuum.test,v 1.26 2004/10/30 20:23:10 drh Exp $ # $Id: vacuum.test,v 1.27 2004/11/03 13:59:06 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -201,18 +201,20 @@ do_test vacuum-6.2 {
} {1 2 3} } {1 2 3}
# Also ensure that blobs survive a vacuum. # Also ensure that blobs survive a vacuum.
do_test vacuum-6.3 { ifcapable {bloblit} {
execsql { do_test vacuum-6.3 {
DELETE FROM "abc abc"; execsql {
INSERT INTO "abc abc" VALUES(X'00112233', NULL, NULL); DELETE FROM "abc abc";
VACUUM; INSERT INTO "abc abc" VALUES(X'00112233', NULL, NULL);
} VACUUM;
} {} }
do_test vacuum-6.4 { } {}
execsql { do_test vacuum-6.4 {
select count(*) from "abc abc" WHERE a = X'00112233'; execsql {
} select count(*) from "abc abc" WHERE a = X'00112233';
} {1} }
} {1}
}
# Check what happens when an in-memory database is vacuumed. # Check what happens when an in-memory database is vacuumed.
do_test vacuum-7.0 { do_test vacuum-7.0 {