3 ms·
Duplicate keys in a SQLite file sounds like an audacity bug. :(
by justinclift 3y ago
Duplicate keys in a SQLite file sounds like an audacity bug. :(
- anonzzzies 3y agoYeah, it definitely is. And it's fixable manually. Kind of the advantage to an open file format with nice tooling.
- regularfry 3y agoIt also sounds like something that could be manually prevented ahead of time. If you can crack open the file on first save and add the right uniqueness constraint, that should make Audacity crash when it tries to corrupt the data.
- justinclift 3y ago> ... that should make Audacity crash when it tries to corrupt the data. That'd be fairly non-optimal behaviour. ;) When the application tries to add wrong data (eg duplicate key violating uniqueness constraint), SQLite will return an error. The application should handle things better than by crashing. In theory anyway. :)
- regularfry 3y agoIf your choices are a crash or corruption, choose the crash.
- justinclift 3y agoSure, data integrity is important. But hopefully the choices are a bit better than just those two. :)
- sgarland 3y agoMaybe. The SQLite list of gotchas [0] is quite something. NULLs in the PK? Sure. FKs don’t actually do anything unless you pass a PRAGMA? Why not? Etc. I could easily see someone not fully grasping just how much SQLite lets pass by default, and thus not having a test catch it. [0]: https://www.sqlite.org/quirks.html https://www.sqlite.org/quirks.html
- deleted 3y ago[deleted]