# 2026-04-01 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # # source [file join [file dirname [info script]] vec1_common.tcl] set testprefix vec1fault5 vec1_load db do_execsql_test 1.0 { CREATE TABLE t1(a); WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<512 ) INSERT INTO t1 SELECT random_vector(16) FROM s; } do_execsql_test 1.1 { SELECT min(length(a)) FROM t1 } 64 do_execsql_test 1.2 { SELECT length( vec1_train(a, '{codesize:8, opq:1, nopq_round:2,nbucket:2}') ) FROM t1; } {17560} do_faultsim_test 1.3 -faults oom-t* -prep { } -body { execsql { SELECT length( vec1_train(a, '{codesize:8, opq:1, nopq_round:2,nbucket:2}') ) FROM t1; } } -test { faultsim_test_result {0 17560} } finish_test