mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
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
This commit is contained in:
@@ -7249,6 +7249,7 @@ case OP_AggStep: {
|
||||
pCtx->pVdbe = p;
|
||||
pCtx->skipFlag = 0;
|
||||
pCtx->isError = 0;
|
||||
pCtx->enc = encoding;
|
||||
pCtx->argc = n;
|
||||
pOp->p4type = P4_FUNCCTX;
|
||||
pOp->p4.pCtx = pCtx;
|
||||
@@ -7898,6 +7899,7 @@ case OP_VColumn: {
|
||||
assert( pModule->xColumn );
|
||||
memset(&sContext, 0, sizeof(sContext));
|
||||
sContext.pOut = pDest;
|
||||
sContext.enc = encoding;
|
||||
assert( pOp->p5==OPFLAG_NOCHNG || pOp->p5==0 );
|
||||
if( pOp->p5 & OPFLAG_NOCHNG ){
|
||||
sqlite3VdbeMemSetNull(pDest);
|
||||
@@ -8182,6 +8184,7 @@ case OP_Function: { /* group */
|
||||
if( pCtx->pOut != pOut ){
|
||||
pCtx->pVdbe = p;
|
||||
pCtx->pOut = pOut;
|
||||
pCtx->enc = encoding;
|
||||
for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];
|
||||
}
|
||||
assert( pCtx->pVdbe==p );
|
||||
|
Reference in New Issue
Block a user