mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix the virtual table rename logic so that it works even if the database
encoding is something other than UTF8. Ticket [8290242b2a9a81683] FossilOrigin-Name: d65f63531c3f8e3e55e656f049240714a3d7433f
This commit is contained in:
13
src/vdbe.c
13
src/vdbe.c
@@ -5888,10 +5888,15 @@ case OP_VRename: {
|
||||
assert( memIsValid(pName) );
|
||||
REGISTER_TRACE(pOp->p1, pName);
|
||||
assert( pName->flags & MEM_Str );
|
||||
rc = pVtab->pModule->xRename(pVtab, pName->z);
|
||||
importVtabErrMsg(p, pVtab);
|
||||
p->expired = 0;
|
||||
|
||||
testcase( pName->enc==SQLITE_UTF8 );
|
||||
testcase( pName->enc==SQLITE_UTF16BE );
|
||||
testcase( pName->enc==SQLITE_UTF16LE );
|
||||
rc = sqlite3VdbeChangeEncoding(pName, SQLITE_UTF8);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = pVtab->pModule->xRename(pVtab, pName->z);
|
||||
importVtabErrMsg(p, pVtab);
|
||||
p->expired = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user