1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Correctly store large integers. Ticket #1212. (CVS 2445)

FossilOrigin-Name: 00e20690bb8cc6522c9c48f36f0c3336ae007827
This commit is contained in:
drh
2005-04-15 12:04:34 +00:00
parent c7e22ee254
commit b47d45ccbf
4 changed files with 408 additions and 11 deletions

View File

@@ -1605,7 +1605,7 @@ u32 sqlite3VdbeSerialType(Mem *pMem){
}
if( flags&MEM_Int ){
/* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
# define MAX_6BYTE ((((i64)0x00010000)<<32)-1)
# define MAX_6BYTE ((((i64)0x00001000)<<32)-1)
i64 i = pMem->i;
u64 u = i<0 ? -i : i;
if( u<=127 ) return 1;