diff options
author | Jan Mercl <0xjnml@gmail.com> | 2020-08-26 23:31:54 +0200 |
---|---|---|
committer | Jan Mercl <0xjnml@gmail.com> | 2020-08-26 23:31:54 +0200 |
commit | e662a135d139be00d9539517df0976318adbdfa1 (patch) | |
tree | a3f39f3ad0b653020dbd24f23ca5e32ac86fce3b /testdata/tcl/altertab.test | |
parent | 43c865ce5d35eb463e4a05f65e8e388364480711 (diff) |
release 1.4.0v1.4.0
Diffstat (limited to 'testdata/tcl/altertab.test')
-rw-r--r-- | testdata/tcl/altertab.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testdata/tcl/altertab.test b/testdata/tcl/altertab.test index c99010d..435620d 100644 --- a/testdata/tcl/altertab.test +++ b/testdata/tcl/altertab.test @@ -658,5 +658,23 @@ do_catchsql_test 21.3 { ALTER TABLE a RENAME TO e; } {1 {error in view c: 1st ORDER BY term does not match any column in the result set}} +# After forum thread https://sqlite.org/forum/forumpost/ddbe1c7efa +# Ensure that PRAGMA schema_version=N causes a full schema reload. +# +reset_db +do_execsql_test 22.0 { + CREATE TABLE t1(a INT, b TEXT NOT NULL); + INSERT INTO t1 VALUES(1,2),('a','b'); + BEGIN; + PRAGMA writable_schema=ON; + UPDATE sqlite_schema SET sql='CREATE TABLE t1(a INT, b TEXT)' WHERE name LIKE 't1'; + PRAGMA schema_version=1234; + COMMIT; + PRAGMA integrity_check; +} {ok} +do_execsql_test 22.1 { + ALTER TABLE t1 ADD COLUMN c INT DEFAULT 78; + SELECT * FROM t1; +} {1 2 78 a b 78} finish_test |