The MySQL AST processor which maps the function names does correctly mark some Functions as not supported. In idiom the StatusMessageConstants.IDIOM_NOT_SUPPORTED_MSG (which is TODO) constant is used to mark something as not supported. Later this message is replaced with the Migration Wizard's one which is StatusMessageConstants.NOT_SUPPORTED. The following happens:
* The Default Processor marks every syntax which is not supported by putting the subtree (AST) under an TN_TODO tree node
* The mapping processor does not put the TN_FUNC subtree under a TN_TODO subtree. Instead it marks the beginning of the first Token under this tree with the IDIOM_NOT_SUPPORTED_MSG and the last Token with a closing comment
* The printer now transforms this /* TODO ... */ text to lower case because it's not matching any other TN_ type node
The best would be not to generate the /* TODO ... */ message in the mapping AST processor, but instead to generate a TN_TODO node for the TN_FUNC node if there was no mapping available. Then the printer would handle the TN_TODO subtree by generating the /* #NOTSUPPORTED .... */ message.
Instead replacing the TN_FUNC node with the function call text (The printer is not aware of TN_FUNC yet because it was introduced quite later) now the TN_FUNC node is replaced with a TN_TODO node if the function could not be mapped (which is especially the case if you have a UDF). TN_TODO is printed out by taking the level into account which causes a formatting error in DDL now. Have to fix this as well.
Performed and commited a change, but had to realize that it has a side effect. Because the TN_SELECT node is explicitly handled by the printer we now have something like SELECT TN_TODO FROM ... . Will fix the fix soon.