Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in SqliteTableModel::getForeignKeyClause #942

Closed
5 of 13 tasks
schdub opened this issue Jan 25, 2017 · 8 comments
Closed
5 of 13 tasks

Crash in SqliteTableModel::getForeignKeyClause #942

schdub opened this issue Jan 25, 2017 · 8 comments

Comments

@schdub
Copy link
Contributor

schdub commented Jan 25, 2017

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:

@justinclift
Copy link
Member

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

@vtronko
Copy link
Member

vtronko commented Jan 25, 2017

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.

@vtronko
Copy link
Member

vtronko commented Jan 25, 2017

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.

@vtronko vtronko self-assigned this Jan 25, 2017
@vtronko
Copy link
Member

vtronko commented Jan 25, 2017

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.

vtronko added a commit that referenced this issue Jan 25, 2017
This is probably just temporary solution. Tooltip code was written
specifically for Browse Data tab, so it requires some versatile changes.
@justinclift
Copy link
Member

Cool, sounds like progress in the right direction. 😄

@MKleusberg
Copy link
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).

@justinclift
Copy link
Member

justinclift commented Jan 27, 2017

@MKleusberg Should this be closed then?

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

@MKleusberg
Copy link
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
Projects
None yet
Development

No branches or pull requests

4 participants