This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SQLite3 iterdump ordering
Type: behavior Stage: needs patch
Components: Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ghaering Nosy List: Jamie.Spence, ezio.melotti, ghaering, r.david.murray
Priority: normal Keywords:

Created on 2013-01-07 14:43 by Jamie.Spence, last changed 2022-04-11 14:57 by admin.

Messages (4)
msg179267 - (view) Author: Jamie Spence (Jamie.Spence) Date: 2013-01-07 14:43
After dumping a database with iterdump, trying to execute the dumped SQL sometimes results in an error because the statement order may be wrong. In my case, it is a view that is being created before the view it is referencing. Would ordering the sqlite_master table view query in dump.py by ID fix this issue?
msg179771 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-01-12 05:46
Can you provide a minimal script to reproduce the issue?
If you can then turn the script in a unittest, you can try to patch the code and order the sqlite_master table and see if that fixes the problem.
msg179791 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-01-12 13:38
When you say sometimes, do you mean randomly on the same schema, or do you mean depending on the specific schema sometimes it doesn't work?

The code is the same in the other python versions, so I'm adding them as the bug doubtless exists there as well.
msg248836 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2015-08-19 13:09
http://bugs.python.org/issue20463 is related.
History
Date User Action Args
2022-04-11 14:57:40adminsetstatus: pending -> open
github: 61089
2019-11-12 18:11:48serhiy.storchakasetstatus: open -> pending
2015-08-19 13:09:37ghaeringsetassignee: ghaering
messages: + msg248836
2013-01-12 13:38:42r.david.murraysetmessages: + msg179791
versions: + Python 3.2, Python 3.3, Python 3.4
2013-01-12 05:46:35ezio.melottisetnosy: + ghaering, r.david.murray, ezio.melotti

messages: + msg179771
stage: needs patch
2013-01-07 14:43:50Jamie.Spencecreate