MDEV-10000 adds EXPLAIN FOR CONNECTION for compatibility with MySQL-8.
In MySQL-8, EXPLAIN FOR CONNECTION produces filtered and partitions columns. This means that anybody using EXPLAIN FOR CONNECTION syntax will expect these columns.
On the other hand, in MariaDB, regular EXPLAIN and SHOW EXPLAIN do not show the extra columns.
How can we be consistent across all commands? The solution is to first do what MySQL 5.7 did:
- make the EXPLAIN command produce partitions and filtered columns.
- then, make SHOW EXPLAIN and EXPLAIN FOR CONNECTION produce them, too.