The structure of THD is not available inside plugins. So a plugin cannot do:
Let's add a MEM_ROOT pointer parameter to these Type_handler methods:
Plugins will create fields as follows:
Note, we eventually should probably change the TABLE parameter to to make_xxx_field() to a subset of TABLE which is only necessary inside a plugin.