If integer arithmetic overflows in SQLite, it is suppose to convert the
answer to floating point. But sometimes it returns a large negative number:
Experiments on SqlFiddle.com show that
PostgreSQL, MySQL, and SQL Server all throw integer overflow exceptions for
the above. Oracle overflows to floating point.
This problem has been in SQLite since before version 3.5.1 (2007-10-04).
Problem reported on the mailing list by Scott Hess from Google.