Just a side note. I'm not quite happy with this overall implementation in this method as those flags are engine specific and should only be evaluated if the corresponding table uses the `MyISAM` engine. Also only one of those flags is allowed for an index and IMO an exception should be thrown here if for example both `FULLTEXT` and `SPATIAL` flags are given rather than using the first match.
This is of course not part of this PR and not your fault. Just wanted to share my opinion on the overall approach :)