1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Merge the latest trunk enhancements into the sessions branch.

FossilOrigin-Name: 8baef58170ff851d0c4387a6888f59b487b4f33c
This commit is contained in:
drh
2011-10-21 17:08:23 +00:00
62 changed files with 2176 additions and 595 deletions

View File

@@ -2188,7 +2188,7 @@ case OP_Column: {
zRec = (char*)pC->aRow;
}else if( pC->isIndex ){
assert( sqlite3BtreeCursorIsValid(pCrsr) );
rc = sqlite3BtreeKeySize(pCrsr, &payloadSize64);
VVA_ONLY(rc =) sqlite3BtreeKeySize(pCrsr, &payloadSize64);
assert( rc==SQLITE_OK ); /* True because of CursorMoveto() call above */
/* sqlite3BtreeParseCellPtr() uses getVarint32() to extract the
** payload size, so it is impossible for payloadSize64 to be
@@ -2197,7 +2197,7 @@ case OP_Column: {
payloadSize = (u32)payloadSize64;
}else{
assert( sqlite3BtreeCursorIsValid(pCrsr) );
rc = sqlite3BtreeDataSize(pCrsr, &payloadSize);
VVA_ONLY(rc =) sqlite3BtreeDataSize(pCrsr, &payloadSize);
assert( rc==SQLITE_OK ); /* DataSize() cannot fail */
}
}else if( ALWAYS(pC->pseudoTableReg>0) ){
@@ -4243,14 +4243,14 @@ case OP_RowData: {
if( pC->isIndex ){
assert( !pC->isTable );
rc = sqlite3BtreeKeySize(pCrsr, &n64);
VVA_ONLY(rc =) sqlite3BtreeKeySize(pCrsr, &n64);
assert( rc==SQLITE_OK ); /* True because of CursorMoveto() call above */
if( n64>db->aLimit[SQLITE_LIMIT_LENGTH] ){
goto too_big;
}
n = (u32)n64;
}else{
rc = sqlite3BtreeDataSize(pCrsr, &n);
VVA_ONLY(rc =) sqlite3BtreeDataSize(pCrsr, &n);
assert( rc==SQLITE_OK ); /* DataSize() cannot fail */
if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
goto too_big;
@@ -5519,7 +5519,7 @@ case OP_JournalMode: { /* out2-prerelease */
** in temporary storage or if the VFS does not support shared memory
*/
if( eNew==PAGER_JOURNALMODE_WAL
&& (zFilename[0]==0 /* Temp file */
&& (sqlite3Strlen30(zFilename)==0 /* Temp file */
|| !sqlite3PagerWalSupported(pPager)) /* No shared-memory support */
){
eNew = eOld;
@@ -5940,10 +5940,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