Use the explicit form of setting sqlite cache size as the sqlite page size was changed earlier this year

This commit is contained in:
Kovid Goyal 2016-09-23 18:52:39 +05:30
parent bd772acd2b
commit 5e7f8ddb2d
2 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ class Connection(apsw.Connection): # {{{
apsw.Connection.__init__(self, path) apsw.Connection.__init__(self, path)
self.setbusytimeout(self.BUSY_TIMEOUT) self.setbusytimeout(self.BUSY_TIMEOUT)
self.execute('pragma cache_size=5000') self.execute('pragma cache_size=-5000')
self.execute('pragma temp_store=2') self.execute('pragma temp_store=2')
encoding = self.execute('pragma encoding').next()[0] encoding = self.execute('pragma encoding').next()[0]

View File

@ -210,7 +210,7 @@ def load_c_extensions(conn, debug=DEBUG):
def do_connect(path, row_factory=None): def do_connect(path, row_factory=None):
conn = sqlite.connect(path, factory=Connection, conn = sqlite.connect(path, factory=Connection,
detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES) detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES)
conn.execute('pragma cache_size=5000') conn.execute('pragma cache_size=-5000')
encoding = conn.execute('pragma encoding').fetchone()[0] encoding = conn.execute('pragma encoding').fetchone()[0]
conn.create_aggregate('sortconcat', 2, SortedConcatenate) conn.create_aggregate('sortconcat', 2, SortedConcatenate)
conn.create_aggregate('sortconcat_bar', 2, SortedConcatenateBar) conn.create_aggregate('sortconcat_bar', 2, SortedConcatenateBar)