Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/sqlite/test/cache.test

Issue 3108030: Move bundled copy of sqlite one level deeper to better separate it... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/test/busy.test ('k') | third_party/sqlite/test/capi2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/test/cache.test
===================================================================
--- third_party/sqlite/test/cache.test (revision 56608)
+++ third_party/sqlite/test/cache.test (working copy)
@@ -1,63 +0,0 @@
-# 2007 March 24
-#
-# The author disclaims copyright to this source code. In place of
-# a legal notice, here is a blessing:
-#
-# May you do good and not evil.
-# May you find forgiveness for yourself and forgive others.
-# May you share freely, never taking more than you give.
-#
-#***********************************************************************
-#
-# $Id: cache.test,v 1.4 2007/08/22 02:56:44 drh Exp $
-
-set testdir [file dirname $argv0]
-source $testdir/tester.tcl
-
-ifcapable {!pager_pragmas} {
- finish_test
- return
-}
-sqlite3_soft_heap_limit 0
-
-proc pager_cache_size {db} {
- set bt [btree_from_db $db]
- db_enter $db
- array set stats [btree_pager_stats $bt]
- db_leave $db
- return $stats(page)
-}
-
-do_test cache-1.1 {
- pager_cache_size db
-} {0}
-
-do_test cache-1.2 {
- execsql {
- PRAGMA auto_vacuum=OFF;
- CREATE TABLE abc(a, b, c);
- INSERT INTO abc VALUES(1, 2, 3);
- }
- pager_cache_size db
-} {2}
-
-# At one point, repeatedly locking and unlocking the cache was causing
-# a resource leak of one page per repetition. The page wasn't actually
-# leaked, but would not be reused until the pager-cache was full (i.e.
-# 2000 pages by default).
-#
-# This tests that once the pager-cache is initialised, it can be locked
-# and unlocked repeatedly without internally allocating any new pages.
-#
-set cache_size [pager_cache_size db]
-for {set ii 0} {$ii < 10} {incr ii} {
-
- do_test cache-1.3.$ii {
- execsql {SELECT * FROM abc}
- pager_cache_size db
- } $::cache_size
-
-}
-sqlite3_soft_heap_limit $soft_limit
-
-finish_test
« no previous file with comments | « third_party/sqlite/test/busy.test ('k') | third_party/sqlite/test/capi2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698