From 7eb2914c679de90503e7581a5a8b358055e83f67 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 5 Dec 2011 10:31:34 +0530 Subject: [PATCH] ... --- src/calibre/library/database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/database.py b/src/calibre/library/database.py index 86316c738e..fc29df5f02 100644 --- a/src/calibre/library/database.py +++ b/src/calibre/library/database.py @@ -1086,9 +1086,12 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE; return None def has_conversion_options(self, ids, format='PIPE'): + ids = tuple(ids) + if len(ids) > 50000: + return True return self.conn.get(''' SELECT data FROM conversion_options WHERE book IN %r AND - format=? LIMIT 1'''%(tuple(ids),), (format,), all=False) is not None + format=? LIMIT 1'''%(ids,), (format,), all=False) is not None def delete_conversion_options(self, id, format, commit=True): self.conn.execute('DELETE FROM conversion_options WHERE book=? AND format=?',