After looking at the SQLExec source and enabling verbose logging, I found a workaround:
Bypass
if the sql statement contains a string containing '-', put a separator (with a comma) on the next line.
This does not work
INSERT INTO email_client (email_client_id,generated_reply_text) VALUES(100002,'----- Original Message -----');
It succeeds
Note that the semicolon is on a separate line
INSERT INTO email_client (email_client_id,generated_reply_text) VALUES(100002,'----- Original Message -----') ;
More details
Enabling verbose logging, I saw that when Ant came across an offensive sql expression, it actually passed three sql statements to the jdbc driver at once. An abusive statement, the next statement (which also includes the built-in "-") and the subsequent statement (which did not include the "-").
I quickly figured out Ant code and did not see any obvious errors. Since I did not plan for the Ant patch, I was looking for a workaround.
Fine tuning with it, I found that if I just moved the separator (semicolon) to the next line for statements with built-in "-", the scripts were executed successfully.
thank you all for weighing
source share