Yesterday evening I finally released the procedure converter at
Sourceforge.net. I am quite satisfied with the result, it covers
quite a lot. But the user interface is virtuallt non-existant,
and the parsing needs some improvement. The problem is that for
more complex conversion tasks (like shifting order for function
parameters) I would need better parsing of the source code.
Features:
- converts CREATE PROCEDURE/FUNCTION syntax
- adds semi-colon at the end of statements
- converts IF and WHILE statements to MySQL syntax
- sorts the code in the correct order, with declarations at the top and instructions
- after that
- removes @, [ and ] from identifiers
- converts comments to MySQL syntax (a space in the 3rd position for -- comments)
- adds a CONTINUE HANDLER FOR NOT FOUND if the procedure contains cursors
- comments out GOTO and …