Tentative fix for ticket #1567: disable the sqlite3pager_dont_write()
optimization when a statement transaction is active. We continue to look for a better fix. (CVS 2827) FossilOrigin-Name: e6106cc133e5210bfa248d811122e9bf7d6f2b7c
This commit is contained in:
parent
0190d1da46
commit
8f9b728b62
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
||||
C Add\ssome\svery\ssimple\stest\scases\s(and\sresulting\sbug\sfixes)\sfor\srelease_memory().\s(CVS\s2826)
|
||||
D 2005-12-19T14:18:11
|
||||
C Tentative\sfix\sfor\sticket\s#1567:\s\sdisable\sthe\ssqlite3pager_dont_write()\noptimization\swhen\sa\sstatement\stransaction\sis\sactive.\s\sWe\scontinue\sto\slook\nfor\sa\sbetter\sfix.\s(CVS\s2827)
|
||||
D 2005-12-19T16:15:31
|
||||
F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
|
||||
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -59,7 +59,7 @@ F src/os_unix.c 6394d2fa3a8bfbceb227579b44b4b343b5b54a8f
|
||||
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||
F src/os_win.c 9feb97f49b93d451f8ef7c5dd388e05a44647dc6
|
||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c 154825d3b0cd290bf1eeb2cfa6715fd08941fdec
|
||||
F src/pager.c f1969539777ee52900e740b0404a323a3e419c8b
|
||||
F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
|
||||
F src/parse.y 142a4b347c82217332e2d3dfa317ff2b7ac32f9c
|
||||
F src/pragma.c 8883b4d34796efa315bdd0ec1b03f580ef1575b9
|
||||
@ -238,6 +238,7 @@ F test/tkt1512.test 8efd8d07e27e99d7462f75b5711de65eb7708baf
|
||||
F test/tkt1514.test baa587a69fa2e8d575ebdaf1460f711281dcba49
|
||||
F test/tkt1536.test 83ff7a7b6e248016f8d682d4f7a4ae114070d466
|
||||
F test/tkt1537.test 8e6c8399b5be8abeaac18ca17133990806b175fa
|
||||
F test/tkt1567.test 18023cc3626a365f0118e17b66decedec93b1a6f
|
||||
F test/trace.test 9fd28695c463b90c2d32c387a432e01eb26e8ccf
|
||||
F test/trans.test 10506dc30305cfb8c4098359f7f6f64786f69c5e
|
||||
F test/trigger1.test 152aed5a1fa90709fe171f2ca501a6b7f7901479
|
||||
@ -328,7 +329,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 345addaa03d3bfa3429a59597fbd3addcff62e30
|
||||
R 4eebf0e3d04c46eed73662dfdeebac6b
|
||||
U danielk1977
|
||||
Z 06c0c23d27172e085b09b2f497c7c9da
|
||||
P 154282fca54bf03d310d6931660f99805bb5477f
|
||||
R a88619e0adec4a30e4cecb2642d4deb5
|
||||
U drh
|
||||
Z 6c73b3b457be153940d5352e6c72985a
|
||||
|
@ -1 +1 @@
|
||||
154282fca54bf03d310d6931660f99805bb5477f
|
||||
e6106cc133e5210bfa248d811122e9bf7d6f2b7c
|
@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.226 2005/12/19 14:18:11 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.227 2005/12/19 16:15:31 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@ -3119,7 +3119,7 @@ void sqlite3pager_dont_write(Pager *pPager, Pgno pgno){
|
||||
|
||||
pPg = pager_lookup(pPager, pgno);
|
||||
pPg->alwaysRollback = 1;
|
||||
if( pPg && pPg->dirty ){
|
||||
if( pPg && pPg->dirty && !pPager->stmtInUse ){
|
||||
if( pPager->dbSize==(int)pPg->pgno && pPager->origDbSize<pPager->dbSize ){
|
||||
/* If this pages is the last page in the file and the file has grown
|
||||
** during the current transaction, then do NOT mark the page as clean.
|
||||
|
51
test/tkt1567.test
Normal file
51
test/tkt1567.test
Normal file
@ -0,0 +1,51 @@
|
||||
# 2005 December 19 2005
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file implements regression tests for SQLite library.
|
||||
#
|
||||
# This file implements tests to verify that ticket #1567 is
|
||||
# fixed.
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
do_test tkt1567-1.1 {
|
||||
execsql {
|
||||
CREATE TABLE t1(a TEXT PRIMARY KEY);
|
||||
}
|
||||
set bigstr abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
for {set i 0} {$i<100} {incr i} {
|
||||
set x [format %5d [expr $i*2]]
|
||||
set sql "INSERT INTO t1 VALUES('$x-$bigstr')"
|
||||
execsql $sql
|
||||
}
|
||||
} {}
|
||||
integrity_check tkt1567-1.2
|
||||
|
||||
do_test tkt1567-1.3 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
UPDATE t1 SET a = a||'x' WHERE rowid%2==0;
|
||||
}
|
||||
} {}
|
||||
do_test tkt1567-1.4 {
|
||||
catchsql {
|
||||
UPDATE t1 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
|
||||
}
|
||||
} {1 {column a is not unique}}
|
||||
do_test tkt1567-1.5 {
|
||||
execsql {
|
||||
COMMIT;
|
||||
}
|
||||
} {}
|
||||
integrity_check tkt1567-1.6
|
||||
|
||||
finish_test
|
Loading…
x
Reference in New Issue
Block a user