Skip to content

specific query - will make the application not respond anymore #1363

Open

Description

@flcatalin

Details for the issue

running the query, will make the application not to respond anymore (3.10.1 portable):

WITH RECURSIVE dates(date) AS (
VALUES('2018-04-06')
UNION ALL
SELECT date(date)
FROM dates
WHERE date < '2018-04-10'
)
SELECT date FROM dates;

Useful extra information

correct query is:

WITH RECURSIVE dates(date) AS (
VALUES('2018-04-06')
UNION ALL
SELECT date(date, '+1 day')
FROM dates
WHERE date < '2018-04-10'
)
SELECT date FROM dates;

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: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

I have also:

Activity

  1. chrisjlocke commented on Apr 12, 2018

    @chrisjlocke
    Member

    How many rows in that table 'dates' ? Does it come back after a while? Have you an example database you could email me? db4s [at] chrisjlocke.co.uk

  2. justinclift commented on Apr 12, 2018

    @justinclift
    Member

    This kind of sounds like a standard run-away SQL query. eg it's taking much longer than expected, due to the SQL query not being quite right

    From faint memory, we don't yet support cancelling queries that are taking too long. 😦 It's something that should be added at some point, but isn't there yet (as far as I remember).

  3. sky5walk commented on Apr 12, 2018

    @sky5walk

    Can you make all queries run from a separate thread?
    Then, the gui is not blocked and a 'cancel' button can stop or kill the unfinished thread.

  4. justinclift commented on Apr 12, 2018

    @justinclift
    Member

    Yeah, I think that's the direction we've started on with things already, but I'm not sure how far along we are. @MKleusberg was getting that done I think.

    Note that my head is buried in another project at the moment (CAD/CAM stuff), thus my not remembering details well for where this "make a cancel button work" is up to.

  5. chrisjlocke commented on Apr 12, 2018

    @chrisjlocke
    Member

    Can you make all queries run from a separate thread?

    Its not as simple as a quick one line tweak to the code, as the program has to be geared up for multi-threaded use. The rest of the program and code logic also isn't geared up for it, so unexpected things happen if the user tries to amend tables, switch tabs or do 'weird' things while the GUI isn't locked...

  6. sky5walk commented on Apr 12, 2018

    @sky5walk

    Haha, not suggesting threading is easy. However, I rarely see gui apps without threading. Maybe small utilities, but even a file lister benefits from threading.
    My apps process gui events in the main thread. No additional threads can create or populate gui elements. The "worker" threads only notify the main thread of some action to perform or a status update, etc.
    Does the nightly build have threading for some actions but not all?

  7. justinclift commented on Apr 12, 2018

    @justinclift
    Member

    I think the threading bits so far are mainly around fetching data in the background (eg for the Browse Data tab). My dodgy faint memory is also recalling some discussion around threads for the Execute SQL tab... but I don't recall if that was just discussion prior to coding, or if anything has actually been implemented.

    Hmmm, that probably doesn't help answer the question. 🤕

  8. sky5walk commented on Apr 12, 2018

    @sky5walk

    Thanks, that helps explain the current threading use in the nightly.
    If only for fetching initial data, I can delay updating to latest nightly.

    I am on the lookout for threading updates, since I have crashed DB4S sessions many times with runaway queries. :(

  9. changed the title [-]specific query - will make the applciation not to respond anymore[/-] [+]specific query - will make the application not respond anymore[/+] on Oct 17, 2018
  10. MKleusberg commented on Oct 18, 2018

    @MKleusberg
    Member

    @flcatalin and @sky5walk Sorry for the long delay here. Are you still interested in this issue? I'm asking because we are currently preparing some changes which add, besides making some other changes, a cancel button to the Execute SQL area and keep the UI more responsive. Because it's changing a lot of our code we want to test this as good as we can. Are you interested in giving it a try? You can find the Windows and OSX build here:

  11. self-assigned this
    on Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions