Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/ext/vec1/test/vec1fault7.test # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / ext / vec1 / test / vec1fault7.test` 65 lines ยท 1523 bytes Raw Blame History 1 # 2026-04-01 2 # 3 # The author disclaims copyright to this source code. In place of 4 # a legal notice, here is a blessing: 5 # 6 # May you do good and not evil. 7 # May you find forgiveness for yourself and forgive others. 8 # May you share freely, never taking more than you give. 9 # 10 #*********************************************************************** 11 # 12 # 13 14 source [file join [file dirname [info script]] vec1_common.tcl] 15 set testprefix vec1fault7 16 17 vec1_load db 18 19 do_execsql_test 1 { 20 CREATE VIRTUAL TABLE t1 USING vec1(v, b); 21 INSERT INTO t1 VALUES(random_vector(8), 10); 22 INSERT INTO t1 VALUES(random_vector(8), 20); 23 INSERT INTO t1 VALUES(random_vector(8), 30); 24 INSERT INTO t1 VALUES(random_vector(8), 40); 25 INSERT INTO t1 VALUES(random_vector(8), 50); 26 27 INSERT INTO t1(cmd, arg) VALUES('rebuild', '{index:"flat"}'); 28 } 29 30 faultsim_save_and_close 31 do_faultsim_test 1 -faults oom* -prep { 32 faultsim_restore_and_reopen 33 vec1_load db 34 } -body { 35 execsql { 36 SELECT rowid, length(v) 37 FROM t1(random_vector(8), '{K:10}') 38 WHERE b IN (10, 30, 50) 39 ORDER BY 1; 40 } 41 } -test { 42 faultsim_test_result {0 {1 32 3 32 5 32}} 43 } 44 45 do_execsql_test 2 { 46 INSERT INTO t1(cmd, arg) VALUES('rebuild', '{index:"none"}'); 47 } 48 49 faultsim_save_and_close 50 do_faultsim_test 2 -faults oom* -prep { 51 faultsim_restore_and_reopen 52 vec1_load db 53 } -body { 54 execsql { 55 SELECT rowid 56 FROM t1(random_vector(8), '{K:10}') 57 WHERE b IN (10, 30, 50) 58 ORDER BY 1; 59 } 60 } -test { 61 faultsim_test_result {0 {1 3 5}} 62 } 63 64 finish_test 65