Skip to content

Cant define PRAGMAs from "run sql" tab #966

Closed

Description

@hackingtosh

Details for the issue

I cant define pragmas on the run-sql tab. E. g. if I type and execute "pragma auto_vacuum = 1;" and choose the tab "edit pragmas" i cant see my changes.

Its also not working when i modify the options directly on the "edit pragmas" tab, also if i hit the "save" button hundrets of times.

But i found a workaround, if i type and execute this:
end transaction;
pragma auto_vacuum = 1;

and after that I clicked the "compact database" option on the menu strip, then changes were accepted.

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: 7_Professional )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.9.1
  • 3.9.0
  • Other: ___
  • also occuring at version 3.8.0

I have also:

Activity

  1. justinclift commented on Feb 26, 2017

    @justinclift
    Member

    Interesting. Sounds like our transaction control bits are/were interfering with setting pragmas.

    Would you be ok to try out the latest nightly version? We've done a fair amount of work on our transaction control pieces since our 3.9.1 release. There's a decent chance this bug won't be present in the nightlies. 😄

  2. hackingtosh commented on Feb 26, 2017

    @hackingtosh
    Author

    Yes I tried "DB Browser for SQLite-2017-02-22-win64", but the problem is still there. The changes will be accepted only, if I hit the "compact database" option. Cant you recreate my problem by yourself?

  3. justinclift commented on Feb 26, 2017

    @justinclift
    Member

    It's not something I have time to look at personally today. My focus for today is on other stuff which is well overdue. 😉

    Hopefully one of the other team members has time to investigate. 😄

  4. hackingtosh commented on Feb 26, 2017

    @hackingtosh
    Author

    Ok thanks, I thought maybe you already noticed this problem ;)

  5. justinclift commented on Feb 26, 2017

    @justinclift
    Member

    No worries at all. 😄

  6. MKleusberg commented on May 1, 2017

    @MKleusberg
    Member

    This seems to be the same issue as in #980. I've just tried to explain the problem in that issue and will just copy & paste it: 😃

    That happens because we have to execute all SQL commands inside a transaction and the foreign key pragma [or any other pragma for that matter] can't be set inside a transaction. The only reasonable workaround for us that I can think of right now is to somehow detect a pragma foreign_keys=x [or other pragmas] statement and disable transactions for that. But that's always going to be error-prone...

  7. justinclift commented on May 1, 2017

    @justinclift
    Member

    Maybe if add a checkbox option to the Execute SQL tab "[ ] Run inside transaction", so people can enable/disable the transaction themselves?

  8. MKleusberg commented on Jun 30, 2017

    @MKleusberg
    Member

    @hackingtosh I believe this is fixed in the next nightly build. Can you download that (see our main page for the link) and check if it's working for you as expected? 😄

  9. justinclift commented on Aug 11, 2017

    @justinclift
    Member

    Closing this, as #980 seems to cover it well enough. 😄

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions