Fix a case where a corrupt stat4 record could go unrecognized due to integer overflow.
[sqlite.git] / test / fts3integrity.test
blobbcbc49dc3370179a7da8b9849d41e6ff1c0dc07a
1 # 2023 December 16
3 #    May you do good and not evil.
4 #    May you find forgiveness for yourself and forgive others.
5 #    May you share freely, never taking more than you give.
7 #***********************************************************************
8 # This file runs all tests.
10 # $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $
12 set testdir [file dirname $argv0]
13 source $testdir/tester.tcl
14 set ::testprefix fts3integrity
16 # If SQLITE_ENABLE_FTS3 is defined, omit this file.
17 ifcapable !fts3 {
18   finish_test
19   return
21   
22 do_execsql_test 1.0 {
23   CREATE VIRTUAL TABLE t1 USING fts3(x);
24   INSERT INTO t1 VALUES('first row');
25   INSERT INTO t1 VALUES('second row');
27   CREATE TABLE t2(x PRIMARY KEY);
28   INSERT INTO t2 VALUES('first row');
29   INSERT INTO t2 VALUES('second row');
32 sqlite3 db2 test.db
34 do_execsql_test -db db2 1.1 {
35   CREATE TABLE t3(x, y);
38 do_execsql_test 1.2 {
39   PRAGMA integrity_check;
40 } {ok}
42 finish_test