mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Merge all the latest trunk enhancements into the sessions branch.
FossilOrigin-Name: 94fd5bb6da5ef4d850c2ed4ad38afabc5569dae6
This commit is contained in:
@@ -75,6 +75,7 @@ const char *sqlite3_sql(sqlite3_stmt *pStmt){
|
||||
void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
|
||||
Vdbe tmp, *pTmp;
|
||||
char *zTmp;
|
||||
assert( pA->db==pB->db );
|
||||
tmp = *pA;
|
||||
*pA = *pB;
|
||||
*pB = tmp;
|
||||
@@ -1517,7 +1518,7 @@ int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
|
||||
*/
|
||||
static void closeAllCursors(Vdbe *p){
|
||||
if( p->pFrame ){
|
||||
VdbeFrame *pFrame = p->pFrame;
|
||||
VdbeFrame *pFrame;
|
||||
for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
|
||||
sqlite3VdbeFrameRestore(pFrame);
|
||||
}
|
||||
@@ -2497,7 +2498,13 @@ u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
|
||||
if( file_format>=4 && (i&1)==i ){
|
||||
return 8+(u32)i;
|
||||
}
|
||||
u = i<0 ? -i : i;
|
||||
if( i<0 ){
|
||||
if( i<(-MAX_6BYTE) ) return 6;
|
||||
/* Previous test prevents: u = -(-9223372036854775808) */
|
||||
u = -i;
|
||||
}else{
|
||||
u = i;
|
||||
}
|
||||
if( u<=127 ) return 1;
|
||||
if( u<=32767 ) return 2;
|
||||
if( u<=8388607 ) return 3;
|
||||
|
||||
Reference in New Issue
Block a user