You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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...
Reacted by Leroy Förster, Felix Bernhard, Dawid Stefaniak and Daniel Ach
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. 😄
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!
Can you close DB4S, try again, and if it occurs, let me know what steps you're doing.
Also, I don't know what version of DB4S you're using - can you provide that information?
Also, what operating system are you using?
I also encounter this when working with transactions.
To reproduce: first, create a table:
DROPTABLE IF EXISTS accounts;
CREATETABLE "accounts" (
"accountnum"INTEGER,
"money"INTEGERNOT 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 ROLLBACK was effective.
Try to click "Write Changes" you get the error dialog for no such savepoint: RESTOREPOINT (RELEASE "RESTOREPOINT";)
Useful info:
$ sqlitebrowser -v
DB Browser for SQLite Version 3.12.2
Built for x86_64-little_endian-lp64, running on x86_64
Qt Version 5.15.6
SQLCipher Version 4.5.2 community (based on SQLite 3.39.2).
The process of using the SQL tabs, and the purpose of the 'Write changes' button is it is already using transactions.
By adding your own, you're erasing the history and journal needed for the transactions to occur .. so when you press 'Write Changes' you've already committed, so the 'no such savepoint' is going to fail .. as you've wiped the journal.
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'.
This is expected behaviour.
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 ROLLBACK and COMMIT still works (at least during specific states) but the UI does not reflect this. For example BEING TRANSACTION ; just prints Execution finished without errors. and if after that I do an INSERT and then ROLLBACK it works the first time. The problem is that if I run the same SQL tab again, I start getting errors about no active transactions.
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.
The code to do what you're asking isn't impossible, but poses risks without a lot of testing - switching tabs may then not work, or the program would have to monitor the state of every tab, etc.
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.
Point being, we could add a bunch of code to do all that, then someone will find another way of breaking it.
Sometimes, a list of 'known issues' is at least recognising the problem and a way of stopping people losing forks.
Activity
justinclift commentedon Oct 18, 2016
Interesting. Sounds like a side effect of e76e5b3.
@MKleusberg Probably of interest to you? 😄
chrisjlocke commentedon Oct 18, 2016
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...
Improve handling of SQLite savepoints (sqlitebrowser#878) (sqlitebrow…
Improve handling of SQLite savepoints (sqlitebrowser#878) (sqlitebrow…
Merge pull request #895 from prutz1311/master
Improve handling of SQLite savepoints (#878) (#836)
Merge pull request #895 from prutz1311/master
NicoDupont commentedon Apr 29, 2017
Hi everyone,
I exactly have the same issue on my installation (Ubuntu 16.04 64b)
Version 3.9.99
Version de Qt : 5.5.1
Version de SQLite : 3.11.0
chrisjlocke commentedon Apr 29, 2017
V3.9.99 means it's a nightly build. What's the date of this version (file modified date)
Have you tried one of the latest nightlies?
NicoDupont commentedon Apr 29, 2017
It seems I'm on the testing ppa "ubuntu xenial"
where I can see the file modified date ?
Thank you
justinclift commentedon Apr 29, 2017
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. 😄
justinclift commentedon Apr 29, 2017
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.
justinclift commentedon Apr 29, 2017
@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?
20 remaining items
chrisjlocke commentedon Aug 29, 2019
chrisjlocke commentedon Aug 29, 2019
AndrewMcSwain commentedon Nov 23, 2019
I'm getting this error while trying to save my edits to the 'Network Activity Predictor' db of Chrome. I'm on Windows 8.
rrakso commentedon Nov 3, 2020
I have also this problem. While trying to delete an record from sqlite DB 😞
chrisjlocke commentedon Nov 3, 2020
Can you close DB4S, try again, and if it occurs, let me know what steps you're doing.
Also, I don't know what version of DB4S you're using - can you provide that information?
Also, what operating system are you using?
frapeshka commentedon Feb 25, 2021
Same issue, Linux, Debian.
chrisjlocke commentedon Feb 25, 2021
What version of DB4S are you using?
frapeshka commentedon Feb 26, 2021
Version 3.10.1
Qt Version 5.9.3
SQLite Version 3.21.0
It's not crucial, I just restarted the app and the problem gone.
raffaelemancuso commentedon Jul 19, 2021
I have just stumbled upon this:
How can I fix the problem?
Will my edits be saved if I exit from the db?
chrisjlocke commentedon Jul 19, 2021
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?
raffaelemancuso commentedon Jul 19, 2021
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
vilhok commentedon Apr 17, 2023
I also encounter this when working with transactions.
To reproduce: first, create a table:
At this point, you can click "Write Changes"
Then, run following:
You can observe that the insert has been done succesfully.
Then, run:
You can now observe that the
ROLLBACKwas effective.Try to click "Write Changes" you get the error dialog for
no such savepoint: RESTOREPOINT (RELEASE "RESTOREPOINT";)Useful info:
Installed via pacman: https://archlinux.org/packages/community/x86_64/sqlitebrowser/
chrisjlocke commentedon Apr 17, 2023
The process of using the SQL tabs, and the purpose of the 'Write changes' button is it is already using transactions.
By adding your own, you're erasing the history and journal needed for the transactions to occur .. so when you press 'Write Changes' you've already committed, so the 'no such savepoint' is going to fail .. as you've wiped the journal.
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'.
This is expected behaviour.
vilhok commentedon Apr 18, 2023
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
ROLLBACKandCOMMITstill works (at least during specific states) but the UI does not reflect this. For exampleBEING TRANSACTION; just printsExecution finished without errors.and if after that I do anINSERTand thenROLLBACKit works the first time. The problem is that if I run the same SQL tab again, I start getting errors about no active transactions.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:
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.
chrisjlocke commentedon Apr 19, 2023
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.
The code to do what you're asking isn't impossible, but poses risks without a lot of testing - switching tabs may then not work, or the program would have to monitor the state of every tab, etc.
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.
Point being, we could add a bunch of code to do all that, then someone will find another way of breaking it.
Sometimes, a list of 'known issues' is at least recognising the problem and a way of stopping people losing forks.