Bug #86574 Confusing EXPLAIN output for INSERT Queries
Submitted: 3 Jun 2017 16:16 Modified: 3 Jun 2017 19:35
Reporter: Peter Zaitsev Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: explain

[3 Jun 2017 16:16] Peter Zaitsev
Description:
Explain for INSERT  queries reports "No Tables Used"  Which is confusing as it is obviously the case.

How to repeat:
mysql> explain  INSERT INTO order_line (ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info) VALUES (3003, 4, 376, 6, 28540, 376, 6, 199.98997497558594, '7G0YwwzsXIcpy9yEPhtx43MA');
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra          |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
|  1 | SIMPLE      | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL | No tables used |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
1 row in set (0.00 sec)

Suggested fix:
I would suggest having more clear message (at least) to say what there was no need to Lookup any data for this query which I think what Explain is trying to say
[3 Jun 2017 19:35] MySQL Verification Team
Thank you for the bug report.