mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Remove an unnecessary branch from the OP_String8 opcode.
FossilOrigin-Name: 459a0b456da69112605b37adc9af27d79e35a4d7
This commit is contained in:
@@ -1064,10 +1064,7 @@ case OP_String8: { /* same as TK_STRING, out2 */
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
if( encoding!=SQLITE_UTF8 ){
|
||||
rc = sqlite3VdbeMemSetStr(pOut, pOp->p4.z, -1, SQLITE_UTF8, SQLITE_STATIC);
|
||||
if( rc ){
|
||||
assert( rc==SQLITE_TOOBIG ); /* This is the only possible error here */
|
||||
goto too_big;
|
||||
}
|
||||
assert( rc==SQLITE_OK || rc==SQLITE_TOOBIG );
|
||||
if( SQLITE_OK!=sqlite3VdbeChangeEncoding(pOut, encoding) ) goto no_mem;
|
||||
assert( pOut->szMalloc>0 && pOut->zMalloc==pOut->z );
|
||||
assert( VdbeMemDynamic(pOut)==0 );
|
||||
@@ -1080,10 +1077,12 @@ case OP_String8: { /* same as TK_STRING, out2 */
|
||||
pOp->p4.z = pOut->z;
|
||||
pOp->p1 = pOut->n;
|
||||
}
|
||||
testcase( rc==SQLITE_TOOBIG );
|
||||
#endif
|
||||
if( pOp->p1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
|
||||
goto too_big;
|
||||
}
|
||||
assert( rc==SQLITE_OK );
|
||||
/* Fall through to the next case, OP_String */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user