mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the explicit form of setting sqlite cache size as the sqlite page size was changed earlier this year
This commit is contained in:
parent
bd772acd2b
commit
5e7f8ddb2d
@ -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]
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user