-C Exclude\sa\sfew\smore\slines\sof\scode\susing\sOMIT\smacros.\s(CVS\s2253)
-D 2005-01-21T08:13:14
+C Improve\stest\scoverage\sfor\sminimum\sfeature\sbuilds.\s(CVS\s2254)
+D 2005-01-21T11:55:26
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
F src/attach.c cecf5ab42cff34416372a0210b14abb50ed48ef9
F src/auth.c 3b81f2a42f48a62c2c9c9b0eda31a157c681edea
-F src/btree.c 812ee6b8eed884801a40b71f674cddf56a5e0888
+F src/btree.c e68ae12c8b12ef9d45d58d931c36c184055a3880
F src/btree.h 74d19cf40ab49fd69abe9e4e12a6c321ad86c497
-F src/build.c 9c9e9dbb9d8619f0755be79fcb30df5a8347a8ed
+F src/build.c b60b1f1f48521fe5b4bf98a189cadc205b2e8065
F src/cursor.c de73c00aefc4747ad59b5105cf38bbff0667922e
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
F src/delete.c b3accca9c38d9a67dbd724f67b04151a13735ebd
F src/sqliteInt.h 01ea63415bb96ad8ab6e26bede2aa6a39cefb082
F src/table.c 25b3ff2b39b7d87e8d4a5da0713d68dfc06cbee9
F src/tclsqlite.c fd27457b228118be96524dae285146c76efe032b
-F src/test1.c c4f2a1d6ad8f14a1168a4c933ce5c5cb2d243d86
+F src/test1.c 35c055c934ea9797d1b8ca7083ced6a9b263f2ec
F src/test2.c bbc2ecc58ceeab12d1e40970f831b1017524e40d
F src/test3.c 683e1e3819152ffd35da2f201e507228921148d0
F src/test4.c 7c6b9fc33dd1f3f93c7f1ee6e5e6d016afa6c1df
F tclinstaller.tcl 36478c3bbfc5b93ceac42d94e3c736937b808432
F test/all.test 7f0988442ab811dfa41793b5b550f5828ce316f3
F test/alter.test 95c57a4f461fa81293e0dccef7f83889aadb169a
-F test/attach.test 660ed5ed29e864fc6c1710845e939df79467ed34
+F test/attach.test 3391776495dc9434c8f3c67a7591db2aef0cd4fa
F test/attach2.test eeb987770f4dbe68bd29afdbc2e8cff0142e6eb5
F test/attach3.test c05c70b933afbde0901dab9da3e66ee842c09f38
F test/auth.test 559e0816b8100740624ebb0ab7aab05f5c92831c
-F test/autoinc.test c071e51ff167b8e889212273588d9cca71845b70
+F test/autoinc.test c6daf10ffce8a898cd375b4a71615a741a6029d0
F test/autovacuum.test a87871f29761093dc171e97c9d0dd5ae7d43b0d1
F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31
F test/autovacuum_ioerr.test 9cf27275ca47b72e188a47c53b61b6d583a01d24
F test/enc.test 7a03417a1051fe8bc6c7641cf4c8c3f7e0066d52
F test/enc2.test e5e95be36676df5ba7c4c4c837cabcdf9fe01f5b
F test/enc3.test f6a5f0b7b7f3a88f030d3143729b87cd5c86d837
-F test/expr.test b2ce68f4b3298dd06867468b770ca2604068014e
+F test/expr.test 54d9d1cc05eb731fa62daa70f2d7163f8a03c54d
F test/fkey1.test 81bb13caaa78f58d7d191d7f535529f7c91d821a
-F test/func.test 47443316dfc7f78f173b207e35d63caeab42b7fe
+F test/func.test 9a467351e2a50c8846623ac7451d3bc2516b6e6d
F test/hook.test f8605cde4c77b2c6a4a73723bf6c507796a64dda
F test/in.test ed134f8d477a6280297ced1646de83cccf8f196d
F test/index.test 51e01a0928b4b61228917ddd8c6c0e2466547f6f
F test/select6.test ba1b4dd18a85bf9070c6df8d933ac4cfcacea6a6
F test/select7.test 63fb77d50f4dfdac4d4115842f083d2eb33a198c
F test/sort.test 87882e6c72a75d45e98a1c802c1ded0eac557d85
-F test/subquery.test 34ee5ea73751f880e4d9af9149bd9e14156347ae
+F test/subquery.test a3ed9f11a4e576ff31b539ab5d65953dc3d27a81
F test/subselect.test 3f3f7a940dc3195c3139f4d530385cb54665d614
F test/table.test a6b6b897731b4971f06db165d65bd608a9f2d461
F test/tableapi.test 6a66d58b37d46dc0f2b3c7d4bd2617d209399bd1
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
-P d4e19efcef68d834c55c7d496cdb3696d63a31a2
-R f22d940e12f93d2a72377ccf52f1ee48
+P c6fc49e61033419e78b6b10638d57f4942087961
+R 72b61915b4b55438a51d57f3746cef1c
U danielk1977
-Z ac1cb2768224dd061522306186c6fe8f
+Z 90e04e1ec937afd20abd081dbd664846
-c6fc49e61033419e78b6b10638d57f4942087961
\ No newline at end of file
+9c4d0e13e8c5f3fc4d7fd8f495898372293f7fad
\ No newline at end of file
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.243 2005/01/21 08:13:14 danielk1977 Exp $
+** $Id: btree.c,v 1.244 2005/01/21 11:55:26 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
}
#endif
+#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
/*
** Change the default pages size and the number of reserved bytes per page.
**
int sqlite3BtreeGetReserve(Btree *pBt){
return pBt->pageSize - pBt->usableSize;
}
+#endif /* !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM) */
/*
** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'
** COMMIT
** ROLLBACK
**
-** $Id: build.c,v 1.296 2005/01/21 00:44:22 danielk1977 Exp $
+** $Id: build.c,v 1.297 2005/01/21 11:55:27 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
sqliteDeleteIndex(db, pIndex);
}
+#ifndef SQLITE_OMIT_FOREIGN_KEY
/* Delete all foreign keys associated with this table. The keys
** should have already been unlinked from the db->aFKey hash table
*/
pFKey->zTo, strlen(pFKey->zTo)+1)!=pFKey );
sqliteFree(pFKey);
}
+#endif
/* Delete the Table structure itself.
*/
pDb = &db->aDb[iDb];
p = sqlite3HashInsert(&pDb->tblHash, zTabName, strlen(zTabName)+1, 0);
if( p ){
+#ifndef SQLITE_OMIT_FOREIGN_KEY
for(pF1=p->pFKey; pF1; pF1=pF1->pNextFrom){
int nTo = strlen(pF1->zTo) + 1;
pF2 = sqlite3HashFind(&pDb->aFKey, pF1->zTo, nTo);
}
}
}
+#endif
sqlite3DeleteTable(db, p);
}
db->flags |= SQLITE_InternChanges;
** does not exist.
*/
static int findDb(sqlite3 *db, Token *pName){
- int i; /* Database number */
+ int i = -1; /* Database number */
int n; /* Number of characters in the name */
Db *pDb; /* A database whose name space is being searched */
char *zName; /* Name we are searching for */
zName = sqlite3NameFromToken(pName);
if( zName ){
n = strlen(zName);
- for(pDb=db->aDb, i=0; i<db->nDb; i++, pDb++){
+ for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
if( n==strlen(pDb->zName) && 0==sqlite3StrICmp(pDb->zName, zName) ){
- sqliteFree(zName);
- return i;
+ break;
}
}
sqliteFree(zName);
}
- return -1;
+ return i;
}
/* The table or view or trigger name is passed to this routine via tokens
db->xCollNeeded(db->pCollNeededArg, db, (int)db->enc, zExternal);
sqliteFree(zExternal);
}
+#ifndef SQLITE_OMIT_UTF16
if( db->xCollNeeded16 ){
char const *zExternal;
sqlite3_value *pTmp = sqlite3GetTransientValue(db);
if( !zExternal ) return;
db->xCollNeeded16(db->pCollNeededArg, db, (int)db->enc, zExternal);
}
+#endif
}
/*
sqlite3VdbeAddOp(v, OP_CreateTable, p->iDb, 0);
zType = "table";
zType2 = "TABLE";
+#ifndef SQLITE_OMIT_VIEW
}else{
/* A view */
sqlite3VdbeAddOp(v, OP_Integer, 0, 0);
zType = "view";
zType2 = "VIEW";
+#endif
}
/* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
assert( p==pOld ); /* Malloc must have failed inside HashInsert() */
return;
}
+#ifndef SQLITE_OMIT_FOREIGN_KEY
for(pFKey=p->pFKey; pFKey; pFKey=pFKey->pNextFrom){
int nTo = strlen(pFKey->zTo) + 1;
pFKey->pNextTo = sqlite3HashFind(&pDb->aFKey, pFKey->zTo, nTo);
sqlite3HashInsert(&pDb->aFKey, pFKey->zTo, nTo, pFKey);
}
+#endif
pParse->pNewTable = 0;
db->nTable++;
db->flags |= SQLITE_InternChanges;
sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
goto exit_drop_table;
}
+
+#ifndef SQLITE_OMIT_VIEW
+ /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
+ ** on a table.
+ */
if( isView && pTab->pSelect==0 ){
sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
goto exit_drop_table;
sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
goto exit_drop_table;
}
+#endif
/* Generate code to remove the table from the master table
** on disk.
sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
goto exit_create_index;
}
+#ifndef SQLITE_OMIT_VIEW
if( pTab->pSelect ){
sqlite3ErrorMsg(pParse, "views may not be indexed");
goto exit_create_index;
}
+#endif
isTemp = pTab->iDb==1;
/*
}
}
+#ifndef SQLITE_OMIT_UTF16
/*
** Return the transient sqlite3_value object used for encoding conversions
** during SQL compilation.
}
return db->pValue;
}
+#endif
/*
** Check to see if pIndex uses the collating sequence pColl. Return
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test1.c,v 1.125 2005/01/21 03:12:16 danielk1977 Exp $
+** $Id: test1.c,v 1.126 2005/01/21 11:55:27 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
){
int rc;
sqlite3 *db;
- sqlite3_value *pVal;
extern void Md5_Register(sqlite3*);
if( argc!=2 ){
/* Use the sqlite3_create_function16() API here. Mainly for fun, but also
** because it is not tested anywhere else. */
if( rc==SQLITE_OK ){
+ sqlite3_value *pVal;
pVal = sqlite3ValueNew();
sqlite3ValueSetStr(pVal, -1, "x_sqlite_exec", SQLITE_UTF8, SQLITE_STATIC);
rc = sqlite3_create_function16(db,
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
-# $Id: attach.test,v 1.33 2005/01/21 04:25:47 danielk1977 Exp $
+# $Id: attach.test,v 1.34 2005/01/21 11:55:27 danielk1977 Exp $
#
set testdir [file dirname $argv0]
file delete -force cannot-read
}
+# Check the error message if we try to access a database that has
+# not been attached.
+do_test attach-6.3 {
+ catchsql {
+ CREATE TABLE no_such_db.t1(a, b, c);
+ }
+} {1 {unknown database no_such_db}}
+do_test attach-6.4 {
+ catchsql {
+ CREATE TEMP TABLE db2.temp1(a, b, c);
+ }
+} {1 {temporary table name must be unqualified}}
+
for {set i 2} {$i<=15} {incr i} {
catch {db$i close}
}
# This file implements regression tests for SQLite library. The
# focus of this script is testing the AUTOINCREMENT features.
#
-# $Id: autoinc.test,v 1.2 2004/11/22 13:35:42 danielk1977 Exp $
+# $Id: autoinc.test,v 1.3 2005/01/21 11:55:27 danielk1977 Exp $
#
set testdir [file dirname $argv0]
}
} {3 345}
+# Test that if the AUTOINCREMENT is applied to a non integer primary key
+# the error message is sensible.
+do_test autoinc-7.2 {
+ catchsql {
+ CREATE TABLE t8(x TEXT PRIMARY KEY AUTOINCREMENT);
+ }
+} {1 {AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY}}
+
catch {db2 close}
finish_test
# This file implements regression tests for SQLite library. The
# focus of this file is testing expressions.
#
-# $Id: expr.test,v 1.42 2005/01/21 03:12:16 danielk1977 Exp $
+# $Id: expr.test,v 1.43 2005/01/21 11:55:27 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
execsql {SELECT round(-('-'||'123'))}
} 123
+# Test an error message that can be generated by the LIKE expression
+do_test expr-10.1 {
+ catchsql {SELECT 'abc' LIKE 'abc' ESCAPE ''}
+} {1 {ESCAPE expression must be a single character}}
+do_test expr-10.2 {
+ catchsql {SELECT 'abc' LIKE 'abc' ESCAPE 'ab'}
+} {1 {ESCAPE expression must be a single character}}
+
finish_test
# This file implements regression tests for SQLite library. The
# focus of this file is testing built-in functions.
#
-# $Id: func.test,v 1.32 2005/01/20 02:17:02 danielk1977 Exp $
+# $Id: func.test,v 1.33 2005/01/21 11:55:28 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
}
} {1 {user function error}}
+# Test the quote function for BLOB and NULL values.
+do_test func-16.1 {
+ execsql {
+ CREATE TABLE tbl2(a, b);
+ }
+ set STMT [sqlite3_prepare $::DB "INSERT INTO tbl2 VALUES(?, ?)" -1 TAIL]
+ sqlite3_bind_blob $::STMT 1 abc 3
+ sqlite3_step $::STMT
+ sqlite3_finalize $::STMT
+ execsql {
+ SELECT quote(a), quote(b) FROM tbl2;
+ }
+} {X'616263' NULL}
+
finish_test
+
# This file implements regression tests for SQLite library. The
# focus of this script is testing correlated subqueries
#
-# $Id: subquery.test,v 1.1 2005/01/21 02:34:44 drh Exp $
+# $Id: subquery.test,v 1.2 2005/01/21 11:55:28 danielk1977 Exp $
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+ifcapable !subquery {
+ finish_test
+ return
+}
+
do_test subquery-1.1 {
execsql {
BEGIN;