1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Cause .clone to not trip over sequence table as reported at [forum:/forumpost/71ff9e6c4c|forum post 71ff9e6c4c].

FossilOrigin-Name: b44d04f7b051d807a81152a6e4f15a765f7b9ed1f01b48b40dc5420c11e0c251
This commit is contained in:
larrybr
2023-01-16 21:49:37 +00:00
parent 5b17533994
commit e8f114baa6
4 changed files with 33 additions and 16 deletions

View File

@ -202,5 +202,19 @@ do_test shell2-1.4.9 {
SELECT writefile('DoNotCare', x'');}
} {1 {line 2: cannot use the writefile() function in safe mode}}
# Verify that .clone handles sequence table.
# See https://sqlite.org/forum/forumpost/71ff9e6c4c
do_test shell2-1.4.9 {
forcedelete clone.db
set res [catchcmd :memory: [string trim {
CREATE TABLE t(id INTEGER PRIMARY KEY AUTOINCREMENT);
INSERT INTO t VALUES (1),(2);
.clone clone.db
.open clone.db
SELECT max(seq) FROM sqlite_sequence;}]]
} {0 {t... done
done
2}}
finish_test