SQLite

Check-in [20f06bf2e6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Avoid long delays that can occur when ".recover"ing data from a database with a corrupt freelist.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 20f06bf2e659212a68dcf138e444da7bd4220548ec15a97cfd7eb82e028b3630
User & Date: dan 2019-05-09 16:57:39.190
Context
2019-05-09
17:10
Disable the optimization where a REAL value with no fractional part is stored as an INTEGER when the integer uses as much space as the real value it proposes to stand in for (8 bytes). This avoids corner cases of comparing integers against real values that are beyond the resolution of an IEEE 754 double. Fix for ticket [6c1d3febc00b22d457c78c2] (check-in: 9b0915272f user: drh tags: trunk)
16:57
Avoid long delays that can occur when ".recover"ing data from a database with a corrupt freelist. (check-in: 20f06bf2e6 user: dan tags: trunk)
16:22
Improved debugging output from the OP_MakeRecord opcode. (check-in: ac790729d9 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/shell.c.in.
6575
6576
6577
6578
6579
6580
6581
6582

6583
6584
6585
6586
6587
6588
6589
6575
6576
6577
6578
6579
6580
6581

6582
6583
6584
6585
6586
6587
6588
6589







-
+







      "      WHERE x>0"
      "    UNION"
      "  SELECT shell_int32("
      "      (SELECT data FROM sqlite_dbpage WHERE pgno=trunk.pgno), 0) AS x "
      "      FROM trunk WHERE x>0"
      "),"
      "freelist(data, n, freepgno) AS ("
      "  SELECT data, shell_int32(data, 1)-1, t.pgno "
      "  SELECT data, min(16384, shell_int32(data, 1)-1), t.pgno "
      "      FROM trunk t, sqlite_dbpage s WHERE s.pgno=t.pgno"
      "    UNION ALL"
      "  SELECT data, n-1, shell_int32(data, 2+n) "
      "      FROM freelist WHERE n>=0"
      ")"
      "REPLACE INTO recovery.freelist SELECT freepgno FROM freelist;"
    );