-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: too many SQL variables when running delete_records #599
Comments
@dnowacki-usgs thanks for the report. I can't reproduce/works for me. Which version of SQLAlchemy are you using? Which version of pycsw are you using? |
I see you specify pycsw version: 2.1-dev in the ticket, which looks like a version of master at a given time. Are you able to upgrade to a later/stable version of pycsw and test? |
Thanks for the follow-up @tomkralidis. This is using sqlalchemy 1.1.4; maybe more recent versions batch queries with 1000+ parameters? |
@dnowacki-usgs thanks. I can't reproduce with SQLAlchemy 1.1.4 either. Are you able to test in a fresh environment with an updated pycsw and dependency chain? |
Alternatively if you are able to send your SQLite3 db file (offline) I can do more testing (might be a limit issue). |
@tomkralidis thanks for your continued help. We are looking at updating pycsw etc. but it may take a while to get there. I can send a link to the db file that is failing. I don't see your email address in your profile, but if you email me at the address in my profile I can get it to you. |
Hi @tomkralidis. An update: we are now running pycsw 2.2.0, sqlalchemy 1.2.10, python 3.6.0 using the latest axiom/docker-pycsw from Docker Hub. The delete_records error persists with a DB with ~2,000 records. |
@dnowacki-usgs , pycsw 2.2.0 is from March 2018, so I submitted this PR to upgrade axiom/docker-pycsw to pycsw 2.4.1, sqlalchemy 1.3.10 and python 3.7. We can test this version to see if the problem remains. |
Description
We have pycsw accessing an sqlite3 database, which has a records table containing 2647 rows. Running
python bin/pycsw-admin.py -c delete_records -f default.cfg -y
results inRuntimeError: ERROR: too many SQL variables
.Manually clearing the database by running
sqlite> delete from records
is successful. Success is short-lived; after re-loading the database withpython bin/pycsw-admin.py -c load_records -r -f default.cfg -p /store
and trying to do anotherdelete_records
results in the same error.CC @rsignell-usgs, see also USGS-CMG/usgs-cmg-portal#309
Environment
Steps to Reproduce
Additional Information
sqlalchemy version 1.1.4
The text was updated successfully, but these errors were encountered: