Compare commits

...

5 Commits

Author SHA1 Message Date
drh 00fc26ae0e Version 3.6.14.1 (CVS 6655)
FossilOrigin-Name: e4267c87e523ff892a3f3e0673b6d689513a469f
2009-05-19 00:01:24 +00:00
drh e5be782aa8 Port the sqlite3_backup fix of check-in (6632), ticket #3858 onto the
3.6.14.1 branch. (CVS 6654)

FossilOrigin-Name: 0d3abee273c359b77649e6a08a9eaff09d3bde7b
2009-05-18 17:11:31 +00:00
drh 92c73c99d0 Update the configure script for the 3.6.14.1 release. (CVS 6653)
FossilOrigin-Name: 4ebb85018195d52d8eb0720284f7b2e480c24876
2009-05-18 16:22:42 +00:00
drh c69ff738ab Port patches from the trunk into the 3.6.14.1 branch:
the group_concat() fix of check-in (6616), ticket #3841 and the
pcache fix of check-in (6619), ticket #3844. (CVS 6652)

FossilOrigin-Name: 2a277c55b2f90d53208147423b409bc05e12ebd0
2009-05-18 16:14:25 +00:00
drh a53c0ea658 Update the version number for the 3.6.14.1 branch. (CVS 6651)
FossilOrigin-Name: f06cae3b5e42e5a2c1a30cd91a7c594e6cd834d0
2009-05-18 16:12:07 +00:00
11 changed files with 150 additions and 48 deletions
+1 -1
View File
@@ -1 +1 @@
3.6.14
3.6.14.1
Vendored
+11 -11
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.62 for sqlite 3.6.13.
# Generated by GNU Autoconf 2.62 for sqlite 3.6.14.1.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
PACKAGE_VERSION='3.6.13'
PACKAGE_STRING='sqlite 3.6.13'
PACKAGE_VERSION='3.6.14.1'
PACKAGE_STRING='sqlite 3.6.14.1'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -1487,7 +1487,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sqlite 3.6.13 to adapt to many kinds of systems.
\`configure' configures sqlite 3.6.14.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1552,7 +1552,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sqlite 3.6.13:";;
short | recursive ) echo "Configuration of sqlite 3.6.14.1:";;
esac
cat <<\_ACEOF
@@ -1670,7 +1670,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sqlite configure 3.6.13
sqlite configure 3.6.14.1
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1684,7 +1684,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sqlite $as_me 3.6.13, which was
It was created by sqlite $as_me 3.6.14.1, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2051,7 +2051,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
sqlite_version_sanity_check=`cat VERSION | tr -d '\n'`
sqlite_version_sanity_check=`cat $srcdir/VERSION | tr -d '\n'`
if test "$PACKAGE_VERSION" != "$sqlite_version_sanity_check" ; then
{ { $as_echo "$as_me:$LINENO: error: configure script is out of date:
configure \$PACKAGE_VERSION = $PACKAGE_VERSION
@@ -2065,7 +2065,7 @@ please regen with autoconf" >&2;}
fi
# The following RCS revision string applies to configure.in
# $Revision: 1.71 $
# $Revision: 1.71.2.1 $
#########
# Programs needed
@@ -13972,7 +13972,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sqlite $as_me 3.6.13, which was
This file was extended by sqlite $as_me 3.6.14.1, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14025,7 +14025,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sqlite config.status 3.6.13
sqlite config.status 3.6.14.1
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+14 -14
View File
@@ -1,11 +1,11 @@
C Version\s3.6.14\s(CVS\s6615)
D 2009-05-07T02:26:08
C Version\s3.6.14.1\s(CVS\s6655)
D 2009-05-19T00:01:25
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F Makefile.vxworks 51698ac39a2d114c1586b7694838f2f321c43f64
F README b974cdc3f9f12b87e851b04e75996d720ebf81ac
F VERSION 768db26884d4fad3631e6d435475edd072d4379c
F VERSION 6ed90f319c906d2d6fd3c153dc5714e1f1115f13
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F addopcodes.awk 215333be9d99c260e076c3080a81dba3ae928c45
F art/2005osaward.gif 0d1851b2a7c1c9d0ccce545f3e14bca42d7fd248
@@ -18,7 +18,7 @@ F art/powered_by_sqlite.gif 7fbcd7d3675391fd3d21672c14c05f5999eb60d1
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
F config.h.in 868fdb48c028421a203470e15c69ada15b9ba673
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
F configure 487875e451ac922f10276ee41611e0967ea72af0 x
F configure a5a92296f33c84689945a7ddf121fc6b2e56ea8d x
F configure.ac 14740970ddb674d92a9f5da89083dff1179014ff
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
@@ -103,7 +103,7 @@ F src/alter.c 8ab5824bde0a03dae5829f61557ab7c72757000a
F src/analyze.c e239496cfb5394ac8867f1c112905ddab8d01cd9
F src/attach.c 3b99611f04926fc69c35b1145603fc3ddb0ca967
F src/auth.c 98db07c2088455797678eb1031f42d4d94d18a71
F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d
F src/backup.c 8f985697354e7f3e8cf2a1f11a850d4f1a48da87
F src/bitvec.c ef370407e03440b0852d05024fb016b14a471d3d
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
F src/btree.c 7c4b02afea7efb561361f20408414fec68df898c
@@ -146,12 +146,12 @@ F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c 9ad9f45049a3c9eb0b0713b162ff0d7024ff7259
F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405
F src/pager.c e7171336ffb0f8adc41e55b63dbb2bc5a616a1ae
F src/pager.c 1379ce5cff06cb850482fa17ba5d7ecc728a166b
F src/pager.h 73f481a308a873ccd626d97331c081db3b53e2e5
F src/parse.y a0e8b8e5d646a6352098fccc9d3325b4234a05b9
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
F src/pcache1.c 35f8601c91c09a1e887a1914ebca07bb5afc7b89
F src/pcache1.c b08287d2cd208de6d40a6139afb69f3117a35cea
F src/pragma.c c26c16c49a80d03c8597f0e6c7daba53f283428f
F src/prepare.c 72d74e6d3b9c8eb0663b33ec6438aa718096ac79
F src/printf.c 3f4dca207a88258d37af5a7a03e800a825fe6456
@@ -203,7 +203,7 @@ F src/update.c deb930324dd67b7ad98234e1258a0ebcdd1ca0f9
F src/utf.c 9541d28f40441812c0b40f00334372a0542c00ff
F src/util.c 71c2d9d6befc0405377744585461246c30a4474b
F src/vacuum.c e8d178004377e97500c7ea87c8a3542976e3ea45
F src/vdbe.c 3cecc2bb87192a0a425623bd530d67cc1b368ce5
F src/vdbe.c 09e2a26881dad8c3503e6743f549f698e5e7550d
F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
F src/vdbeInt.h 43183a2a18654fa570219ab65e53a608057c48ae
F src/vdbeapi.c 86aa27a5f3493aaffb8ac051782aa3b22670d7ed
@@ -237,7 +237,7 @@ F test/autoinc.test ab549b48b389cabd92967b86c379ec8b31fa6c16
F test/autovacuum.test 25f891bc343a8bf5d9229e2e9ddab9f31a9ab5ec
F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6
F test/avtrans.test 1e901d8102706b63534dbd2bdd4d8f16c4082650
F test/backup.test 5e487ec8dad73e9d249e9bb9ca5346a03b601b07
F test/backup.test 86ae101e91e14fb2bf4214817716b410d53c48e7
F test/backup2.test 159419073d9769fdb1780ed7e5b391a046f898d5
F test/backup_ioerr.test 1f012e692f42c0442ae652443258f70e9f20fa38
F test/backup_malloc.test 1e063c6d75143d0d6e0ae77971dd690070369387
@@ -494,7 +494,7 @@ F test/pager2.test d4b7f6b70ff018b9995e622a32526b275f515042
F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
F test/pageropt.test 3ee6578891baaca967f0bd349e4abfa736229e1a
F test/pagesize.test 0d9ff3fedfce6e5ffe8fa7aca9b6d3433a2e843b
F test/pcache.test 70ad1d65cf73f6a0a7501e0236312eb214d93a55
F test/pcache.test af48f31b75d55b6867dd1fcfb44af361385f53ca
F test/pcache2.test 46efd980a89f737847b99327bda19e08fe11e402
F test/permutations.test 386b8e6b8e8e6aec41f6ed59a37353e412bfb00a
F test/pragma.test a35b0be36542477183168cdb8b743f5c0d883c4d
@@ -612,7 +612,7 @@ F test/tkt2832.test a9b0b74a02dca166a04d9e37739c414b10929caa
F test/tkt2854.test b81dc3144901b123fe5674471adf5a47ca48a7c3
F test/tkt2920.test a8737380e4ae6424e00c0273dc12775704efbebf
F test/tkt2927.test 4752868b9eeeb07a217f7f19f4cbaac98d6d086d
F test/tkt2942.test c5c87d179799ca6d1fbe83c815510b87cd5ec7ce
F test/tkt2942.test 70855de32e666b5393b65d9ec923c739245181e9
F test/tkt3080.test 1bca7579260920a66b4dd7e196e807c0f25ff804
F test/tkt3093.test fbdbc5b4969244ad11f540759003e361fcaf391f
F test/tkt3121.test 536df66a02838c26a12fe98639354ca1290ca68b
@@ -728,7 +728,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 93bdbc5e2f9771a30358cde03f0d3cb708d73d48
R 069e745868418be8cf275b6c2785a5b7
P 0d3abee273c359b77649e6a08a9eaff09d3bde7b
R c9ff2fe0e5d5bb93f15c93547bbd4db6
U drh
Z e1105c21d8149100fa62e58e0302b8e6
Z 01a9f898f4336d9bfeeb8c47ad3917b5
+1 -1
View File
@@ -1 +1 @@
469ad1ded35f5ff8ab2f6e8f776d73a9cea73527
e4267c87e523ff892a3f3e0673b6d689513a469f
+21 -13
View File
@@ -12,7 +12,7 @@
** This file contains the implementation of the sqlite3_backup_XXX()
** API functions and the related features.
**
** $Id: backup.c,v 1.13 2009/03/16 13:19:36 danielk1977 Exp $
** $Id: backup.c,v 1.13.2.1 2009/05/18 17:11:31 drh Exp $
*/
#include "sqliteInt.h"
#include "btreeInt.h"
@@ -44,6 +44,7 @@ struct sqlite3_backup {
Pgno nRemaining; /* Number of pages left to copy */
Pgno nPagecount; /* Total number of pages to copy */
int isAttached; /* True once backup has been registered with pager */
sqlite3_backup *pNext; /* Next backup associated with source pager */
};
@@ -157,6 +158,7 @@ sqlite3_backup *sqlite3_backup_init(
p->pDestDb = pDestDb;
p->pSrcDb = pSrcDb;
p->iNext = 1;
p->isAttached = 0;
if( 0==p->pSrc || 0==p->pDest ){
/* One (or both) of the named databases did not exist. An error has
@@ -167,18 +169,7 @@ sqlite3_backup *sqlite3_backup_init(
p = 0;
}
}
/* If everything has gone as planned, attach the backup object to the
** source pager. The source pager calls BackupUpdate() and BackupRestart()
** to notify this module if the source file is modified mid-backup.
*/
if( p ){
sqlite3_backup **pp; /* Pointer to head of pagers backup list */
sqlite3BtreeEnter(p->pSrc);
pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
p->pNext = *pp;
*pp = p;
sqlite3BtreeLeave(p->pSrc);
p->pSrc->nBackup++;
}
@@ -271,6 +262,19 @@ static int backupTruncateFile(sqlite3_file *pFile, i64 iSize){
return rc;
}
/*
** Register this backup object with the associated source pager for
** callbacks when pages are changed or the cache invalidated.
*/
static void attachBackupObject(sqlite3_backup *p){
sqlite3_backup **pp;
assert( sqlite3BtreeHoldsMutex(p->pSrc) );
pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
p->pNext = *pp;
*pp = p;
p->isAttached = 1;
}
/*
** Copy nPage pages from the source b-tree to the destination.
*/
@@ -340,6 +344,8 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
p->nRemaining = nSrcPage+1-p->iNext;
if( p->iNext>(Pgno)nSrcPage ){
rc = SQLITE_DONE;
}else if( !p->isAttached ){
attachBackupObject(p);
}
}
@@ -472,12 +478,14 @@ int sqlite3_backup_finish(sqlite3_backup *p){
/* Detach this backup from the source pager. */
if( p->pDestDb ){
p->pSrc->nBackup--;
}
if( p->isAttached ){
pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
while( *pp!=p ){
pp = &(*pp)->pNext;
}
*pp = p->pNext;
p->pSrc->nBackup--;
}
/* If a transaction is still open on the Btree, roll it back. */
+2 -2
View File
@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.586 2009/05/06 18:57:10 shane Exp $
** @(#) $Id: pager.c,v 1.586.2.1 2009/05/18 17:11:31 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3622,7 +3622,7 @@ static int pagerSharedLock(Pager *pPager){
);
}
if( sqlite3PcachePagecount(pPager->pPCache)>0 ){
if( pPager->pBackup || sqlite3PcachePagecount(pPager->pPCache)>0 ){
/* The shared-lock has just been acquired on the database file
** and there are already pages in the cache (from a previous
** read or write transaction). Check to see if the database
+6 -2
View File
@@ -16,7 +16,7 @@
** If the default page cache implementation is overriden, then neither of
** these two features are available.
**
** @(#) $Id: pcache1.c,v 1.11 2009/04/14 18:44:39 aswift Exp $
** @(#) $Id: pcache1.c,v 1.11.2.1 2009/05/18 16:14:25 drh Exp $
*/
#include "sqliteInt.h"
@@ -360,6 +360,7 @@ static void pcache1TruncateUnsafe(
PCache1 *pCache,
unsigned int iLimit
){
TESTONLY( int nPage = 0; ) /* Used to assert pCache->nPage is correct */
unsigned int h;
assert( sqlite3_mutex_held(pcache1.mutex) );
for(h=0; h<pCache->nHash; h++){
@@ -367,14 +368,17 @@ static void pcache1TruncateUnsafe(
PgHdr1 *pPage;
while( (pPage = *pp)!=0 ){
if( pPage->iKey>=iLimit ){
pcache1PinPage(pPage);
pCache->nPage--;
*pp = pPage->pNext;
pcache1PinPage(pPage);
pcache1FreePage(pPage);
}else{
pp = &pPage->pNext;
TESTONLY( nPage++ );
}
}
}
assert( pCache->nPage==nPage );
}
/******************************************************************************/
+2 -1
View File
@@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.842 2009/05/06 18:57:10 shane Exp $
** $Id: vdbe.c,v 1.842.2.1 2009/05/18 16:14:25 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -676,6 +676,7 @@ int sqlite3VdbeExec(
pOut = &p->aMem[pOp->p2];
sqlite3VdbeMemReleaseExternal(pOut);
pOut->flags = MEM_Null;
pOut->n = 0;
}else
/* Do common setup for opcodes marked with one of the following
+47 -1
View File
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the sqlite3_backup_XXX API.
#
# $Id: backup.test,v 1.9 2009/03/16 13:19:36 danielk1977 Exp $
# $Id: backup.test,v 1.9.2.1 2009/05/18 17:11:31 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -859,5 +859,51 @@ do_test backup-9.2.3 {
} {SQLITE_OK}
catch {db2 close}
ifcapable memorymanage {
db close
file delete -force test.db
file delete -force bak.db
sqlite3 db test.db
sqlite3 db2 test.db
sqlite3 db3 bak.db
do_test backup-10.1.1 {
execsql {
BEGIN;
CREATE TABLE t1(a, b);
INSERT INTO t1 VALUES(1, randstr(1000,1000));
INSERT INTO t1 VALUES(2, randstr(1000,1000));
INSERT INTO t1 VALUES(3, randstr(1000,1000));
INSERT INTO t1 VALUES(4, randstr(1000,1000));
INSERT INTO t1 VALUES(5, randstr(1000,1000));
CREATE INDEX i1 ON t1(a, b);
COMMIT;
}
} {}
do_test backup-10.1.2 {
sqlite3_backup B db3 main db2 main
B step 5
} {SQLITE_OK}
do_test backup-10.1.3 {
execsql {
UPDATE t1 SET b = randstr(500,500);
}
} {}
sqlite3_release_memory [expr 1024*1024]
do_test backup-10.1.3 {
B step 50
} {SQLITE_DONE}
do_test backup-10.1.4 {
B finish
} {SQLITE_OK}
do_test backup-10.1.5 {
execsql { PRAGMA integrity_check } db3
} {ok}
db2 close
db3 close
}
finish_test
+22 -1
View File
@@ -11,7 +11,7 @@
#
# This file is focused on testing the pcache module.
#
# $Id: pcache.test,v 1.4 2009/03/05 14:59:40 danielk1977 Exp $
# $Id: pcache.test,v 1.4.2.1 2009/05/18 16:14:26 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -145,4 +145,25 @@ do_test pcache-1.13 {
pcache_stats
} {current 15 max 15 min 10 recyclable 15}
do_test pcache-1.14 {
hexio_write test.db 24 [hexio_render_int32 1000]
execsql { SELECT * FROM sqlite_master }
pcache_stats
} {current 2 max 15 min 10 recyclable 2}
do_test pcache-1.15 {
execsql {
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1;
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2;
SELECT * FROM t3 ORDER BY a; SELECT * FROM t3;
SELECT * FROM t4 ORDER BY a; SELECT * FROM t4;
SELECT * FROM t5 ORDER BY a; SELECT * FROM t5;
SELECT * FROM t6 ORDER BY a; SELECT * FROM t6;
SELECT * FROM t7 ORDER BY a; SELECT * FROM t7;
SELECT * FROM t8 ORDER BY a; SELECT * FROM t8;
SELECT * FROM t9 ORDER BY a; SELECT * FROM t9;
}
pcache_stats
} {current 14 max 15 min 10 recyclable 14}
finish_test
+23 -1
View File
@@ -21,7 +21,7 @@
# But with the addition of the group_concat() function, suddenly the
# order does matter.
#
# $Id: tkt2942.test,v 1.1 2008/02/15 14:33:04 drh Exp $
# $Id: tkt2942.test,v 1.1.4.1 2009/05/18 16:14:26 drh Exp $
#
set testdir [file dirname $argv0]
@@ -58,5 +58,27 @@ do_test tkt2942.4 {
}
} {4,3,1,2}
do_test tkt2942-3841.1 {
execsql {
CREATE TABLE table2 (key TEXT, x TEXT);
CREATE TABLE list (key TEXT, value TEXT);
INSERT INTO table2 VALUES ("a", "alist");
INSERT INTO table2 VALUES ("b", "blist");
INSERT INTO list VALUES ("a", 1);
INSERT INTO list VALUES ("a", 2);
INSERT INTO list VALUES ("a", 3);
INSERT INTO list VALUES ("b", 4);
INSERT INTO list VALUES ("b", 5);
INSERT INTO list VALUES ("b", 6);
SELECT
table2.x,
(SELECT group_concat(list.value)
FROM list
WHERE list.key = table2.key)
FROM table2;
}
} {alist 1,2,3 blist 4,5,6}
finish_test