Extra backwards-compatibility tests verify that UNIQUE and PRIMARY KEY
indices are created in the correct order. Other backwards-compatibility tests already cover this, but it does not hurt to double up. FossilOrigin-Name: 5ca0ea2e9b40a7fa133d2af8a2ecc676de7a8723
This commit is contained in:
@@ -200,6 +200,39 @@ do_allbackcompat_test {
|
||||
|
||||
do_test backcompat-1.2.7 { sql1 { PRAGMA integrity_check } } {ok}
|
||||
do_test backcompat-1.2.8 { sql2 { PRAGMA integrity_check } } {ok}
|
||||
|
||||
do_test backcompat-2.1 {
|
||||
sql1 {
|
||||
CREATE TABLE t2(a UNIQUE, b PRIMARY KEY, c UNIQUE);
|
||||
INSERT INTO t2 VALUES(1,9,5),(5,5,1),(9,1,9);
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
}
|
||||
} {1 9 5 5 5 1 9 1 9}
|
||||
do_test backcompat-2.2 {
|
||||
sql2 {
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
}
|
||||
} {1 9 5 5 5 1 9 1 9}
|
||||
do_test backcompat-2.3 {
|
||||
sql1 {
|
||||
SELECT * FROM t2 ORDER BY b;
|
||||
}
|
||||
} {9 1 9 5 5 1 1 9 5}
|
||||
do_test backcompat-2.4 {
|
||||
sql2 {
|
||||
SELECT * FROM t2 ORDER BY b;
|
||||
}
|
||||
} {9 1 9 5 5 1 1 9 5}
|
||||
do_test backcompat-2.5 {
|
||||
sql1 {
|
||||
SELECT * FROM t2 ORDER BY c;
|
||||
}
|
||||
} {5 5 1 1 9 5 9 1 9}
|
||||
do_test backcompat-2.6 {
|
||||
sql2 {
|
||||
SELECT * FROM t2 ORDER BY c;
|
||||
}
|
||||
} {5 5 1 1 9 5 9 1 9}
|
||||
}
|
||||
foreach k [lsort [array names ::incompatible]] {
|
||||
puts "ERROR: Detected journal incompatibility with version $k"
|
||||
|
||||
Reference in New Issue
Block a user