summaryrefslogtreecommitdiffstats
path: root/ext/fts5/test/fts5secure8.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:11 +0000
commit63847496f14c813a5d80efd5b7de0f1294ffe1e3 (patch)
tree01c7571c7c762ceee70638549a99834fdd7c411b /ext/fts5/test/fts5secure8.test
parentInitial commit. (diff)
downloadsqlite3-63847496f14c813a5d80efd5b7de0f1294ffe1e3.tar.xz
sqlite3-63847496f14c813a5d80efd5b7de0f1294ffe1e3.zip
Adding upstream version 3.45.1.upstream/3.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/fts5/test/fts5secure8.test')
-rw-r--r--ext/fts5/test/fts5secure8.test51
1 files changed, 51 insertions, 0 deletions
diff --git a/ext/fts5/test/fts5secure8.test b/ext/fts5/test/fts5secure8.test
new file mode 100644
index 0000000..8ceb963
--- /dev/null
+++ b/ext/fts5/test/fts5secure8.test
@@ -0,0 +1,51 @@
+# 2023 Nov 23
+#
+# 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]
+ifcapable !fts5 { finish_test ; return }
+set ::testprefix fts5secure8
+
+proc sql_repeat {txt n} {
+ string repeat $txt $n
+}
+db func repeat sql_repeat
+
+do_execsql_test 1.0 {
+ CREATE VIRTUAL TABLE ft USING fts5(x);
+
+ INSERT INTO ft(ft, rank) VALUES('pgsz', 64);
+
+ INSERT INTO ft(rowid, x) VALUES(100, 'hello world');
+ INSERT INTO ft(rowid, x) VALUES(200, 'one day');
+
+ BEGIN;
+ INSERT INTO ft(rowid, x) VALUES(45, 'one two three');
+ UPDATE ft SET x = repeat('hello world ', 500) WHERE rowid=100;
+ COMMIT
+}
+
+do_execsql_test 1.1 {
+ INSERT INTO ft(ft, rank) VALUES('secure-delete', 1);
+ DELETE FROM ft WHERE rowid=100;
+}
+
+do_execsql_test 1.2 {
+ PRAGMA integrity_check;
+} {ok}
+
+
+
+
+
+finish_test
+
+