Skip to content

"COMMIT;" -> cannot commit - no transaction is active #583

Closed

Description

@justinclift

Noticing some interesting messages in the output windows on Win64 with SQLCipher compiled in:

executeSQL:  "COMMIT;" -> cannot commit - no transaction is active

As per screenshot:

commit failure messages

The first three lines were output when setting the encryption key (File → Set Encryption).

The final '"COMMIT;" -> cannot commit' line is output any time the "Write Changes" button is pressed.

I haven't traced through the code to figure out what's going on, and the data appears at cursory glance to be getting written to disk, as the database can be re-opened to find the data there. However, this is something that bears looking into, just to be safe. 😉

Activity

  1. MKleusberg commented on May 5, 2016

    @MKleusberg
    Member

    Hi Justin!
    I looked into this and fixed it. This was caused by an overcautious COMMIT when saving a database. We'd save all changes and then do an extra-commit just to be sure. But since there was no need for this, SQLite would output that warning. So this isn't caused by SQLCipher but would happen with the normal version, too. Good news is that this doesn't cause any harm at all, so no chance of this causing any data loss etc. I've fixed it anyway, so the warning should be gone. Instead of just deleting the COMMIT call (which should have been ok, too) we're now checking if there is still a transaction after saving everything, and only if there is we call COMMIT.

  2. justinclift commented on May 6, 2016

    @justinclift
    MemberAuthor

    Awesome 😄, I'll verify it from my end probably tomorrow.

  3. justinclift commented on May 6, 2016

    @justinclift
    MemberAuthor

    Tried this out again with the two latest commits applied. Yep, that last commit message - generated when clicking the "Write Changes" button - is no longer happening.

    But 😄, found some other instances of it (and seemingly related).

    This one is generated when creating a new database (non-encrypted). The message appears right after choosing a filename to save the database as:

    db4s-issue583-screenshot_2

    The "RELEASE RESTOREPOINT;" line after that is generated when clicking "Write Changes", directly after creating an empty table (without changing to the "Browse Data" tab yet):

    db4s-issue583-screenshot_3

    The third, fourth, and fifth lines are generated when the database file is closed. Seems like fairly standard widget output message stuff, and is hopefully easy to address. 😄

    db4s-issue583-screenshot_4

  4. MKleusberg commented on May 8, 2017

    @MKleusberg
    Member

    @justinclift Should be fixed, too, now 😉 Can you double check?

  5. justinclift commented on May 8, 2017

    @justinclift
    MemberAuthor

    Will do. Probably later today, but it may get pushed out to sometime this week depending on how other things go. 😉

  6. self-assigned this
    on May 8, 2017
  7. MKleusberg commented on Aug 13, 2017

    @MKleusberg
    Member

    Any update here? 😄

  8. justinclift commented on Aug 13, 2017

    @justinclift
    MemberAuthor

    Ahhh, not yet. Haven't yet tried it, and it's not high enough up the priority list just atm. 😄

  9. MKleusberg commented on Aug 13, 2017

    @MKleusberg
    Member

    No worries 😉

  10. mgrojo commented on Oct 5, 2018

    @mgrojo
    Member

    I've followed the steps and I don't reproduce the messages. But I get these in my case/version:

    edit: editing failed
    edit: editing failed
    
  11. MKleusberg commented on May 22, 2021

    @MKleusberg
    Member

    I'll just assume this is fixed 😄 At least I didn't notice any "cannot commit" messages for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions