Explain Analyzer only posts first line - Bug?
When using the "right mouse click" EXPLAIN > EXPLAIN Analyzer... feature only the first line of the Analyzer query result is posted to the MariaDB webservice :-(
Code modification/commit
9368f31
from ansgarbecker,
9 years ago,
revision 9.2.0.4962
Log debug message in helpers.ShellExec(), so we can check the url which Heidi sends to MariaDB's explain analyzer. See http://www.heidisql.com/forum.php?t=18677
/* 2015-06-16 15:08:35 [] */ /* Executing shell command: "http://mariadb.org/explain_analyzer/api/1/?raw_explain=%2B%0D%0A%7Cid%7Cselect_type%7Ctable%7Ctype%7Cpossible_keys%7Ckey%7Ckey_len%7Cref%7Crows%7CExtra%7C%0D%0A%2B%0D%0A%7C1%7CSIMPLE%7CwProdukt%7CALL%7C%7C%7C%7C%7C90080%7CUsing%20temporary;%20Using%20filesort%7C%0D%0A%7C1%7CSIMPLE%7CwProduktangebot%7Cref%7CwProduktID%7CwProduktID%7C4%7CXXXXXXXXXXXX.wProdukt.ID%7C1%7C%7C%0D%0A&client=HeidiSQL" */
I did some further checks with the URL in the log file of the recent version 9.2.0.4971. It looks like a problem in the URL parser of https://mariadb.org/explain_analyzer/analyze/ or URL creation of HeidiSQL!
The query logged in the log is
When I do a JavaScript unescape() on this I get:
So far this looks very good, the two lines are there...
When I use this URL 2 redirects happen... So I figured out that the API/URL has changed: from http://mariadb.org/explain_analyzer/api/1/?raw_explain= to https://mariadb.org/explain_analyzer/analyze/?raw_explain=
Then I realized that my EXPLAIN was cropped on the Explain Analyser directly at the ";" of my "Extra" column data. So I replaced "; " with "%3B%20" and it works!
I think this should be changed in HidiSQL:
- change URL from http://mariadb.org/explain_analyzer/api/1/?raw_explain= to https://mariadb.org/explain_analyzer/analyze/?raw_explain=
- Inside the "Extra column" do also an URL encoding
The query logged in the log is
http://mariadb.org/explain_analyzer/api/1/?raw_explain=%2B%0D%0A%7Cid%7Cselect_type%7Ctable%7Ctype%7Cpossible_keys%7Ckey%7Ckey_len%7Cref%7Crows%7CExtra%7C%0D%0A%2B%0D%0A%7C1%7CSIMPLE%7CwProdukt%7CALL%7C%7C%7C%7C%7C90080%7CUsing%20temporary;%20Using%20filesort%7C%0D%0A%7C1%7CSIMPLE%7CwProduktangebot%7Cref%7CwProduktID%7CwProduktID%7C4%7Cd01e0f95.wProdukt.ID%7C1%7C%7C%0D%0A&client=HeidiSQL
When I do a JavaScript unescape() on this I get:
http://mariadb.org/explain_analyzer/api/1/?raw_explain=+
|id|select_type|table|type|possible_keys|key|key_len|ref|rows|Extra|
+
|1|SIMPLE|wProdukt|ALL|||||90080|Using temporary; Using filesort|
|1|SIMPLE|wProduktangebot|ref|wProduktID|wProduktID|4|d01e0f95.wProdukt.ID|1||
&client=HeidiSQL
So far this looks very good, the two lines are there...
When I use this URL 2 redirects happen... So I figured out that the API/URL has changed: from http://mariadb.org/explain_analyzer/api/1/?raw_explain= to https://mariadb.org/explain_analyzer/analyze/?raw_explain=
Then I realized that my EXPLAIN was cropped on the Explain Analyser directly at the ";" of my "Extra" column data. So I replaced "; " with "%3B%20" and it works!
I think this should be changed in HidiSQL:
- change URL from http://mariadb.org/explain_analyzer/api/1/?raw_explain= to https://mariadb.org/explain_analyzer/analyze/?raw_explain=
- Inside the "Extra column" do also an URL encoding
Code modification/commit
ef9dffd
from ansgarbecker,
9 years ago,
revision 9.2.0.4972
Use updated URL for MariaDB Explain analyzer, and encode semicolon in URL parameter. See http://www.heidisql.com/forum.php?t=18677
Please login to leave a reply, or register at first.