mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
The value returned by the json_each.json field needs to survive longer than
the json_each virtual table itself, in the event that the value is used in an aggregate expression. dbsqlfuzz 5120bd0b3bb0b73eebbcb79ac37c6b0663fccad6 FossilOrigin-Name: 952ed71b9b61e79fe807ac3134bdfa7c94a415e02f13f94440a34d6d548d171e
This commit is contained in:
@@ -4993,9 +4993,9 @@ static int jsonEachColumn(
|
||||
case JEACH_JSON: {
|
||||
if( p->sParse.zJson==0 ){
|
||||
sqlite3_result_blob(ctx, p->sParse.aBlob, p->sParse.nBlob,
|
||||
SQLITE_STATIC);
|
||||
SQLITE_TRANSIENT);
|
||||
}else{
|
||||
sqlite3_result_text(ctx, p->sParse.zJson, -1, SQLITE_STATIC);
|
||||
sqlite3_result_text(ctx, p->sParse.zJson, -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user