sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
| 1 | # Bug 2026-10-15T04:34:08Z |
| 2 | .open :memory: |
| 3 | .mode list -limits off |
| 4 | .null NULL |
| 5 | |
| 6 | .testcase 100 |
| 7 | SELECT decimal_pow2(3); |
| 8 | .check '+8.0e+00' |
| 9 | .testcase 101 |
| 10 | SELECT decimal_pow2(4294967299); |
| 11 | .check --any 'value 4294967299 is too large: range limit -2147483648..+2147483647' |
| 12 | .testcase 102 |
| 13 | SELECT decimal_pow2(-4294967293); |
| 14 | .check --any 'value -4294967293 is too large: range limit -2147483648..+2147483647' |
| 15 | .testcase 110 |
| 16 | SELECT length(decimal(1.23456,10000)); |
| 17 | .check 51 |
| 18 | .testcase 120 |
| 19 | SELECT length(dtostr(3.14159, 100000)); |
| 20 | .check 357 |
| 21 | |
| 22 | # Bug 2026-11-04T20:36:37Z |
| 23 | # Do not return negative zero. |
| 24 | # |
| 25 | .testcase 200 |
| 26 | SELECT decimal_add('-1234','1234'); |
| 27 | .check 0 |