mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 10:14:21 +01:00
tcl: add regression test for large text keys
This commit is contained in:
@@ -393,3 +393,20 @@ do_execsql_test_on_specific_db {:memory:} rowid-overflow-random-generation {
|
||||
INSERT INTO q(y) VALUES (3);
|
||||
SELECT COUNT(*) FROM q;
|
||||
} {3}
|
||||
|
||||
# regression test for incorrect processing of record header in the case of large text columns
|
||||
if {[info exists ::env(SQLITE_EXEC)] && ($::env(SQLITE_EXEC) eq "scripts/limbo-sqlite3-index-experimental" || $::env(SQLITE_EXEC) eq "sqlite3")} {
|
||||
do_execsql_test_on_specific_db {:memory:} large-text-index-seek {
|
||||
CREATE TABLE t(x TEXT, y);
|
||||
CREATE INDEX t_idx ON t(x);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'a', 1);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'b', 2);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'c', 3);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'd', 4);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'e', 5);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'f', 6);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'g', 7);
|
||||
INSERT INTO t VALUES (replace(hex(zeroblob(1000)), '00', 'a') || 'h', 8);
|
||||
SELECT COUNT(*) FROM t WHERE x >= replace(hex(zeroblob(100)), '00', 'a');
|
||||
} {8}
|
||||
}
|
||||
Reference in New Issue
Block a user