1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Improvements to the accuracy of json_error(). Add the extension SQL

functions random_json(SEED) and random_json5(SEED).

FossilOrigin-Name: 8d09dc1c45a8026b94f70273d064e47939f30cadedc17548b5a26ba054a8d3a7
This commit is contained in:
drh
2023-04-28 17:38:35 +00:00
parent 272ae627c5
commit 8e7efe3764
4 changed files with 214 additions and 11 deletions

View File

@@ -1093,7 +1093,7 @@ json_parse_restart:
pParse->has5 = 1;
x = k;
}else{
pParse->iErr = j;
if( x!=-1 ) pParse->iErr = j;
return -1;
}
}
@@ -1114,7 +1114,7 @@ json_parse_restart:
}
x = jsonParseValue(pParse, j);
if( x!=(-5) ){
pParse->iErr = j;
if( x!=(-1) ) pParse->iErr = j;
return -1;
}
j = pParse->iErr+1;
@@ -1123,7 +1123,7 @@ json_parse_restart:
x = jsonParseValue(pParse, j);
pParse->iDepth--;
if( x<=0 ){
pParse->iErr = j;
if( x!=(-1) ) pParse->iErr = j;
return -1;
}
j = x;
@@ -1174,7 +1174,7 @@ json_parse_restart:
if( pParse->nNode!=(u32)iThis+1 ) pParse->has5 = 1;
break;
}
pParse->iErr = j;
if( x!=(-1) ) pParse->iErr = j;
return -1;
}
j = x;