1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

More test cases and requirements marks for pragmas.

FossilOrigin-Name: fc51037cd97063069620213a62efdeff5d898706
This commit is contained in:
drh
2015-02-28 01:04:27 +00:00
parent e0e8429543
commit 51a74d4cbd
6 changed files with 42 additions and 19 deletions

View File

@ -1,5 +1,5 @@
C Remove\sall\sreferences\sto\sSQLITE_DEFAULT_TEMP_CACHE_SIZE.\s\sAdd\srequirements\nmarks\srelated\sto\scache_size\schanging. C More\stest\scases\sand\srequirements\smarks\sfor\spragmas.
D 2015-02-27T21:53:35.613 D 2015-02-28T01:04:27.551
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 6b9e7677829aa94b9f30949656e27312aefb9a46 F Makefile.in 6b9e7677829aa94b9f30949656e27312aefb9a46
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -223,7 +223,7 @@ F src/parse.y 0f8e7d60f0ab3cb53d270adef69259ac307d83a8
F src/pcache.c 10539fb959849ad6efff80050541cab3d25089d4 F src/pcache.c 10539fb959849ad6efff80050541cab3d25089d4
F src/pcache.h b44658c9c932d203510279439d891a2a83e12ba8 F src/pcache.h b44658c9c932d203510279439d891a2a83e12ba8
F src/pcache1.c 1e77432b40b7d3288327d9cdf399dcdfd2b6d3bf F src/pcache1.c 1e77432b40b7d3288327d9cdf399dcdfd2b6d3bf
F src/pragma.c ea0be138a99784b14e87bd4522fea40e7b979e9c F src/pragma.c d1abcc070698e5853205dc1d1cd3f01845c1804b
F src/pragma.h 09c89bca58e9a44de2116cc8272b8d454657129f F src/pragma.h 09c89bca58e9a44de2116cc8272b8d454657129f
F src/prepare.c 173a5a499138451b2561614ecb87d78f9f4644b9 F src/prepare.c 173a5a499138451b2561614ecb87d78f9f4644b9
F src/printf.c 8da9a2687a396daa19860f4dc90975d319304744 F src/printf.c 8da9a2687a396daa19860f4dc90975d319304744
@ -293,7 +293,7 @@ F src/update.c 3c4ecc282accf12d39edb8d524cf089645e55a13
F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c
F src/util.c 98a7627ca48ad3265b6940915a1d08355eb3fc7e F src/util.c 98a7627ca48ad3265b6940915a1d08355eb3fc7e
F src/vacuum.c 9460b9de7b2d4e34b0d374894aa6c8a0632be8ec F src/vacuum.c 9460b9de7b2d4e34b0d374894aa6c8a0632be8ec
F src/vdbe.c ddfc977981cd6324668aa6b114045eb1c677421a F src/vdbe.c 991e9b2c38cdc987ed214249b3c72ea73a06fb2e
F src/vdbe.h 6fc69d9c5e146302c56e163cb4b31d1ee64a18c3 F src/vdbe.h 6fc69d9c5e146302c56e163cb4b31d1ee64a18c3
F src/vdbeInt.h bb56fd199d8af1a2c1b9639ee2f70724b4338e3a F src/vdbeInt.h bb56fd199d8af1a2c1b9639ee2f70724b4338e3a
F src/vdbeapi.c dac0d0d8009a8aa549cd77d9c29da44c0344f0c4 F src/vdbeapi.c dac0d0d8009a8aa549cd77d9c29da44c0344f0c4
@ -787,7 +787,7 @@ F test/pcache.test b09104b03160aca0d968d99e8cd2c5b1921a993d
F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025 F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025
F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff
F test/permutations.test f9cc1dd987986c9d4949211c7a4ed55ec9aecba1 F test/permutations.test f9cc1dd987986c9d4949211c7a4ed55ec9aecba1
F test/pragma.test a6187e24d55ddad2b2af46022e473a605a260f27 F test/pragma.test 64f11ec7f4100e873c67e888a56c33d395cb75d6
F test/pragma2.test f624a496a95ee878e81e59961eade66d5c00c028 F test/pragma2.test f624a496a95ee878e81e59961eade66d5c00c028
F test/pragma3.test 6f849ccffeee7e496d2f2b5e74152306c0b8757c F test/pragma3.test 6f849ccffeee7e496d2f2b5e74152306c0b8757c
F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552 F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552
@ -873,7 +873,7 @@ F test/skipscan3.test ec5bab3f81c7038b43450e7b3062e04a198bdbb5
F test/skipscan5.test 67817a4b6857c47e0e33ba3e506da6f23ef68de2 F test/skipscan5.test 67817a4b6857c47e0e33ba3e506da6f23ef68de2
F test/skipscan6.test 5866039d03a56f5bd0b3d172a012074a1d90a15b F test/skipscan6.test 5866039d03a56f5bd0b3d172a012074a1d90a15b
F test/soak.test 0b5b6375c9f4110c828070b826b3b4b0bb65cd5f F test/soak.test 0b5b6375c9f4110c828070b826b3b4b0bb65cd5f
F test/softheap1.test 40562fe6cac6d9827b7b42b86d45aedf12c15e24 F test/softheap1.test 843cd84db9891b2d01b9ab64cef3e9020f98d087
F test/sort.test 3f492e5b7be1d3f756728d2ff6edf4f6091e84cb F test/sort.test 3f492e5b7be1d3f756728d2ff6edf4f6091e84cb
F test/sort2.test 37afbc03f5559f2eb0f18940b55d38dfbb5172ac F test/sort2.test 37afbc03f5559f2eb0f18940b55d38dfbb5172ac
F test/sort3.test 6178ade30810ac9166fcdf14b7065e49c0f534e2 F test/sort3.test 6178ade30810ac9166fcdf14b7065e49c0f534e2
@ -1239,7 +1239,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 8c2b29d9acb92d47f4deec21a7c2dca52db63345 P 766ad65025a9d5815300978e6e349f5af5db6012
R 5f8145ea43512db7c8608bf7ec930759 R 8204e8f9043c535de0f2497c8e561323
U drh U drh
Z 93d3230e7c0b0c9e7f5924677c91b2f3 Z a56e97eeca3c59d6452815bc1cc7253f

View File

@ -1 +1 @@
766ad65025a9d5815300978e6e349f5af5db6012 fc51037cd97063069620213a62efdeff5d898706

View File

@ -1802,8 +1802,9 @@ void sqlite3Pragma(
/* /*
** PRAGMA shrink_memory ** PRAGMA shrink_memory
** **
** This pragma attempts to free as much memory as possible from the ** IMPLEMENTATION-OF: R-23445-46109 This pragma causes the database
** current database connection. ** connection on which it is invoked to free up as much memory as it
** can, by calling sqlite3_db_release_memory().
*/ */
case PragTyp_SHRINK_MEMORY: { case PragTyp_SHRINK_MEMORY: {
sqlite3_db_release_memory(db); sqlite3_db_release_memory(db);
@ -1832,8 +1833,12 @@ void sqlite3Pragma(
** PRAGMA soft_heap_limit ** PRAGMA soft_heap_limit
** PRAGMA soft_heap_limit = N ** PRAGMA soft_heap_limit = N
** **
** Call sqlite3_soft_heap_limit64(N). Return the result. If N is omitted, ** IMPLEMENTATION-OF: R-26343-45930 This pragma invokes the
** use -1. ** sqlite3_soft_heap_limit64() interface with the argument N, if N is
** specified and is a non-negative integer.
** IMPLEMENTATION-OF: R-64451-07163 The soft_heap_limit pragma always
** returns the same integer that would be returned by the
** sqlite3_soft_heap_limit64(-1) C-language function.
*/ */
case PragTyp_SOFT_HEAP_LIMIT: { case PragTyp_SOFT_HEAP_LIMIT: {
sqlite3_int64 N; sqlite3_int64 N;

View File

@ -3050,7 +3050,12 @@ case OP_Transaction: {
p->nStmtDefImmCons = db->nDeferredImmCons; p->nStmtDefImmCons = db->nDeferredImmCons;
} }
/* Gather the schema version number for checking */ /* Gather the schema version number for checking:
** IMPLEMENTATION-OF: R-32195-19465 The schema version is used by SQLite
** each time a query is executed to ensure that the internal cache of the
** schema used when compiling the SQL query matches the schema of the
** database against which the compiled query is actually executed.
*/
sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&iMeta); sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&iMeta);
iGen = db->aDb[pOp->p1].pSchema->iGeneration; iGen = db->aDb[pOp->p1].pSchema->iGeneration;
}else{ }else{

View File

@ -1316,18 +1316,23 @@ ifcapable pager_pragmas {
db close db close
forcedelete test.db forcedelete test.db
sqlite3 db test.db sqlite3 db test.db
# EVIDENCE-OF: R-13905-26312 PRAGMA database.page_count; Return the
# total number of pages in the database file.
#
do_test pragma-14.1 { do_test pragma-14.1 {
execsql { pragma auto_vacuum = 0 } execsql { pragma auto_vacuum = 0 }
execsql { pragma page_count } execsql { pragma page_count; pragma main.page_count }
} {0} } {0 0}
do_test pragma-14.2 { do_test pragma-14.2 {
execsql { execsql {
CREATE TABLE abc(a, b, c); CREATE TABLE abc(a, b, c);
PRAGMA page_count; PRAGMA page_count;
PRAGMA main.page_count;
PRAGMA temp.page_count;
} }
} {2} } {2 2 0}
do_test pragma-14.2uc { do_test pragma-14.2uc {
execsql {pragma PAGE_COUNT} execsql {pragma PAGE_COUNT}
} {2} } {2}

View File

@ -24,6 +24,14 @@ ifcapable !integrityck {
return return
} }
# EVIDENCE-OF: R-26343-45930 This pragma invokes the
# sqlite3_soft_heap_limit64() interface with the argument N, if N is
# specified and is a non-negative integer.
#
# EVIDENCE-OF: R-64451-07163 The soft_heap_limit pragma always returns
# the same integer that would be returned by the
# sqlite3_soft_heap_limit64(-1) C-language function.
#
do_test softheap1-1.0 { do_test softheap1-1.0 {
execsql {PRAGMA soft_heap_limit} execsql {PRAGMA soft_heap_limit}
} [sqlite3_soft_heap_limit -1] } [sqlite3_soft_heap_limit -1]