Wednesday, September 3, 2008

Triggers wont work with jdbc queries

I wanted to execute trigger creation through ant scripts so that whole installation process will be automated. But unfortunately trigger creation script kept failing. After some googling I figured out that problem is in the command DELIMITER |. This command is one of commands available in mysql client and is not included in sql specification. Mysql default delimiter ; is used in trigger which is unfortunately mis guiding clients like jdbc query to stop at wrong delimiters, thus creating errors.
For the moment it seems like I have to invoke triggers using command line. Anyway if I found out a solution I will let you all know.

No comments: