Bug #72717 'explain for connection' doesn't work on prepared statements

Submitted: 22 May 2014 6:37 Modified: 12 Jun 2014 17:14
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:5.7.5 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[22 May 2014 6:37] Shane Bester
Description:
mysql> show processlist;
+----+------+------+------+---------+------+------------+-------------------+
| Id | User | Host | db   | Command | Time | State      | Info              |
+----+------+------+------+---------+------+------------+-------------------+
|  1 | root |      | test | Query   |    3 | User sleep | select sleep(100) |
|  2 | root |      | test | Query   |    0 | starting   | show processlist  |
+----+------+------+------+---------+------+------------+-------------------+
2 rows in set (0.01 sec)

mysql> explain for connection 1;
ERROR 1896 (HY000): EXPLAIN FOR CONNECTION command is supported only for SELECT/UPDATE/INSERT/DELETE/REPLACE
mysql>

How to repeat:
prepare s from 'select sleep(1000)';
execute s;

explain for connection X;

Suggested fix:
add a note in the docs.
http://dev.mysql.com/doc/refman/5.7/en/explain-for-connection.html

I'd be happier to see it working sometime in future.
[12 Jun 2014 17:14] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.