Fixes for test code that was not working with utf16 databases. Run the analyze*.test scripts as part of the 'utf16' permutation test.

FossilOrigin-Name: fe99494d99df95f699ffab07b1e212800b5ff00d
This commit is contained in:
dan 2013-08-16 14:48:23 +00:00
parent 585c823256
commit 22d73b1cbe
5 changed files with 41 additions and 20 deletions

View File

@ -1,5 +1,5 @@
C Add\sextra\stests.\sNo\scode\schanges.
D 2013-08-16T14:23:02.198
C Fixes\sfor\stest\scode\sthat\swas\snot\sworking\swith\sutf16\sdatabases.\sRun\sthe\sanalyze*.test\sscripts\sas\spart\sof\sthe\s'utf16'\spermutation\stest.
D 2013-08-16T14:48:23.663
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -243,7 +243,7 @@ F src/test_config.c 3d148e338b575bd937f7746824f36a9c6682d238
F src/test_demovfs.c 69b2085076654ebc18014cbc6386f04409c959a9
F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc
F src/test_fs.c ced436e3d4b8e4681328409b8081051ce614e28f
F src/test_func.c 338a6e5ade3560ad36280881bbcf45f28d06cb68
F src/test_func.c f8235719dff4bf9ffee04c55a190af8782ce9ab5
F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd
F src/test_init.c 3cbad7ce525aec925f8fda2192d576d47f0d478a
F src/test_intarray.c 87847c71c3c36889c0bcc9c4baf9d31881665d61
@ -308,7 +308,7 @@ F test/analyze5.test 765c4e284aa69ca172772aa940946f55629bc8c4
F test/analyze6.test 19151da2c4e918905d2081b74ac5c4d47fc850ab
F test/analyze7.test bb1409afc9e8629e414387ef048b8e0e3e0bdc4f
F test/analyze8.test 093d15c1c888eed5034304a98c992f7360130b88
F test/analyze9.test 0e25a960081391909659844ac87fdc26542630e4
F test/analyze9.test 8a7880f29586581ee124fb787b722227ead47ee8
F test/analyzeA.test 1a5c40079894847976d983ca39c707aaa44b6944
F test/async.test 1d0e056ba1bb9729283a0f22718d3a25e82c277b
F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b
@ -716,7 +716,7 @@ F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0
F test/pcache.test b09104b03160aca0d968d99e8cd2c5b1921a993d
F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025
F test/percentile.test b98fc868d71eb5619d42a1702e9ab91718cbed54
F test/permutations.test 461ef4ea10db02cd421dfe5f988eac3e99b5cd9a
F test/permutations.test c5e7ae8a18cb8a0ced38dbbc9e2463536c1de45b
F test/pragma.test 5e7de6c32a5d764f09437d2025f07e4917b9e178
F test/pragma2.test 3a55f82b954242c642f8342b17dffc8b47472947
F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552
@ -1107,7 +1107,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
P 9f85b6a52a0b9b1524daa6f24d85257e7f591e95
R 236823b823655ed29e083b8eac1f75f3
P 949127d53e0a907ed6f73c6828637d94b265468c
R c976c76cd7c81566939cdf0a48444b08
U dan
Z b297cf1029f061cc4748c85c1d9ef2e3
Z b5e8345ccccb17f5909eea938b24d774

View File

@ -1 +1 @@
949127d53e0a907ed6f73c6828637d94b265468c
fe99494d99df95f699ffab07b1e212800b5ff00d

View File

@ -496,7 +496,7 @@ static void test_extract(
memset(&mem, 0, sizeof(mem));
mem.db = db;
mem.enc = SQLITE_UTF8;
mem.enc = ENC(db);
pHdr += sqlite3GetVarint(pHdr, &iSerialType);
pBody += sqlite3VdbeSerialGet(pBody, (u32)iSerialType, &mem);
sqlite3VdbeMemStoreType(&mem);
@ -545,7 +545,7 @@ static void test_decode(
memset(&mem, 0, sizeof(mem));
mem.db = db;
mem.enc = SQLITE_UTF8;
mem.enc = ENC(db);
pHdr += sqlite3GetVarint(pHdr, &iSerialType);
pBody += sqlite3VdbeSerialGet(pBody, (u32)iSerialType, &mem);

View File

@ -52,7 +52,7 @@ do_execsql_test 1.1 {
ANALYZE;
} {}
do_execsql_test 1.3 {
do_execsql_test 1.2 {
SELECT tbl,idx,nEq,nLt,nDLt,test_decode(sample) FROM sqlite_stat4;
} {
t1 i1 {1 1 1} {0 0 0} {0 0 0} {(0) (0) 1}
@ -62,14 +62,16 @@ do_execsql_test 1.3 {
t1 i1 {1 1 1} {4 4 4} {4 4 4} {(4) (4) 5}
}
do_execsql_test 1.2 {
SELECT tbl,idx,nEq,nLt,nDLt,s(sample) FROM sqlite_stat4;
} {
t1 i1 {1 1 1} {0 0 0} {0 0 0} ....(0)(0)
t1 i1 {1 1 1} {1 1 1} {1 1 1} ....(1)(1).
t1 i1 {1 1 1} {2 2 2} {2 2 2} ....(2)(2).
t1 i1 {1 1 1} {3 3 3} {3 3 3} ....(3)(3).
t1 i1 {1 1 1} {4 4 4} {4 4 4} ....(4)(4).
if {[permutation] != "utf16"} {
do_execsql_test 1.3 {
SELECT tbl,idx,nEq,nLt,nDLt,s(sample) FROM sqlite_stat4;
} {
t1 i1 {1 1 1} {0 0 0} {0 0 0} ....(0)(0)
t1 i1 {1 1 1} {1 1 1} {1 1 1} ....(1)(1).
t1 i1 {1 1 1} {2 2 2} {2 2 2} ....(2)(2).
t1 i1 {1 1 1} {3 3 3} {3 3 3} ....(3)(3).
t1 i1 {1 1 1} {4 4 4} {4 4 4} ....(4)(4).
}
}
@ -364,6 +366,23 @@ do_execsql_test 7.5 {
SELECT * FROM t1 WHERE a = 5;
} {5 5}
#-------------------------------------------------------------------------
#
reset_db
do_execsql_test 8.1 {
CREATE TABLE t1(x TEXT);
CREATE INDEX i1 ON t1(x);
INSERT INTO t1 VALUES('1');
INSERT INTO t1 VALUES('2');
INSERT INTO t1 VALUES('3');
INSERT INTO t1 VALUES('4');
ANALYZE;
}
breakpoint
do_execsql_test 8.2 {
SELECT * FROM t1 WHERE x = 3;
} {3}
finish_test

View File

@ -500,6 +500,8 @@ test_suite "utf16" -description {
pragma encoding = 'UTF-16'
} -files {
alter.test alter3.test
analyze.test analyze3.test analyze4.test analyze5.test analyze6.test
analyze7.test analyze8.test analyze9.test analyzeA.test
auth.test bind.test blob.test capi2.test capi3.test collate1.test
collate2.test collate3.test collate4.test collate5.test collate6.test
conflict.test date.test delete.test expr.test fkey1.test func.test