Bug #69388 JSON EXPLAIN needs table_schema attribute
Submitted: 3 Jun 2013 15:25
Reporter: Todd Farmer (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S4 (Feature request)
Version:5.6.12 OS:Any
Assigned to: CPU Architecture:Any

[3 Jun 2013 15:25] Todd Farmer
Description:
The JSON format output of EXPLAIN shows the table name, but not the table schema.  This would be useful information to include in output:

mysql> EXPLAIN FORMAT = JSON SELECT * FROM d2.t1 JOIN d1.t1 USING (a)\G
*************************** 1. row ***************************
EXPLAIN: {
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "t1",
          "access_type": "ALL",
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "t1",
          "access_type": "ALL",
          "rows": 1,
          "filtered": 100,
          "using_join_buffer": "Block Nested Loop",
          "attached_condition": "(`d1`.`t1`.`a` = `d2`.`t1`.`a`)"
        }
      }
    ]
  }
}
1 row in set, 1 warning (0.00 sec)

How to repeat:
See above.

Suggested fix:
Add table_schema attribute to table element in JSON EXPLAIN output.