Skip to content

Crash in SqliteTableModel::getForeignKeyClause #942

Closed

Description

@schdub

Details for the issue

  1. Open DB;
  2. Open 'Execute SQL' tab;
  3. Execute simply select query to retrive data;
  4. Hover mouse over cell 1:1 in retrieved data.
  5. Crash.

Useful extra information

For some reason SqliteTableModel::m_sTable is empty:
screenshot from 2017-01-25 13 13 37

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.9.1
  • 3.9.0
  • Other: ___

I have also:

Activity

  1. justinclift commented on Jan 25, 2017

    @justinclift
    Member

    Awesome @schdub. @MKleusberg has been working on Foreign Key stuff recently, so this will probably interest him. 😄

  2. vtronko commented on Jan 25, 2017

    @vtronko
    Member

    Can't reproduce it.
    Execute simply select query to retrive data;
    It's not enough, something tells me it's specific for your table/database.
    Please, provide more useful information.

  3. vtronko commented on Jan 25, 2017

    @vtronko
    Member

    UPD: Sorry, I am able to reproduce it now. This happens if one hovers a cell for at least 3-4 seconds.
    Working on it.

  4. self-assigned this
    on Jan 25, 2017
  5. vtronko commented on Jan 25, 2017

    @vtronko
    Member

    Tooltips in execute SQL tab can't be shown right now, since foreign key functionality relies on fixed size tables as static database objects.
    I can only apply little fix that prevents crash right now.

  6. justinclift commented on Jan 25, 2017

    @justinclift
    Member

    Cool, sounds like progress in the right direction. 😄

  7. MKleusberg commented on Jan 27, 2017

    @MKleusberg
    Member

    Yeah, I don't there is much more that we can do right now. In order to support the foreign key tooltip + shortcut for queries in the Execute SQL tab we'd have to parse and understand SELECT statements and those can become quite complex. We'd need a mechanism to track which column in the results table comes from which column of which table in the database. It's the same effort that's needed to implement editing in the results view (see #393, and #141 as well).

  8. justinclift commented on Jan 27, 2017

    @justinclift
    Member

    @MKleusberg Should this be closed then?

    It sounds like this is fixed, even though the solution isn't perfect for the long term.

  9. MKleusberg commented on Jan 27, 2017

    @MKleusberg
    Member

    Yeah, I guess we can close it. If you have the time you could open a meta issue for this instead to collect use cases for a full SELECT statement parser. This here is one of them, the two issues I've mentioned above are others, and maybe there are more.

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions