mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Inserts invalid JSONB should return "malformed JSON", not a json path error.
FossilOrigin-Name: 306ee66fbd0231a9f5b229e5630d5cc66c9cf08b466d2d9204e79e1f44a16374
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Direct\sediting\sof\sJSONB\susing\sjson_insert()\sand\sjson_set().
|
||||
D 2023-11-21T20:13:08.271
|
||||
C Inserts\sinvalid\sJSONB\sshould\sreturn\s"malformed\sJSON",\snot\sa\sjson\spath\serror.
|
||||
D 2023-11-21T22:36:32.538
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -685,7 +685,7 @@ F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
|
||||
F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6
|
||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c 3f0a94082d978bbdd33c38fefea15346c6c6bffb70bc645a71dc0f1f87dd3276
|
||||
F src/json.c 6530a0ad967e10973ba46db399b46e20fc243b2b495cd53226aa31a9ce1b1e46
|
||||
F src/json.c f8cfdf1d024a7b2c5ad3eae15903a7a83a9b2c8ab61716d219a57600544b712c
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36
|
||||
F src/main.c 1b89f3de98d1b59fec5bac1d66d6ece21f703821b8eaa0d53d9604c35309f6f9
|
||||
@@ -2142,8 +2142,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 7822e0e59f9b611fe6289cc762b0aff61f9b87c3a82c60de110f447589a2c125
|
||||
R 42a0f1601a18c87c6ad9e79182203b90
|
||||
P fffb7a9538838e26991e6f16ea3138346a30c33ea6c3d3834680ee6d1f6eece2
|
||||
R 99205893bc97f055f5ba354365513ffb
|
||||
U drh
|
||||
Z 7d1450dc466726ea7e03ad211ff3e833
|
||||
Z ff4b069c664b897025c4d05de8c19bcd
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
@@ -1 +1 @@
|
||||
fffb7a9538838e26991e6f16ea3138346a30c33ea6c3d3834680ee6d1f6eece2
|
||||
306ee66fbd0231a9f5b229e5630d5cc66c9cf08b466d2d9204e79e1f44a16374
|
||||
@@ -4427,7 +4427,7 @@ static void jsonInsertIntoBlob(
|
||||
int eEdit /* JEDIT_INS, JEDIT_REPL, or JEDIT_SET */
|
||||
){
|
||||
int i;
|
||||
u32 rc;
|
||||
u32 rc = 0;
|
||||
const char *zPath = 0;
|
||||
int flgs;
|
||||
JsonParse px, ax;
|
||||
@@ -4471,7 +4471,11 @@ static void jsonInsertIntoBlob(
|
||||
|
||||
jsonInsertIntoBlob_patherror:
|
||||
if( px.nBlobAlloc ) sqlite3_free(px.aBlob);
|
||||
jsonPathSyntaxError(zPath, ctx);
|
||||
if( rc==JSON_BLOB_ERROR ){
|
||||
sqlite3_result_error(ctx, "malformed JSON", -1);
|
||||
}else{
|
||||
jsonPathSyntaxError(zPath, ctx);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user