-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Hitting "Delete" key doesn't do what you expect, kills app, and probably your DB #1391
Comments
Ouch, that definitely sounds like a bug. Which version is this happening in, and on which OS? 😄 |
MAcOS 10.13.2 |
Note: The reason I'm getting the unique constraint error is that the primary key column doesn't have |
Thanks. If you have a minute to try with our latest nightly version then it's possible this might be fixed already. We're getting kinda close to the next release, so there's lots of bug fixes / tweaks / similar in our current nightly builds. 😄 https://nightlies.sqlitebrowser.org/latest/ If that helps. 😉 |
Doh! Oh well. So much for hoping. Thanks for checking @broofa. 😁 |
When selecting an entire row or multiple entire rows in the table view and hitting the delete key, delete the records and not just the cell contents. See issue #1391.
Can you try again with tomorrow's nightly build, @broofa? I have just changed it so that selecting an entire row (or multiple rows, or all rows as in your case) and hitting the delete key actually deletes the record(s) and doesn't just clear the cell contents. That should solve the immediate issue you're facing here 😄 |
Appears to be fixed in nightly. Feel free to close. Thanks! |
Excellent. Thanks for checking @broofa. 😄 Well done @MKleusberg. 😁 |
Expected result: All rows get deleted from the DB in a single transaction (preceded by a "Are you sure you want to do this?" dialogue, of course). Note: This is the behavior for the Sequel Pro app.
Actual result: App tries to null out every single field of every row, using a separate query for each [field,row] tuple, which seems horribly inefficient but hey, it works.
... except it doesn't. Instead, the primary key constraint gets violated and you start getting alerts about
Unique Constraint Failed
. Click "okay"... another alert... click "okay" again... another alert ... repeat 1,500 times for every row in your table. Or, in practice, resign yourself to the app being toast andkill -9
it from the command line.And for bonus points, notice that your DB has been corrupted because only some of the fields in some of the rows have been set to null and... ah, screw it, I'll just restore from backup.
(But, thank you for an awesome app! Seriously. It's been really helpful!)
The text was updated successfully, but these errors were encountered: