Replace more of temporary MyISAM tables with MEMORY

Registered by Laurynas Biveinis

MySQL 8.0.2 introduces TempTable engine that is able to handle VARCHAR for optimizer temp tables efficiently: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html, https://dev.mysql.com/doc/refman/8.0/en/internal-temporary-tables.html

With dynamic row format in MEMORY, it is unnecessary to use MyISAM for temporary tables using large VARCHARs or BLOBs. Make the server use MEMORY tables and fix any bugs.

Would be great to have run-time switch (global | session) to use old or new engine.
If that is too hard - startup option also is fine.
Switch is OFF by default.

The feature should be passed extensive QA.

Blueprint information

Status:
Not started
Approver:
Stewart Smith
Priority:
Not
Drafter:
Laurynas Biveinis
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.