-
-
Notifications
You must be signed in to change notification settings - Fork 641
Description
I attempted to build the large Cremona database with sagemath 9.6 and sqlite 3.36.0 on a Fedora 36 x86_64 machine, as follows:
import sage.databases.cremona
c = sage.databases.cremona.LargeCremonaDatabase('cremona', False, True)
c._init_from_ftpdata('ecdata-2019-10-29')
The attempt failed at the very end. This is the last of the output:
Inserting allgens.90000-99999
Committing...
Traceback (most recent call last):
File "/builddir/build/BUILD/sage-9.6/cremona.sage.py", line 10, in <module>
c._init_from_ftpdata('ecdata-2019-10-29')
File "/builddir/build/BUILDROOT/sagemath-9.6-4.fc38.x86_64/usr/lib64/python3.11/site-packages/sage/databases/cremona.py", line 1397, in _init_from_ftpdata
self.vacuum()
File "/builddir/build/BUILDROOT/sagemath-9.6-4.fc38.x86_64/usr/lib64/python3.11/site-packages/sage/databases/sql_db.py", line 2180, in vacuum
self.__connection__.execute('VACUUM')
sqlite3.OperationalError: cannot VACUUM from within a transaction
The phrase "from within a transaction" suggests a missing commit. Indeed, unlike _init_degphi
and _init_allbsd
, which both print the "Committing..." message and then call self.commit()
, _init_allgens
just prints the message but doesn't call commit. This patch adds the missing commit. With this change, I was able to build the database successfully.
Component: elliptic curves
Keywords: cremona database
Branch/Commit: u/gh-jamesjer/large_cremona_database_construction_failure @ 0a2c5be
Issue created by migration from https://trac.sagemath.org/ticket/34516