From a3e9886142f3cdbe10a3cdfd23440f79acf6ece8 Mon Sep 17 00:00:00 2001 From: Kolenka Date: Mon, 4 Jun 2012 23:31:52 -0700 Subject: [PATCH] Added comment --- src/calibre/devices/prst1/driver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/devices/prst1/driver.py b/src/calibre/devices/prst1/driver.py index 74692447ab..a2b3716c05 100644 --- a/src/calibre/devices/prst1/driver.py +++ b/src/calibre/devices/prst1/driver.py @@ -315,6 +315,8 @@ class PRST1(USBMS): '\n'+tb) def get_lastrowid(self, cursor): + # SQLite3 + Python has a fun issue on 32-bit systems with integer overflows. + # Issue a SQL query instead, getting the value as a string, and then converting to a long python int manually. query = 'SELECT last_insert_rowid()' cursor.execute(query) row = cursor.fetchone()