Add some code to sqlite3VdbeMemSetZeroBlob() so that it works (less efficiently) even when OMIT_INCRBLOB is defined. Ticket #3977. (CVS 6906)
FossilOrigin-Name: f5f7259d811ce8c2bf0bc64128256c4cd95f676a
This commit is contained in:
parent
5368f29ac4
commit
f16c62464d
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C When\sthe\sasynchronous\sIO\sbackend\sopens\sa\sfile\swith\sthe\sEXCLUSIVE\sflag\sset,\smake\ssure\sonly\sa\ssingle\sfile-descriptor\sis\sopened\s(not\sone\sfor\sreading\sand\sone\sfor\swriting).\sThis\schange\sfixes\s#3978.\s(CVS\s6905)
|
||||
D 2009-07-18T11:52:04
|
||||
C Add\ssome\scode\sto\ssqlite3VdbeMemSetZeroBlob()\sso\sthat\sit\sworks\s(less\sefficiently)\seven\swhen\sOMIT_INCRBLOB\sis\sdefined.\sTicket\s#3977.\s(CVS\s6906)
|
||||
D 2009-07-18T14:36:24
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -210,7 +210,7 @@ F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
|
||||
F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
|
||||
F src/vdbeaux.c 017bd2774528220c0c7b85342ad6b114011dfb53
|
||||
F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
|
||||
F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
|
||||
F src/vdbemem.c 50cc051619ba457d762e0f17dfe1d6c926c5c4d5
|
||||
F src/vtab.c 00902f289521041712fb0293d0bf8688c7af8e48
|
||||
F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04
|
||||
F src/where.c cf0d091748c2fa6f7df96e5b08d2db26fd2eb437
|
||||
@ -471,7 +471,7 @@ F test/malloc_common.tcl 984baeb6c6b185e798827d1187d426acc2bc4962
|
||||
F test/manydb.test b3d3bc4c25657e7f68d157f031eb4db7b3df0d3c
|
||||
F test/memdb.test 0825155b2290e900264daaaf0334b6dfe69ea498
|
||||
F test/memleak.test d2d2a1ff7105d32dc3fdf691458cf6cba58c7217
|
||||
F test/memsubsys1.test 05bbe8fc2ea1db2444b00c3f42816aaeb899d40c
|
||||
F test/memsubsys1.test fd8a33046b6e758e3eb93747dc4eec21fe56bf64
|
||||
F test/memsubsys2.test 72a731225997ad5e8df89fdbeae9224616b6aecc
|
||||
F test/minmax.test 722d80816f7e096bf2c04f4111f1a6c1ba65453d
|
||||
F test/minmax2.test 33504c01a03bd99226144e4b03f7631a274d66e0
|
||||
@ -498,7 +498,7 @@ F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
|
||||
F test/pageropt.test 3ee6578891baaca967f0bd349e4abfa736229e1a
|
||||
F test/pagesize.test 0d9ff3fedfce6e5ffe8fa7aca9b6d3433a2e843b
|
||||
F test/pcache.test eebc4420b37cb07733ae9b6e99c9da7c40dd6d58
|
||||
F test/pcache2.test 19a51b789e53878b4986e0b53746d004057455a4
|
||||
F test/pcache2.test 0d85f2ab6963aee28c671d4c71bec038c00a1d16
|
||||
F test/permutations.test 1ce2874df8fec876d0b963c7a3ef61c4e9df8827
|
||||
F test/pragma.test a35b0be36542477183168cdb8b743f5c0d883c4d
|
||||
F test/pragma2.test 5364893491b9231dd170e3459bfc2e2342658b47
|
||||
@ -741,7 +741,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||
P 1dd834a3d61496dfa138c36676a5fa6afaa4c817
|
||||
R f1aa535d9cd35c3b2f728ff47321f41c
|
||||
P 630e669b97a81f9125d4bdc18517738b74eecdec
|
||||
R be6a10c5cb1da4896236c9eaa54aec14
|
||||
U danielk1977
|
||||
Z d6beb909178b6d0b9cd42c748ec7d97a
|
||||
Z de67b8120f72a62c9a57858baf4513bf
|
||||
|
@ -1 +1 @@
|
||||
630e669b97a81f9125d4bdc18517738b74eecdec
|
||||
f5f7259d811ce8c2bf0bc64128256c4cd95f676a
|
@ -15,7 +15,7 @@
|
||||
** only within the VDBE. Interface routines refer to a Mem using the
|
||||
** name sqlite_value
|
||||
**
|
||||
** $Id: vdbemem.c,v 1.150 2009/06/25 01:47:12 drh Exp $
|
||||
** $Id: vdbemem.c,v 1.151 2009/07/18 14:36:24 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@ -498,6 +498,14 @@ void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){
|
||||
if( n<0 ) n = 0;
|
||||
pMem->u.nZero = n;
|
||||
pMem->enc = SQLITE_UTF8;
|
||||
|
||||
#ifdef SQLITE_OMIT_INCRBLOB
|
||||
sqlite3VdbeMemGrow(pMem, n, 0);
|
||||
if( pMem->z ){
|
||||
pMem->n = n;
|
||||
memset(pMem->z, 0, n);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# This file contains tests of the memory allocation subsystem
|
||||
#
|
||||
# $Id: memsubsys1.test,v 1.16 2009/07/18 08:30:45 danielk1977 Exp $
|
||||
# $Id: memsubsys1.test,v 1.17 2009/07/18 14:36:24 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -270,9 +270,6 @@ do_test memsubsys1-8.2 {
|
||||
} 0
|
||||
do_test memsubsys1-8.3 {
|
||||
sqlite3 db :memory:
|
||||
ifcapable !incrblob {
|
||||
db function zeroblob [list string repeat [binary format c 0]]
|
||||
}
|
||||
db eval {
|
||||
CREATE TABLE t1(x);
|
||||
INSERT INTO t1 VALUES(zeroblob(400));
|
||||
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# This file is focused on testing the pcache module.
|
||||
#
|
||||
# $Id: pcache2.test,v 1.4 2009/07/18 08:30:45 danielk1977 Exp $
|
||||
# $Id: pcache2.test,v 1.5 2009/07/18 14:36:24 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -46,9 +46,6 @@ do_test pcache2-1.3 {
|
||||
lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 1
|
||||
} {4}
|
||||
|
||||
ifcapable !incrblob {
|
||||
db function zeroblob [list string repeat [binary format c 0]]
|
||||
}
|
||||
|
||||
# Make lots of changes on the first connection. Verify that the
|
||||
# page cache usage does not grow to consume the page space set aside
|
||||
|
Loading…
Reference in New Issue
Block a user