1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Do not allow the json_set() function to overwrite the same element more than

once.

FossilOrigin-Name: f237f60e4fa9171dfe9a77c8637595c2701e971034d41bd6018944e8b2b27a6f
This commit is contained in:
drh
2019-07-31 12:13:58 +00:00
parent 9c3bb59f76
commit 7e35e81dcb
3 changed files with 8 additions and 7 deletions

View File

@ -1083,6 +1083,7 @@ static JsonNode *jsonLookupStep(
const char *zKey;
JsonNode *pRoot = &pParse->aNode[iRoot];
if( zPath[0]==0 ) return pRoot;
if( pRoot->jnFlags & JNODE_REPLACE ) return 0;
if( zPath[0]=='.' ){
if( pRoot->eType!=JSON_OBJECT ) return 0;
zPath++;