mirror of
https://github.com/sqlite/sqlite.git
synced 2026-10-28 17:56:17 +08:00
Merge branch-3.54 fixes into trunk
FossilOrigin-Name: 11932649019188e1d8abd30c61dc88f0d9a425e659461bbb78056c86d4dab12d
This commit is contained in:
commit
814fd8ef4d
13 files changed
+217
-56
No files matched your search
@@ -666,6 +666,23 @@ do_test 9.1 {
|
||||
|
||||
$expert destroy
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Collation sequences with names of 0 or 1 characters.
|
||||
#
|
||||
foreach {tn coll} {1 x 2 {}} {
|
||||
reset_db
|
||||
db collate $coll {string compare}
|
||||
do_execsql_test 10.$tn.0 "CREATE TABLE t1(a COLLATE \"$coll\", b)"
|
||||
do_test 10.$tn.1 {
|
||||
set expert [sqlite3_expert_new db]
|
||||
$expert sql { SELECT * FROM t1 WHERE a=? }
|
||||
$expert analyze
|
||||
set res [string trim [$expert report 0 indexes]]
|
||||
$expert destroy
|
||||
set res
|
||||
} {CREATE INDEX t1_idx_00000061 ON t1(a);}
|
||||
}
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
@@ -299,7 +299,7 @@ static IdxConstraint *idxNewConstraint(int *pRc, const char *zColl){
|
||||
int nColl = STRLEN(zColl);
|
||||
|
||||
assert( *pRc==SQLITE_OK );
|
||||
pNew = (IdxConstraint*)idxMalloc(pRc, sizeof(IdxConstraint) * nColl + 1);
|
||||
pNew = (IdxConstraint*)idxMalloc(pRc, sizeof(IdxConstraint) + nColl + 1);
|
||||
if( pNew ){
|
||||
pNew->zColl = (char*)&pNew[1];
|
||||
memcpy(pNew->zColl, zColl, nColl+1);
|
||||
|
||||
+21
-5
@@ -557,6 +557,9 @@ struct Fts5SegIter {
|
||||
i64 iRowid; /* Current rowid */
|
||||
int nPos; /* Number of bytes in current position list */
|
||||
u8 bDel; /* True if the delete flag is set */
|
||||
|
||||
/* True if the current entry shadows an entry that has the delete flag set */
|
||||
u8 bDelDup;
|
||||
};
|
||||
|
||||
static int fts5IndexCorruptRowid(Fts5Index *pIdx, i64 iRowid){
|
||||
@@ -3115,6 +3118,10 @@ static int fts5MultiIterDoCompare(Fts5Iter *pIter, int iOut){
|
||||
assert_nc( i2!=0 );
|
||||
pRes->bTermEq = 1;
|
||||
if( p1->iRowid==p2->iRowid ){
|
||||
/* p2 is about to be advanced past this entry. If it, or an entry
|
||||
** it shadowed, has the delete flag set, record this on p1. */
|
||||
p1->bDelDup |= (p2->bDel | p2->bDelDup);
|
||||
p2->bDelDup = 0;
|
||||
return i2;
|
||||
}
|
||||
res = ((p1->iRowid > p2->iRowid)==pIter->bRev) ? -1 : +1;
|
||||
@@ -4877,6 +4884,14 @@ static void fts5IndexMergeLevel(
|
||||
int nPos; /* position-list size field value */
|
||||
int nTerm;
|
||||
const u8 *pTerm;
|
||||
int bDel; /* True to set delete flag on output */
|
||||
|
||||
/* If this entry has the delete flag set, or shadows an entry with the
|
||||
** delete flag set, set the delete flag on the output. Unless the output
|
||||
** will be the oldest segment in the table - in that case the delete flag
|
||||
** may be discarded. */
|
||||
bDel = bOldest ? 0 : (pSegIter->bDel || pSegIter->bDelDup);
|
||||
pSegIter->bDelDup = 0;
|
||||
|
||||
pTerm = fts5MultiIterTerm(pIter, &nTerm);
|
||||
if( nTerm!=term.n || fts5Memcmp(pTerm, term.p, nTerm) ){
|
||||
@@ -4888,7 +4903,7 @@ static void fts5IndexMergeLevel(
|
||||
}
|
||||
|
||||
/* Check for key annihilation. */
|
||||
if( pSegIter->nPos==0 && (bOldest || pSegIter->bDel==0) ) continue;
|
||||
if( pSegIter->nPos==0 && (bOldest || bDel==0) ) continue;
|
||||
|
||||
if( p->rc==SQLITE_OK && bTermWritten==0 ){
|
||||
/* This is a new term. Append a term to the output segment. */
|
||||
@@ -4901,7 +4916,7 @@ static void fts5IndexMergeLevel(
|
||||
fts5WriteAppendRowid(p, &writer, fts5MultiIterRowid(pIter));
|
||||
|
||||
if( eDetail==FTS5_DETAIL_NONE ){
|
||||
if( pSegIter->bDel ){
|
||||
if( bDel ){
|
||||
fts5BufferAppendVarint(&p->rc, &writer.writer.buf, 0);
|
||||
if( pSegIter->nPos>0 ){
|
||||
fts5BufferAppendVarint(&p->rc, &writer.writer.buf, 0);
|
||||
@@ -4909,7 +4924,7 @@ static void fts5IndexMergeLevel(
|
||||
}
|
||||
}else{
|
||||
/* Append the position-list data to the output */
|
||||
nPos = pSegIter->nPos*2 + pSegIter->bDel;
|
||||
nPos = pSegIter->nPos*2 + bDel;
|
||||
fts5BufferAppendVarint(&p->rc, &writer.writer.buf, nPos);
|
||||
fts5ChunkIterate(p, pSegIter, (void*)&writer, fts5MergeChunkCallback);
|
||||
}
|
||||
@@ -5348,7 +5363,8 @@ static void fts5DoSecureDelete(
|
||||
assert_nc( iSOP<=pSeg->iLeafOffset );
|
||||
|
||||
if( bDetailNone ){
|
||||
while( iSOP<pSeg->iLeafOffset ){
|
||||
int iEnd = pSeg->iLeafOffset - (pSeg->bDel ? 1 + pSeg->nPos : 0);
|
||||
while( iSOP<iEnd ){
|
||||
if( aPg[iSOP]==0x00 ) iSOP++;
|
||||
if( aPg[iSOP]==0x00 ) iSOP++;
|
||||
iStart = iSOP;
|
||||
@@ -5413,7 +5429,7 @@ static void fts5DoSecureDelete(
|
||||
|
||||
if( pSeg->bDel ){
|
||||
iOff += sqlite3Fts5PutVarint(&aPg[iOff], iDelta);
|
||||
aPg[iOff++] = 0x01;
|
||||
aPg[iOff++] = bDetailNone ? 0x00 : 0x01;
|
||||
}else if( bLastInDoclist==0 ){
|
||||
if( iNextOff!=iPgIdx ){
|
||||
u64 iNextDelta = 0;
|
||||
|
||||
@@ -344,5 +344,69 @@ foreach {tn detail} {
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Secure-delete of an entry that is itself a delete marker with content
|
||||
# (an INSERT OR REPLACE of an existing rowid). In detail=none mode this
|
||||
# used to corrupt the leaf page.
|
||||
#
|
||||
foreach {tn detail} {
|
||||
1 full
|
||||
2 column
|
||||
3 none
|
||||
} {
|
||||
reset_db
|
||||
do_execsql_test 7.$tn.0 "
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(x, detail=$detail);
|
||||
"
|
||||
do_execsql_test 7.$tn.1 {
|
||||
INSERT INTO t1(rowid, x) VALUES(1, 'a');
|
||||
INSERT OR REPLACE INTO t1(rowid, x) VALUES(1, 'a');
|
||||
INSERT INTO t1(t1, rank) VALUES('secure-delete', 1);
|
||||
DELETE FROM t1 WHERE rowid=1;
|
||||
}
|
||||
do_execsql_test 7.$tn.2 {
|
||||
SELECT count(*) FROM t1;
|
||||
SELECT rowid FROM t1('a');
|
||||
} {0}
|
||||
do_execsql_test 7.$tn.3 {
|
||||
INSERT INTO t1(t1) VALUES('integrity-check');
|
||||
}
|
||||
}
|
||||
|
||||
foreach_detail_mode $::testprefix-8 {
|
||||
reset_db
|
||||
do_execsql_test 1 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(x, detail=%DETAIL%);
|
||||
INSERT INTO t1(t1, rank) VALUES ('pgsz', 32);
|
||||
INSERT INTO t1(t1, rank) VALUES ('usermerge', 2);
|
||||
INSERT INTO t1(rowid, x) VALUES (1, 'c');
|
||||
INSERT INTO t1(rowid, x) VALUES (2, 'a b d e f g h');
|
||||
INSERT INTO t1(t1) VALUES ('optimize');
|
||||
}
|
||||
|
||||
do_execsql_test 2 {
|
||||
DELETE FROM t1 WHERE rowid = 1;
|
||||
INSERT INTO t1(t1, rank) VALUES ('secure-delete', 1);
|
||||
INSERT INTO t1(rowid, x) VALUES (1, 'c');
|
||||
INSERT INTO t1(t1, rank) VALUES ('merge', 1);
|
||||
}
|
||||
|
||||
do_execsql_test 3 {
|
||||
DELETE FROM t1 WHERE rowid = 1;
|
||||
}
|
||||
|
||||
do_execsql_test 4 {
|
||||
SELECT count(*) FROM t1;
|
||||
} {1}
|
||||
|
||||
do_execsql_test 5 {
|
||||
SELECT rowid FROM t1 WHERE t1 MATCH 'c';
|
||||
}
|
||||
|
||||
do_execsql_test 6 {
|
||||
PRAGMA integrity_check;
|
||||
} {ok}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -148,4 +148,29 @@ do_execsql_test 3.1 {
|
||||
ROLLBACK TO nightly;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
vec1_load db
|
||||
|
||||
do_execsql_test 4.0 {
|
||||
CREATE VIRTUAL TABLE v1 USING vec1(v);
|
||||
INSERT INTO v1(rowid, v)
|
||||
VALUES(1, vec1_from_json('[1,0]')), (2, vec1_from_json('[0,1]'));
|
||||
}
|
||||
|
||||
do_execsql_test 4.1 {
|
||||
SAVEPOINT s1;
|
||||
INSERT INTO v1(cmd, arg) VALUES('rebuild', '{index:"flat"}');
|
||||
ROLLBACK TO s1;
|
||||
RELEASE s1;
|
||||
}
|
||||
|
||||
do_execsql_test 4.2 {
|
||||
SELECT rowid FROM v1(vec1_from_json('[1,0]'), 5);
|
||||
} {1 2}
|
||||
|
||||
do_execsql_test 4.3 { SELECT rowid FROM v1 } {1 2}
|
||||
|
||||
do_execsql_test 4.4 { PRAGMA integrity_check } {ok}
|
||||
|
||||
finish_test
|
||||
@@ -12031,8 +12031,14 @@ static int vec1ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
|
||||
static int vec1RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
|
||||
Vec1Tab *pTab = (Vec1Tab*)pVtab;
|
||||
UNUSED_PARAMETER(iSavepoint);
|
||||
|
||||
/* Discard any cached writes */
|
||||
vec1FinishWriter(pTab, 1);
|
||||
|
||||
/* Drop the in-memory cache of both the config and the model. The
|
||||
** database ROLLBACK TO operation may have modified them on disk. */
|
||||
vec1UnloadConfig(pTab);
|
||||
vec1UnloadModel(pTab);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2258,7 +2258,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
that we're generally fetching rows of mixed data types. As of
|
||||
3.54, it still behaves that way when passed the undefined value
|
||||
resp. is not passed a value, but will coerce each column to the
|
||||
request type of it is not the undefined value. It is not
|
||||
requested type if it is not the undefined value. It is not
|
||||
believed that this change adversely affects any existing
|
||||
client-level code because this argument was ignored and
|
||||
applications passing a non-undefined value were not necessarily
|
||||
|
||||
@@ -405,7 +405,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
if(pool.getFileCount() < pool.getCapacity()) {
|
||||
// Choose an unassociated OPFS file from the pool.
|
||||
sah = pool.nextAvailableSAH();
|
||||
pool.setAssociatedPath(sah, path, flags);
|
||||
pool.setClientPath(sah, path, flags);
|
||||
}else{
|
||||
// File pool is full.
|
||||
toss('SAH pool is full. Cannot create file',path);
|
||||
@@ -527,7 +527,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
/* Maps SAH to an abstract File Object which contains
|
||||
various metadata about that handle. */
|
||||
|
||||
/** Buffer used by [sg]etAssociatedPath(). */
|
||||
/** Buffer used by [sg]etClientPath(). */
|
||||
#apBody = new Uint8Array(HEADER_CORPUS_SIZE);
|
||||
// DataView for this.#apBody
|
||||
#dvBody;
|
||||
@@ -596,7 +596,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
const h = await this.#dhOpaque.getFileHandle(name, {create:true});
|
||||
const ah = await h.createSyncAccessHandle();
|
||||
this.#mapSAHToName.set(ah,name);
|
||||
this.setAssociatedPath(ah, '', 0);
|
||||
this.setClientPath(ah, '', 0);
|
||||
//this.#createFileObject(ah,undefined,name);
|
||||
}
|
||||
return this.getCapacity();
|
||||
@@ -702,9 +702,9 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
this.#mapSAHToName.set(ah, name);
|
||||
if(clearFiles){
|
||||
ah.truncate(HEADER_OFFSET_DATA);
|
||||
this.setAssociatedPath(ah, '', 0);
|
||||
this.setClientPath(ah, '', 0);
|
||||
}else{
|
||||
const path = this.getAssociatedPath(ah);
|
||||
const path = this.getClientPath(ah);
|
||||
if(path){
|
||||
this.#mapFilenameToSAH.set(path, ah);
|
||||
}else{
|
||||
@@ -728,43 +728,57 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
Given an SAH, returns the client-specified name of
|
||||
that file by extracting it from the SAH's header.
|
||||
|
||||
On error, it disassociates SAH from the pool and
|
||||
returns an empty string.
|
||||
On error it disassociates SAH from the pool and returns an
|
||||
empty string. Propagates any exceptions from the SAH API and
|
||||
throws for short header reads.
|
||||
*/
|
||||
getAssociatedPath(sah){
|
||||
sah.read(this.#apBody, {at: 0});
|
||||
getClientPath(sah){
|
||||
const nRead = sah.read(this.#apBody, {at: 0});
|
||||
const nSah = sah.getSize();
|
||||
const minSz = Math.min(this.#apBody.byteLength, nSah);
|
||||
if( nRead<minSz ){
|
||||
toss("OPFSSAHPool[",this.vfsName,"]: Short header read:",
|
||||
nRead,"of", minSz," bytes");
|
||||
}
|
||||
// Delete any unexpected files left over by previous
|
||||
// untimely errors...
|
||||
// untimely errors, recovering when we can...
|
||||
const flags = this.#dvBody.getUint32(HEADER_OFFSET_FLAGS);
|
||||
const nPath = this.#apBody.indexOf(0);
|
||||
if( nPath>0
|
||||
&& nSah>HEADER_OFFSET_DATA
|
||||
&& 0===(flags & capi.SQLITE_OPEN_DELETEONCLOSE) ){
|
||||
/* This entry's header has presumably been "torn" by untimely
|
||||
death during a write, but we can recover from that.
|
||||
Discussion: bugs:7418667df7 */
|
||||
return textDecoder.decode(this.#apBody.subarray(0, nPath));
|
||||
}
|
||||
if(this.#apBody[0] &&
|
||||
((flags & capi.SQLITE_OPEN_DELETEONCLOSE) ||
|
||||
(flags & PERSISTENT_FILE_TYPES)===0)){
|
||||
warn(`Removing file with unexpected flags ${flags.toString(16)}`,
|
||||
this.#apBody);
|
||||
this.setAssociatedPath(sah, '', 0);
|
||||
this.setClientPath(sah, '', 0);
|
||||
return '';
|
||||
}
|
||||
|
||||
const fileDigest = new Uint32Array(HEADER_DIGEST_SIZE / 4);
|
||||
sah.read(fileDigest, {at: HEADER_OFFSET_DIGEST});
|
||||
const compDigest = this.computeDigest(this.#apBody, flags);
|
||||
//warn("getAssociatedPath() flags",'0x'+flags.toString(16), "compDigest", compDigest);
|
||||
//warn("getClientPath() flags",'0x'+flags.toString(16), "compDigest", compDigest);
|
||||
if(fileDigest.every((v,i) => v===compDigest[i])){
|
||||
// Valid digest
|
||||
const pathBytes = this.#apBody.findIndex((v)=>0===v);
|
||||
if(0===pathBytes){
|
||||
if(0===nPath){
|
||||
// This file is unassociated, so truncate it to avoid
|
||||
// leaving stale db data laying around.
|
||||
sah.truncate(HEADER_OFFSET_DATA);
|
||||
}
|
||||
//warn("getAssociatedPath() flags",'0x'+flags.toString(16), "compDigest", compDigest,"pathBytes",pathBytes);
|
||||
return pathBytes
|
||||
? textDecoder.decode(this.#apBody.subarray(0,pathBytes))
|
||||
//warn("getClientPath() flags",'0x'+flags.toString(16), "compDigest", compDigest,"nPath",nPath);
|
||||
return nPath
|
||||
? textDecoder.decode(this.#apBody.subarray(0, nPath))
|
||||
: '';
|
||||
}else{
|
||||
// Invalid digest
|
||||
warn('Disassociating file with bad digest.');
|
||||
this.setAssociatedPath(sah, '', 0);
|
||||
this.setClientPath(sah, '', 0);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -779,7 +793,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
is falsy. This function removes the mapping of that name to an
|
||||
SAH.
|
||||
*/
|
||||
setAssociatedPath(sah, path, flags, nameToRemove){
|
||||
setClientPath(sah, path, flags, nameToRemove){
|
||||
const enc = textEncoder.encodeInto(path, this.#apBody);
|
||||
if(HEADER_MAX_PATH_SIZE <= enc.written + 1/*NUL byte*/){
|
||||
toss("Path too long:",path);
|
||||
@@ -794,7 +808,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
this.#apBody.fill(0, enc.written, HEADER_MAX_PATH_SIZE);
|
||||
this.#dvBody.setUint32(HEADER_OFFSET_FLAGS, flags);
|
||||
const digest = this.computeDigest(this.#apBody, flags);
|
||||
//console.warn("setAssociatedPath(",path,") digest",digest);
|
||||
//console.warn("setClientPath(",path,") digest",digest);
|
||||
sah.write(this.#apBody, {at: 0});
|
||||
if(nameToRemove){
|
||||
/* The placement of this is very specific: between the above
|
||||
@@ -896,7 +910,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
deletePath(path) {
|
||||
const sah = this.#mapFilenameToSAH.get(path);
|
||||
if(sah) {
|
||||
this.setAssociatedPath(sah, '', 0, path);
|
||||
this.setClientPath(sah, '', 0, path);
|
||||
}
|
||||
return !!sah;
|
||||
}
|
||||
@@ -1121,10 +1135,10 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
at: HEADER_OFFSET_DATA + 18
|
||||
}/*force db out of WAL mode*/);
|
||||
}catch(e){
|
||||
this.setAssociatedPath(sah, '', 0);
|
||||
this.setClientPath(sah, '', 0);
|
||||
throw e;
|
||||
}
|
||||
this.setAssociatedPath(sah, name, capi.SQLITE_OPEN_MAIN_DB);
|
||||
this.setClientPath(sah, name, capi.SQLITE_OPEN_MAIN_DB);
|
||||
return nWrote;
|
||||
}
|
||||
|
||||
@@ -1139,7 +1153,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
const n = bytes.byteLength;
|
||||
const nWrote = sah.write(bytes, {at: HEADER_OFFSET_DATA});
|
||||
if(nWrote != n){
|
||||
this.setAssociatedPath(sah, '', 0);
|
||||
this.setClientPath(sah, '', 0);
|
||||
toss("Expected to write "+n+" bytes but wrote "+nWrote+".");
|
||||
}else{
|
||||
sah.truncate(HEADER_OFFSET_DATA + n
|
||||
@@ -1147,7 +1161,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
existing file with a shorter one. */);
|
||||
sah.write(new Uint8Array([1,1]), {at: HEADER_OFFSET_DATA+18}
|
||||
/* force db out of WAL mode */);
|
||||
this.setAssociatedPath(sah, name, capi.SQLITE_OPEN_MAIN_DB);
|
||||
this.setClientPath(sah, name, capi.SQLITE_OPEN_MAIN_DB);
|
||||
}
|
||||
return nWrote;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
C Prevent\sapplication-defined\sfunctions\sthat\sinvoke\sDDL\sstatement\sor\nperform\sother\smischief\sfrom\sdeleting\sthe\sschema\sout\sfrom\sunder\sthe\nstatement\sthat\scalled\sthe\sfunction.\n[bugs:/info/2026-10-25T19:26:00Z|Bug\s2026-10-25T19:26:00Z]
|
||||
D 2026-10-27T14:58:34.430
|
||||
C Merge\sbranch-3.54\sfixes\sinto\strunk
|
||||
D 2026-10-27T15:11:21.905
|
||||
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
@@ -72,8 +72,8 @@ F doc/wal-lock.md 7db0cd61e2000b545b78ce89b0c2a9a8dd8d64c097839258ac10d7c5c4156e
|
||||
F ext/README.md 6eb1ac267d917767952ed0ef63f55de003b6a5da433ce1fa389e1a9532e73132
|
||||
F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
|
||||
F ext/expert/expert.c 9f4d6751981bf5dda7b7480f6f878659d032a47fe74d84f31f80fdc05d6cad78
|
||||
F ext/expert/expert1.test f9931fb1b469aef5dc8205e71009a9ddfd450ffa462067b735485a45810ca040
|
||||
F ext/expert/sqlite3expert.c 869933c75db0d101f91d2b145bddaf8007e6e447ac788248572e90f45e7f75c3
|
||||
F ext/expert/expert1.test 5af93d35973d9cd520448d469dee113bf34b3b6f847033bbbdd08c7cde8d04c2
|
||||
F ext/expert/sqlite3expert.c ceb2f7f0fc75d0a80bf833faf85ae51d7b6ed6eec038df9cb017f10ccf66c1bd
|
||||
F ext/expert/sqlite3expert.h ca81efc2679a92373a13a3e76a6138d0310e32be53d6c3bfaedabd158ea8969b
|
||||
F ext/expert/test_expert.c c395134bd6d4efa594a7d26578a1cb624c4027b79b4b5fcd44736c5ef1f5f725
|
||||
F ext/fts3/README.content b9078d0843a094d86af0d48dffbff13c906702b4c3558012e67b9c7cc3bf59ee
|
||||
@@ -114,7 +114,7 @@ F ext/fts5/fts5_buffer.c dcc3f0352339fe79c9d8abbc1c2009bc3469206467880bf43558447
|
||||
F ext/fts5/fts5_config.c d5df08345abc813a0b58be6b2e08ad9b3ba9be355c3ca3ae36226ffea760876f
|
||||
F ext/fts5/fts5_expr.c 77e1a5e4aa11209d38f488afeb7ee8a96b92c782154d67dedd5ec3c8a36f45aa
|
||||
F ext/fts5/fts5_hash.c 341a08ad0153b397b819ef3d7a7959c1dc3c84a6988a431d93dece8bd62ae10e
|
||||
F ext/fts5/fts5_index.c d8a75dc0319b63d121f7a0ea8bd0fc465c1496580a0ca14f9e4de0e9f4598a33
|
||||
F ext/fts5/fts5_index.c 394aa90e12ba96db7fc4755447db985ce011e9a36b24fa37bc84ce44f0d73966
|
||||
F ext/fts5/fts5_main.c 4b588e2b8218021f3985d930f9dbf4eea4155c6e9cfa997fc9bc25ee8b11e448
|
||||
F ext/fts5/fts5_storage.c 083d868163978ce078a437c426b20da04422e38e7e8c428a283452308bb14f5e
|
||||
F ext/fts5/fts5_tcl.c aed8905b1a3c6ecc94da15e9cc54d889045b9eacecc7a17b6fcc1294225f7716
|
||||
@@ -241,7 +241,7 @@ F ext/fts5/test/fts5rebuild.test dc09779fbbe151ab68206a0931c10a611912a7a12c7a85d
|
||||
F ext/fts5/test/fts5restart.test 9af2084b8e065130037b95f05f3f220bb7973903a7701e2c5fb916dff7cf80c5
|
||||
F ext/fts5/test/fts5rowid.test 8632829fec04996832a4cfb4f0bd89721ba65b7e398c1731741bdb63f070e1a3
|
||||
F ext/fts5/test/fts5savepoint.test aa78833311944b10e68d2f8781ba6776565b590ca8a347c51eb059283490b671
|
||||
F ext/fts5/test/fts5secure.test a02f771742fb2b1b9bdcb4bf523bcf2d0aa1ff597831d40fe3e72aaa6d0ec40f
|
||||
F ext/fts5/test/fts5secure.test 15816af5db9e185ca7e387a5d61267aac52adf51cd3d166da82d82e7ef057cbe
|
||||
F ext/fts5/test/fts5secure2.test 2e961d7eef939f294c56b5d895cac7f1c3a60b934ee2cfd5e5e620bdf1ba6bbc
|
||||
F ext/fts5/test/fts5secure3.test 6d066828d225b0dbe5db818d4d6165df7bb70210e68a577e858e8762400d5a23
|
||||
F ext/fts5/test/fts5secure4.test 0d10a80590c07891478700af7793b232962042677432b9846cf7fc8337b67c97
|
||||
@@ -634,7 +634,7 @@ F ext/vec1/test/vec1overflow.test f007c6b149b434bc6593501c48214535151cb989620e18
|
||||
F ext/vec1/test/vec1pq.test 81d74f516971a3883782d2d443efe3f6a7501d4c9f980a758e1c2eb8b5f22885
|
||||
F ext/vec1/test/vec1query.test 7120a2824b9f6563f7986c436204870c9d6e4af2bff3a39d38ef277188ef9189
|
||||
F ext/vec1/test/vec1rebuild.test 1f801376985dfd73b0d4b7a8f4c76fe682865b0d77e46df011093d035809be04
|
||||
F ext/vec1/test/vec1rollback.test 41565f526e153b24615ed38edda835fbb185f2f07f5e72f5c947add810b33d71
|
||||
F ext/vec1/test/vec1rollback.test c6ea3a5086e4f8cecc0b802e9231461b2f1861852745dcdeea7d4680dff60d95
|
||||
F ext/vec1/test/vec1rotate.test a90773e8ef8259f81c793cb335e3c023295231416c37d89e387d524304dadfde
|
||||
F ext/vec1/test/vec1rotate2.test 7e4e06b3f970190c4ac28256db7aa924796b9a1fe1985941e35db4604c8717a0
|
||||
F ext/vec1/test/vec1round.test b38735c7e5b0af833505cc639d60816cfca2143b7461a1b443815c4be2b9d3ed
|
||||
@@ -649,7 +649,7 @@ F ext/vec1/tool/vec1_algo_test.c 2777488a8b9ab9545732562c93988aa2424d7afd8b4895d
|
||||
F ext/vec1/tool/vec1bench.tcl a117caee3cb99712f0477fe2fa85c94c260866951d3a9d667b62631b480c2d2d
|
||||
F ext/vec1/tool/vec1bench_addcols.tcl 8c509253d07b179928f2ee32e3591a2c70d13c914217e1328c01afa148717051
|
||||
F ext/vec1/tool/vec1bench_vibe2db.py 84ddb0236bc3d02a0393abce41986a1b7dad7f0d83884576f8318c2883e3aed3
|
||||
F ext/vec1/vec1.c 6b7f755e3d86ee80d02c9bc0fcedfdd39c3bb486bc2021f992bd42a0548325d6
|
||||
F ext/vec1/vec1.c 473b97ca6eae9dff8eed514859a9e90c546b1f13312f1ed2a7b2960db576ed74
|
||||
F ext/wasm/GNUmakefile b656d39f7792b6ff8d9129d38452804bccba29e1fe22976655cebb3e1e9f184b
|
||||
F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a
|
||||
F ext/wasm/README.md 6d820c98468ebcee1dbf547467a03f65d256a2be48a9dcbeb5637d3da569c6fe
|
||||
@@ -668,14 +668,14 @@ F ext/wasm/api/post-js-footer.js a50c1a2c4d008aede7b2aa1f18891a7ee71437c2f415b8a
|
||||
F ext/wasm/api/post-js-header.js f35d2dcf1ab7f22a93d565f8e0b622a2934fc4e743edf3b708e4dd8140eeff55
|
||||
F ext/wasm/api/pre-js.c-pp.js 145da76085bd31bbe9c9b2d52bc56106116745576699d03b8bd6eaaf78e1e537
|
||||
F ext/wasm/api/sqlite3-api-glue.c-pp.js 15ac205ced4b55134de9f447fff285906072f4410bd5d1b1db8408d39b700c6b
|
||||
F ext/wasm/api/sqlite3-api-oo1.c-pp.js d41c122250a213002adf294487156ed46f146760a4d904e13996dcc425d7c15e
|
||||
F ext/wasm/api/sqlite3-api-oo1.c-pp.js 3c6b5327b870ed824abdc00a4f1abe9878b5b050af3ca6c454a802509dcb6ef8
|
||||
F ext/wasm/api/sqlite3-api-prologue.js 0084e15d66fbcd75cacbaa58e3b473d5e57082c30f3122be7fdadff5589cf6b6
|
||||
F ext/wasm/api/sqlite3-api-worker1.c-pp.js eee70a9962c02d86d2332f2432e257ccdf5eb7a742f90d34bdc137346fbc97ae
|
||||
F ext/wasm/api/sqlite3-license-version-header.js 98d90255a12d02214db634e041c8e7f2f133d9361a8ebf000ba9c9af4c6761cc
|
||||
F ext/wasm/api/sqlite3-opfs-async-proxy.c-pp.js f378c8edd98941bdfa32bae0db86f5cc6410c69b28943d9761f2d95511630029
|
||||
F ext/wasm/api/sqlite3-vfs-helper.c-pp.js 57a54bd6351a52100743b1eac44fc20a858f44838df249bb1e7facac2127b110
|
||||
F ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js fcb4170270dfc2c3146331a2ea0e51ffa7d310e22728c9f1d73957016f3e6408
|
||||
F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 1991091d7a7b4f1eedb4b15e0f3a9cadba6a7d6a5c7a787fd1bffda5ff52c7df
|
||||
F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js c2af581f916534209c3c747abefa64ac3f05b1654c2ad2f47af0c2f1679c2e8e
|
||||
F ext/wasm/api/sqlite3-vfs-opfs-wl.c-pp.js 60fa106fc11d31adb1773ac16dd60fc9335a35496b0ca7bab8b4032cb61a441b
|
||||
F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 5dd8410121acf623ce53005a4aab2c7b2b7f5d1ad072f69ebc208882bc7b7236
|
||||
F ext/wasm/api/sqlite3-vtab-helper.c-pp.js 3218318194b11fa625ebda9f7900280c5c26cf257ab5b2b66709ce58e9531624
|
||||
@@ -799,7 +799,7 @@ F src/os_win.c 74473c76517956865581f12e4afc06c09a499ea70002cf9cedb3316301138be8
|
||||
F src/os_win.h c06ccc3a090cf54202ea58981c298817f3309d4c9e4d52ad0a02927346493721
|
||||
F src/pager.c fd9ca8fe01b09c490e66a440e2f56648d489ccb9e0e3b5508424079b046fc824
|
||||
F src/pager.h 53cabc1fd881a9c078eab7db6c233bc0ed29d8938fc05585f0e75e80d905d308
|
||||
F src/parse.y 21f92beded2b0e1f1826b7f140b679c159ca0922be94b0b675fc9dabdf2fa892
|
||||
F src/parse.y 3e644584e56c6d890af14586f44a9d0d703e7a301192cfe44cf5b9c068a37290
|
||||
F src/pcache.c 588cc3c5ccaaadde689ed35ce5c5c891a1f7b1f4d1f56f6cf0143b74d8ee6484
|
||||
F src/pcache.h 00c5797ddf546ee0fe2828d7f75d1afbf1b40ba054f362905326c5ccca15e60c
|
||||
F src/pcache1.c e5e548a11c4c417c781351413905141139cc1d8d8449a0e618d0a438a64da477
|
||||
@@ -1361,7 +1361,7 @@ F test/if.sql b83a24dbd678862a70203e14be820e5ae02d6c726e694548752855ff032d7f84
|
||||
F test/import01.sql d28e1b3723a525e2c382a44177932ec8443df50d6f2ffd6fd1cd628b6987c8fc
|
||||
F test/imposter1.sql fc5ad0945bb19622688c7a1cd7dfd1cefa4b013bac9e2628c22b03c7309f021f
|
||||
F test/imposter1.test 5a20b2cdeb53e65fc57cdb10a33750bd4ef6259909eaf1972253b9e79f7a3fb2
|
||||
F test/in.test 5d91a705b3594109a9b90e8367d3d80f7f50892f747e1e51d8f353b8baccff8a
|
||||
F test/in.test 4357740f071b1d9bde0c25fb5df9461e37d3ae686e4c4e172f3837208c911aa8
|
||||
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
|
||||
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
|
||||
F test/in4.test 6630816b7e59b7bd336b0a95cbf831dcf046d35b10ea987d6e69d223735f1887
|
||||
@@ -1506,7 +1506,7 @@ F test/mallocJ.test b5d1839da331d96223e5f458856f8ffe1366f62e
|
||||
F test/mallocK.test 25897506da0098cea09b302ff432b0fb6d8002773c1e0fc9732aa8b444bfd455
|
||||
F test/mallocL.test fb311ff80afddf3b1a75e52289081f4754d901dc
|
||||
F test/mallocM.test 78bbe9d3da84a5c679123cdb40d7b2010b18fc46e13897e4f253c6ba6fbff134
|
||||
F test/malloc_common.tcl c50b5453001af2b54b5d74b9ce4b8e044a44f3c5241ff218fb48c54778b72d8b
|
||||
F test/malloc_common.tcl eac970bee5e4d38be38818d25b2796336620b0eff823e84db302cea33365ab9d
|
||||
F test/malloctraceviewer.tcl 3e3ddf11e30d2b20f53aa16aa6615082fb24a100bea61cca7214c927b742eba6
|
||||
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
|
||||
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
|
||||
@@ -2303,9 +2303,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
|
||||
F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
|
||||
P 46d3df136172c29cd76ad980fe7d5ae0bda04d10980886b97cc5ae9fceef08cc f4efdfa6ff4058a51a86a1614bdca40f77cde5963e9d2d975db2d78e0e495647
|
||||
R a59cc840850e9bf021972d7740992e6b
|
||||
T +closed f4efdfa6ff4058a51a86a1614bdca40f77cde5963e9d2d975db2d78e0e495647
|
||||
P 5410f7696bcdfce19071ca3790fae10fd74001cfb472e162f0a7e6da0f3c962a 0273cbefd497f3c0f391b6a06fcc44da6f8497f564af2234f74ea44b0e359ecc
|
||||
R d5a604be934964fa5be7bd9e248c7c7a
|
||||
U drh
|
||||
Z 77b441c54301111640f6e1616a9dec48
|
||||
Z 771487c988385b8723278fc2e3838b63
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
+1
-1
@@ -1 +1 @@
|
||||
5410f7696bcdfce19071ca3790fae10fd74001cfb472e162f0a7e6da0f3c962a
|
||||
11932649019188e1d8abd30c61dc88f0d9a425e659461bbb78056c86d4dab12d
|
||||
+1
-1
@@ -1522,7 +1522,7 @@ expr(A) ::= expr(A) between_op(N) expr(X) AND expr(Y). [BETWEEN] {
|
||||
Expr *pRHS = Y->a[0].pExpr;
|
||||
if( Y->nExpr==1
|
||||
&& sqlite3ExprIsConstant(pParse,pRHS)
|
||||
&& pRHS->op!=TK_COLLATE
|
||||
&& ExprHasProperty(pRHS, EP_Collate)==0
|
||||
&& A->op!=TK_VECTOR
|
||||
){
|
||||
Y->a[0].pExpr = 0;
|
||||
|
||||
@@ -897,4 +897,22 @@ do_execsql_test in-23.1 {
|
||||
SELECT * FROM t5;
|
||||
} 1
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Report: https://sqlite.org/bugs/forumpost/6cdcfba787
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test in-24.0 {
|
||||
CREATE TABLE t1(c TEXT);
|
||||
INSERT INTO t1 VALUES('abc');
|
||||
}
|
||||
|
||||
do_execsql_test in-24.1 {
|
||||
SELECT * FROM t1 WHERE c IN ('ABC' COLLATE nocase);
|
||||
}
|
||||
|
||||
do_execsql_test in-24.2 {
|
||||
SELECT * FROM t1 WHERE c IN (+('ABC' COLLATE nocase));
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -193,8 +193,7 @@ proc oom_injectstart {nRepeat iFail} {
|
||||
sqlite3_memdebug_fail [expr $iFail-1] -repeat $nRepeat
|
||||
}
|
||||
proc oom_injectstop {} {
|
||||
set nFail [sqlite3_memdebug_fail -1 -benigncnt nBenign]
|
||||
# return [expr $nFail - $nBenign]
|
||||
set nFail [sqlite3_memdebug_fail -1 -benigncnt ::oom_nbenign]
|
||||
set nFail
|
||||
}
|
||||
|
||||
@@ -303,9 +302,11 @@ proc faultsim_test_result_int_strict {args} {
|
||||
set t [list $testrc $testresult]
|
||||
set r $args
|
||||
|
||||
set nFail [expr $testnfail - $::oom_nbenign]
|
||||
|
||||
set idx [lsearch -exact $r $t]
|
||||
if {($testnfail==0 && $idx!=0) || ($testnfail>0 && $idx<=0)} {
|
||||
error "nfail=$testnfail rc=$testrc result=$testresult list=$r"
|
||||
if {($nFail==0 && $idx!=0) || ($nFail>0 && $idx<=0)} {
|
||||
error "nfail=$nFail nbenign=$::oom_nbenign rc=$testrc result=$testresult list=$r"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,6 +382,7 @@ proc do_one_faultsim_test {testname args} {
|
||||
# injection. Local var $nfail is set to the total number of faults
|
||||
# injected into the system this trial.
|
||||
#
|
||||
set ::oom_nbenign 0
|
||||
eval $O(-injectstart) $iFail
|
||||
set rc [catch $O(-body) res]
|
||||
set nfail [eval $O(-injectstop)]
|
||||
|
||||
Reference in new issue
Block a user