mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-30 22:44:21 +01:00
- remove assumptions that record header size fits into 1 byte or serial type fits into 1 byte - add tests for record header size calculation ```sql turso> CREATE TABLE t(x TEXT, y); CREATE INDEX t_idx ON t(x); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'a', 1); -- 1000 bytes of 'a' INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'b', 2); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'c', 3); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'd', 4); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'e', 5); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'f', 6); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'g', 7); INSERT INTO t VALUES (replace(zeroblob(1000), x'00', 'a') || 'h', 8); SELECT COUNT(*) FROM t WHERE x >= replace(hex(zeroblob(100)), '00', 'a'); ┌───────────┐ │ COUNT (*) │ ├───────────┤ │ 8 │ └───────────┘ ``` Fixes #2096 Fixes #2088 Reviewed-by: Nikita Sivukhin (@sivukhin) Closes #2098