mirror of
https://github.com/sqlite/sqlite.git
synced 2024-12-01 17:23:42 +01:00
Add extra test cases for sqlite3changeset_apply() and ALTER TABLE ADD COLUMN.
FossilOrigin-Name: 603838fc9a65adda831a6a17b31b2e80f5b56e5946a9f0c1fa2c83d2f2a67f6a
This commit is contained in:
parent
ba87c6c2cd
commit
f417f28bd7
@ -209,6 +209,35 @@ eval [string map [list %WR% $trailing] {
|
||||
list [catch { sqlite3changeset_concat $c1 $c2} msg] $msg
|
||||
} {1 SQLITE_SCHEMA}
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
db2 close
|
||||
sqlite3 db2 test.db
|
||||
do_execsql_test $tn.6.0 {
|
||||
CREATE TABLE t7(a INTEGER PRIMARY KEY, b) %WR%;
|
||||
INSERT INTO t7 VALUES(1, 1);
|
||||
INSERT INTO t7 VALUES(2, 2);
|
||||
INSERT INTO t7 VALUES(3, 3);
|
||||
}
|
||||
|
||||
do_test $tn.6.1 {
|
||||
set c1 [sql_exec_changeset db {
|
||||
INSERT INTO t7 VALUES(4, 4);
|
||||
DELETE FROM t7 WHERE a=1;
|
||||
UPDATE t7 SET b=222 WHERE a=2;
|
||||
}]
|
||||
set cinv [sqlite3changeset_invert $c1]
|
||||
execsql { SELECT * FROM t7 }
|
||||
} {2 222 3 3 4 4}
|
||||
|
||||
do_execsql_test -db db2 $tn.6.2 {
|
||||
ALTER TABLE t7 ADD COLUMN c DEFAULT 'ccc'
|
||||
}
|
||||
|
||||
proc xConfict {args} { return "OMIT" }
|
||||
do_test $tn.6.3 {
|
||||
sqlite3changeset_apply db $cinv xConflict
|
||||
execsql { SELECT * FROM t7 }
|
||||
} {1 1 ccc 2 2 ccc 3 3 ccc}
|
||||
}]
|
||||
}
|
||||
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Minor\srefactoring\schange\sto\sclarify\show\sATTACH\sworks.\s\sNo\sfunctional\schanges.
|
||||
D 2017-06-16T18:31:30.375
|
||||
C Add\sextra\stest\scases\sfor\ssqlite3changeset_apply()\sand\sALTER\sTABLE\sADD\sCOLUMN.
|
||||
D 2017-06-17T16:39:10.957
|
||||
F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc
|
||||
@ -315,7 +315,7 @@ F ext/session/sessionF.test c2f178d4dfd723a5fd94a730ea2ccb44c669e3ce
|
||||
F ext/session/sessionG.test 01ef705096a9d3984eebdcca79807a211dee1b60
|
||||
F ext/session/session_common.tcl 7776eda579773113b30c7abfd4545c445228cb73
|
||||
F ext/session/session_speed_test.c edc1f96fd5e0e4b16eb03e2a73041013d59e8723
|
||||
F ext/session/sessionat.test b25d61d663ebc795506bf74079dc4ba0092fad25
|
||||
F ext/session/sessionat.test feb7d22b3124882064b9d9df69f5484a9bb8c123dc9ddc6ffcd357521848139f
|
||||
F ext/session/sessiondiff.test ad13dd65664bae26744e1f18eb3cbd5588349b7e9118851d8f9364248d67bcec
|
||||
F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7
|
||||
F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0
|
||||
@ -1582,7 +1582,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 11693849342a308ad929e2d9ead67faabacb523af76128c6973ed6cc8b62c11e
|
||||
R a34795f4d0fcef5a05bf2f69a4f53c3a
|
||||
U drh
|
||||
Z 099d10b7bf311f5813d7dd796aa1a1dd
|
||||
P 3944a32e1dd90ff903bcbaaa7cb497cebcfcb2ba2a326726ec2268505e524ae3
|
||||
R a6d03762e8185bc27c0ea06ab373d07c
|
||||
U dan
|
||||
Z a880380d43456f0c72b1fdce61ab4f11
|
||||
|
@ -1 +1 @@
|
||||
3944a32e1dd90ff903bcbaaa7cb497cebcfcb2ba2a326726ec2268505e524ae3
|
||||
603838fc9a65adda831a6a17b31b2e80f5b56e5946a9f0c1fa2c83d2f2a67f6a
|
Loading…
Reference in New Issue
Block a user