3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
12 # This test is focused on edge cases that cause ubsan errors.
15 source [file join [file dirname [info script]] fts5_common.tcl]
16 set testprefix fts5ubsan
18 # If SQLITE_ENABLE_FTS5 is defined, omit this file.
25 CREATE VIRTUAL TABLE x1 USING fts5(x);
28 set BIG 9000000000000000000
29 set SMALL -9000000000000000000
33 INSERT INTO x1 (rowid, x) VALUES($BIG, 'aaa aba acc');
34 INSERT INTO x1 (rowid, x) VALUES($SMALL, 'aaa abc acb');
39 SELECT rowid, x FROM x1('ab*');
40 } [list $SMALL {aaa abc acb} $BIG {aaa aba acc}]
43 SELECT rowid, x FROM x1('ac*');
44 } [list $SMALL {aaa abc acb} $BIG {aaa aba acc}]
48 CREATE VIRTUAL TABLE x1 USING fts5(x);
52 INSERT INTO x1 (rowid, x) VALUES($BIG, 'aaa aba acc');
53 INSERT INTO x1 (rowid, x) VALUES($SMALL, 'aaa abc acb');
57 INSERT INTO x1 (x1) VALUES('optimize');