Bug 320375 - JJ: SQL plugin doesn't return results of 'explain' query
Summary: JJ: SQL plugin doesn't return results of 'explain' query
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 3.10.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 07:50 UTC by Dmitriy Geels
Modified: 2016-09-05 19:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitriy Geels 2013-05-28 07:50:03 UTC
Kate SQL plugin returns text "-1 line changed" (or similar, transleted from russian) in text output tab and nothing in data tab, when executing query like "explain select ...".

Database is mysql.

Reproducible: Always

Steps to Reproduce:
1. Execute query "explain select * from any_table"
2. See both query result tabs.

Actual Results:  
Message "28.05.13 11:44: Затронута -1 строка" in text output tab. Nothing in data output tab.

Expected Results:  
Table, describing query plan, in data output tab.
Comment 1 Marco Mentasti 2013-05-28 21:26:30 UTC
Hi Dmitriy,
thanks for your bug report. I'll investigate on this issue as soon as possibile.
i admit i never tried to execute the EXPLAIN statement, i'll search for a way to handle this kind of output
Comment 2 Dmitriy Geels 2013-05-29 06:20:12 UTC
(In reply to comment #1)
This is MySQL-specific issue. Also, 'DESCRIBE SELECT ...' do same thing.
PostgreSQL/Oracle use 'PLAN SELECT ...' syntax, but I don't know, how does it return results.
Comment 3 Dmitriy Geels 2013-08-16 14:57:53 UTC
One more problematic query: 'SHOW CREATE TABLE ...'
Comment 4 Marco Mentasti 2013-08-16 18:22:23 UTC
It seems that Qt doesn't know how to handle this statement, it's recognized as a non-select, then simply execute it but discarding results. I have to look deeper into Qt code and its way to retrieve results from a query.

About your last example there's a workaround:
in schema browser, select your table --> right click --> Generate --> CREATE
It will give you the sql-specific statement needed to create the selected table
Comment 5 Dmitriy Geels 2013-08-19 11:21:00 UTC
I don't see anythyng other than select/insert/update/delete in context menu
Comment 6 Christoph Cullmann 2016-09-05 19:16:24 UTC
If Qt doesn't know how to handle this, we can't improve easily for that.
If that still is an issue with Qt 5, please report and bug there.