mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Fix a JSON bug introduced by the optimization of [df099ad713011b67] and
first appearing in 3.43.0. The problem occurs when doing a JSON_EXTRACT() on an array element that was added by JSON_SET() without first reparsing. Reported by [forum:/forumpost/fc0e3f1e2a|forum post fc0e3f1e2a]. FossilOrigin-Name: e5099c549a1d8959d4015516f090b8e6438e517a64b20651175bf5413d94fb58
This commit is contained in:
@@ -2156,6 +2156,7 @@ static JsonNode *jsonLookupStep(
|
||||
if( (pRoot[j].jnFlags & JNODE_REMOVE)==0 || pParse->useMod==0 ) i--;
|
||||
j += jsonNodeSize(&pRoot[j]);
|
||||
}
|
||||
if( i==0 && j<=pRoot->n ) break;
|
||||
if( (pRoot->jnFlags & JNODE_APPEND)==0 ) break;
|
||||
if( pParse->useMod==0 ) break;
|
||||
assert( pRoot->eU==2 );
|
||||
|
||||
Reference in New Issue
Block a user