mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-15 22:39:05 +00:00
9ed72eb5ae
This merges the version-3.45.1 tag from upstream SQLite git repository to libSQL with the following conflicts resolved: Conflicts: README.md ext/jni/src/org/sqlite/jni/capi/ConfigSqllogCallback.java libsql-sqlite3/configure libsql-sqlite3/doc/jsonb.md libsql-sqlite3/ext/fts5/test/fts5faultH.test libsql-sqlite3/ext/fts5/test/fts5origintext.test libsql-sqlite3/ext/fts5/test/fts5origintext2.test libsql-sqlite3/ext/fts5/test/fts5origintext3.test libsql-sqlite3/ext/fts5/test/fts5origintext4.test libsql-sqlite3/ext/fts5/test/fts5origintext5.test libsql-sqlite3/ext/fts5/test/fts5secure8.test libsql-sqlite3/ext/fts5/test/fts5tokenizer2.test libsql-sqlite3/ext/fts5/test/fts5trigram2.test libsql-sqlite3/ext/jni/src/org/sqlite/jni/annotation/Experimental.java libsql-sqlite3/ext/jni/src/org/sqlite/jni/capi/ConfigSqlLogCallback.java libsql-sqlite3/ext/jni/src/org/sqlite/jni/capi/ConfigSqllogCallback.java libsql-sqlite3/ext/jni/src/org/sqlite/jni/wrapper1/WindowFunction.java libsql-sqlite3/ext/wasm/GNUmakefile libsql-sqlite3/ext/wasm/batch-runner-sahpool.html libsql-sqlite3/ext/wasm/batch-runner-sahpool.js libsql-sqlite3/src/pager.c libsql-sqlite3/src/shell.c.in libsql-sqlite3/src/sqliteInt.h libsql-sqlite3/src/wal.c libsql-sqlite3/test/fts3integrity.test libsql-sqlite3/test/json/jsonb-q1.txt libsql-sqlite3/test/json106.test libsql-sqlite3/test/json107.test libsql-sqlite3/test/jsonb01.test libsql-sqlite3/test/mmapcorrupt.test libsql-sqlite3/test/releasetest_data.tcl libsql-sqlite3/test/shell9.test libsql-sqlite3/test/wapp.tcl libsql-sqlite3/test/wapptest.tcl
77 lines
1.7 KiB
Plaintext
77 lines
1.7 KiB
Plaintext
# 2010 June 15
|
|
#
|
|
# 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]] fts5_common.tcl]
|
|
source $testdir/malloc_common.tcl
|
|
set testprefix fts5faultG
|
|
|
|
# If SQLITE_ENABLE_FTS5 is defined, omit this file.
|
|
ifcapable !fts5 {
|
|
finish_test
|
|
return
|
|
}
|
|
|
|
set ::testprefix fts5faultG
|
|
|
|
|
|
do_execsql_test 1.0 {
|
|
CREATE VIRTUAL TABLE t1 USING fts5(a);
|
|
INSERT INTO t1 VALUES('test renaming the table');
|
|
INSERT INTO t1 VALUES(' after it has been written');
|
|
INSERT INTO t1 VALUES(' actually other stuff instead');
|
|
}
|
|
faultsim_save_and_close
|
|
do_faultsim_test 1 -faults oom* -prep {
|
|
faultsim_restore_and_reopen
|
|
execsql {
|
|
BEGIN;
|
|
DELETE FROM t1 WHERE rowid=2;
|
|
}
|
|
} -body {
|
|
execsql {
|
|
DELETE FROM t1;
|
|
}
|
|
} -test {
|
|
catchsql { COMMIT }
|
|
faultsim_integrity_check
|
|
faultsim_test_result {0 {}}
|
|
}
|
|
|
|
reset_db
|
|
do_execsql_test 2.0 {
|
|
CREATE VIRTUAL TABLE t1 USING fts5(a, content=, contentless_delete=1);
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES('here''s some text');
|
|
INSERT INTO t1 VALUES('useful stuff, text');
|
|
INSERT INTO t1 VALUES('what would we do without text!');
|
|
COMMIT;
|
|
}
|
|
faultsim_save_and_close
|
|
do_faultsim_test 2 -faults oom* -prep {
|
|
faultsim_restore_and_reopen
|
|
execsql {
|
|
BEGIN;
|
|
DELETE FROM t1 WHERE rowid=2;
|
|
}
|
|
} -body {
|
|
execsql {
|
|
INSERT INTO t1(t1) VALUES('optimize');
|
|
}
|
|
} -test {
|
|
faultsim_integrity_check
|
|
faultsim_test_result {0 {}}
|
|
}
|
|
|
|
|
|
|
|
finish_test
|