mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Change the REAL-to-INTEGER casting behavior so that if the REAL value
is greater than 9223372036854775807.0 then it is cast to the latest possible integer, 9223372036854775807. This is sensible and the way most platforms work in hardware. The former behavior was that oversize REALs would be cast to the smallest possible integer, -9223372036854775808, which is the way Intel hardware works. FossilOrigin-Name: 6f53fc7106658d44edf63068f9a8522fa5a7688b
This commit is contained in:
@@ -3514,7 +3514,9 @@ case OP_SeekGt: { /* jump, in3 */
|
||||
** point number. */
|
||||
assert( (pIn3->flags & MEM_Real)!=0 );
|
||||
|
||||
if( iKey==SMALLEST_INT64 && (pIn3->r<(double)iKey || pIn3->r>0) ){
|
||||
if( (iKey==SMALLEST_INT64 && pIn3->r<(double)iKey)
|
||||
|| (iKey==LARGEST_INT64 && pIn3->r>(double)iKey)
|
||||
){
|
||||
/* The P3 value is too large in magnitude to be expressed as an
|
||||
** integer. */
|
||||
res = 1;
|
||||
|
Reference in New Issue
Block a user