diff options
author | drh <> | 2022-04-01 15:31:58 +0000 |
---|---|---|
committer | drh <> | 2022-04-01 15:31:58 +0000 |
commit | 659fdb4da87b3eed2e5b5ec6369f63c34f682e2a (patch) | |
tree | 7330a3f93b5a88a91365f20490fc8d68ea9f95bb /src/vdbeapi.c | |
parent | c4c0ff86643edcd3f87d14f41e92f967af8a84c8 (diff) | |
download | sqlite-659fdb4da87b3eed2e5b5ec6369f63c34f682e2a.tar.gz sqlite-659fdb4da87b3eed2e5b5ec6369f63c34f682e2a.zip |
Have the sqlite3_context object carry the encoding for the prepared statement
that it represents, so that sqlite3_result() and similar can set the encoding
according to the prepared statement, even if the database encoding has
changed.
dbsqlfuzz c409b10d0a6bccf78ab00f47e1d29d42ee5b3565
FossilOrigin-Name: d4e19314f564126e180e091f9135c7bc55a10442edb46fbd3a4cfad21201dfa6
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r-- | src/vdbeapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 7567b8994..c23dd0e0c 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -391,7 +391,7 @@ static void setResultStrOrError( } return; } - sqlite3VdbeChangeEncoding(pOut, ENC(pOut->db)); + sqlite3VdbeChangeEncoding(pOut, pCtx->enc); if( sqlite3VdbeMemTooBig(pOut) ){ sqlite3_result_error_toobig(pCtx); } @@ -540,7 +540,7 @@ void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ Mem *pOut = pCtx->pOut; assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemCopy(pOut, pValue); - sqlite3VdbeChangeEncoding(pOut, ENC(pOut->db)); + sqlite3VdbeChangeEncoding(pOut, pCtx->enc); if( sqlite3VdbeMemTooBig(pOut) ){ sqlite3_result_error_toobig(pCtx); } |