1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Bug fixes and enhancements entered while on jury recess. (CVS 2246)

FossilOrigin-Name: 38401dfbd5e3b50dd4e7a11562a7770347cebdf4
This commit is contained in:
drh
2005-01-20 22:48:47 +00:00
parent 51522cd34a
commit fe2093d73e
11 changed files with 72 additions and 42 deletions

View File

@@ -1487,13 +1487,14 @@ u32 sqlite3VdbeSerialType(Mem *pMem){
return 0;
}
if( flags&MEM_Int ){
/* Figure out whether to use 1, 2, 4 or 8 bytes. */
/* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
# define MAX_6BYTE ((((i64)0x00010000)<<32)-1)
i64 i = pMem->i;
if( i>=-127 && i<=127 ) return 1;
if( i>=-32767 && i<=32767 ) return 2;
if( i>=-8388607 && i<=8388607 ) return 3;
if( i>=-2147483647 && i<=2147483647 ) return 4;
if( i>=-140737488355328L && i<=140737488355328L ) return 5;
if( i>=-MAX_6BYTE && i<=MAX_6BYTE ) return 5;
return 6;
}
if( flags&MEM_Real ){