-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Cannot modify database - No Such Savepoint #836
Comments
Interesting. Sounds like a side effect of e76e5b3. @MKleusberg Probably of interest to you? 😄 |
Just an additional note too that clicking 'Close Database' and selecting 'Yes' to the 'Do you want to save changes?' doesn't display an error. I guess that means that way of closing a database either isn't saving the savepoints like the 'Write Changes' button, or if it is, its not displaying any errors... |
…ser#836) Previously all savepoints were added to and deleted from `savepointList`, so some savepoints could not be released, which lead to warnings and errors, e.g. it was impossible to save database or to move newly created row in 'Edit Table' window.
…ser#836) Previously all savepoints were added to and deleted from `savepointList`, so some savepoints could not be released, which lead to warnings and errors, e.g. it was impossible to save database or to move newly created row in 'Edit Table' window.
Previously all savepoints were added to and deleted from `savepointList`, so some savepoints could not be released, which lead to warnings and errors, e.g. it was impossible to save database or to move newly created row in 'Edit Table' window.
Hi everyone, |
V3.9.99 means it's a nightly build. What's the date of this version (file modified date) |
It seems I'm on the testing ppa "ubuntu xenial" |
Hmmm, looking at the testing ppa listing: https://launchpad.net/~linuxgndu/+archive/ubuntu/sqlitebrowser It seems to be saying the last build was 2016-08-24. @NicoDupont You may need to attempt building from source yourself. It should go fine, but if it doesn't then cut-n-paste any error message here and we'll probably be able to help. 😄 |
Oops, no. I was looking at the "stable" one. The testing one says it's last build was an hour ago: https://launchpad.net/~linuxgndu/+archive/ubuntu/sqlitebrowser-testing This might still be a bug we need to look into then. |
@NicoDupont Does the error occur for often / all the time, or just sometimes, or ? If it happens often, is there a way to reliably trigger it? |
The error occur all the time. The error appear if I click "Write changes" on the interface or "Write changes" in file menu. Database is also saved if I just click on "Write changes" and close the database without saving it. I don't know if I answer to your question ?
|
@NicoDupont Interesting. That's an error message we - in theory - fixed a while ago. I'll take some time this week to go through our Linux compiling instructions and update them, so you can then try compiling things yourself. It should be pretty simple, once I've done the update. |
I'll close this issue because it has been solved by @prutz1311 and @innermous a while ago. The Ubuntu problem reported by @NicoDupont seems to be fixed, too. See issue #1008. If it turns out to be still an issue, feel free to reopen the issue 😃 |
The reason to reopen this it's in #1003, but what I read there is that it was happening with 3.10.0 and 3.10.1. Couldn't be that the issue was fixed after that release and consequently can be closed for 3.11? |
I just ran into this issue in version Error: I was able to write/save changes just the other day, so not sure what's going on here. |
Uh Oh. Sounds like there's more to do for this. |
I just ran into this issue in version 3.11.2
Do you the steps to reproduce it at all? Do you know what you did to
trigger it?
|
I am having the same/similar problem but it is specific to using a db file that is on a linux samba share. |
Well it is giving me the same error, but ONLY on the samba mounted file system. |
No problem - just identifying. Thanks for clarifying - all helps identify
where the issue lies.
… |
Do you have steps to reproduce this?
|
In my case I can trigger the message by doing a simple update and then a commit, it happens in any database i've tried with. Version 3.11.2 Open a fresh instance of SQLiteBrowser, "Open Database" and select any .DB3 file. On "Execute SQL" tab do the following:
Beyond this point SQLiteBrowser behaves differently: PATH 1) If I click the button "Write Changes", everything works (update rows, saves db3, etc) and no error message at all; PATH 2) If I write the command [commit] and click "Execute all/selected SQL" the result box shows "Result: query executed successfully. Took 0ms At line 3: commit"and then the button "Write Changes" become enabled and doesn't get disabled anymore. If I click it, I receive the error message stated above. The only way to solve this is by closing the application. |
This sounds like confused GUI logic. Write state of database is not being queried and is otherwise assumed to be in a certain condition. When a user issues a commit statement via SQL commend, which alters transaction state of the database, that upsets the "assumed" database state in the code. Faulty logic/database state then causes cascading problems (confused button enable states). It may not be easy/practical to constantly check the database condition during GUI event loops(that's how GUI libraries roll - there's a background event loop happening so quick Boolean conditions are needed to enable/disable GUI controls). However, IMHO, it sounds like some extra check is needed in this instance. |
Just to unravel this a bit more, each time you execute something in the execute SQL tab, a 'begin' and 'commit' is tagged around the statements, so by providing your own, you're committing manually and then the program is trying to perform its own commit. |
My bad... I've been working with Oracle for a long time now and the [commit] comes without a second thought
My bad again... Didn't took the time to read it. I was just using it (mistakenly) the same way I use other DBMS. When I received the error message, I took the time to find this thread and post my steps to reproduce the error, thinking it was going to help. Won't make the same mistake twice. |
for me it says but it doesnt tell me what or why, or how to skip that constraint it was in fact some entry in some other table blocking the delete. Would be nice to skip foreign key checks, this is sqlite and we use it as a testing DB. Nothing worse than unable to test because some temporary test data wasnt perfectly clean deleted |
Won't make the same mistake twice
Not a problem. Taking the time to find this thread and post your steps to
reproduce the error has been a massive benefit, that not all our users do,
so doing that is greatly appreciated.
On a side-note, I'm (and others) are happy to assist wherever possible to
make your transition from Oracle to SQLite smooth!
|
Would be nice to skip foreign key checks
There is a pragma for that.
https://www.sqlitetutorial.net/sqlite-foreign-key/
see 'pragma foreign_keys = off '
|
I'm getting this error while trying to save my edits to the 'Network Activity Predictor' db of Chrome. I'm on Windows 8. |
I have also this problem. While trying to delete an record from sqlite DB 😞 |
Can you close DB4S, try again, and if it occurs, let me know what steps you're doing. |
Same issue, Linux, Debian. |
What version of DB4S are you using? |
Version 3.10.1 |
What version of DB4S are you using? What operating system? What were you doing to cause this? If you try it again, does it occur again? |
I am using 3.12.2 on Fedora Workstation 34. I installed from the Fedora repositories, since the AppImage doesn't work. I don't know how to reproduce it ... maybe interrupt a query in the middle? Something like this |
I also encounter this when working with transactions. To reproduce: first, create a table: DROP TABLE IF EXISTS accounts;
CREATE TABLE "accounts" (
"accountnum" INTEGER,
"money" INTEGER NOT NULL,
CHECK (money >= 0),
PRIMARY KEY("accountnum")
);
INSERT INTO accounts VALUES(123,500);
INSERT INTO accounts VALUES(456,500); At this point, you can click "Write Changes" Then, run following: BEGIN TRANSACTION;
INSERT INTO accounts VALUES(123456,100);
SELECT * FROM accounts; You can observe that the insert has been done succesfully. Then, run: ROLLBACK;
SELECT * FROM accounts; You can now observe that the Try to click "Write Changes" you get the error dialog for Useful info:
Installed via pacman: https://archlinux.org/packages/community/x86_64/sqlitebrowser/ |
The process of using the SQL tabs, and the purpose of the 'Write changes' button is it is already using transactions. There is no need to use transactions in the 'Execute SQL' tabs. That is the point of the 'Write changes' button. Perform the SQL. If you want to commit, click the 'write changes'. If you don't, click 'Discard'. |
Thank's for the reply, I'm sorry for misunderstanding this. I can see now that this is documented here in the wiki . On the other hand, using commands such as I feel like this is not immediately obvious to the user. I think like it should warn the user about trying to do transactions on their own, or at least it should not end up in such inconsistent state. Another example: INSERT INTO some_table VALUES(123,345);
ROLLBACK; This makes the insert and then discards the changes. Run that again, the rollback now fails with an error message about transaction being active, even BEGIN TRANSACTION now fails. I can also click "Revert Changes" but that does not actually revert the latest change. The Wiki is clear about this and warns about trying to do nested transactions, but I'd consider if it was worth to add a feature that disables this behavior and hands over the control to the user completely. Alternate solution would be to give a specific warning when trying to do transactions manually and yet another solution would be to bind the button actions/states to the begin and rollback -commands. I might want to open a separate issue about this, unless this idea has already been discarded before. |
Its a fine balance between having instructions not to do something, and trying not to bloat the software with code to stop the user doing something. Do-able, but we don't have a team of 90 programmers all itching for something to do. Here in the UK, we have tried to stop kids sticking forks in the plug sockets. We have done a lot towards that, and could stick a wire cage around each socket, but then they'd pour water in. |
Details for the issue
Using the latest nightly. Created a database fine. However, if I edit a table and click 'Write Changes', an error is displayed.
Interestingly, the changes are saved. Closing the database and re-opening it contains the modifications made.
Useful extra information
I'm opening this issue because:
I'm using DB4S on:
I'm using DB4S version:
I have also:
The text was updated successfully, but these errors were encountered: