mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Added comment
This commit is contained in:
parent
530d726da2
commit
a3e9886142
@ -315,6 +315,8 @@ class PRST1(USBMS):
|
|||||||
'\n'+tb)
|
'\n'+tb)
|
||||||
|
|
||||||
def get_lastrowid(self, cursor):
|
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()'
|
query = 'SELECT last_insert_rowid()'
|
||||||
cursor.execute(query)
|
cursor.execute(query)
|
||||||
row = cursor.fetchone()
|
row = cursor.fetchone()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user