Bug #96675 mysql jdbc driver doesn't say what the syntax error comes from
Submitted: 27 Aug 2019 21:53 Modified: 28 Aug 2019 15:45
Reporter: Stephen Buergler Email Updates:
Status: Not a Bug Impact on me:
Category:Connector / J Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[27 Aug 2019 21:53] Stephen Buergler
The sql syntax error message should be enhanced to include the sql that is broken.

MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

Instead of sending all of that why not include the text of the sql in error?

How to repeat:
Try to run some broken sql.
[28 Aug 2019 15:45] Alexander Soklakov
Hi Stephen,

We don't do that intentionally, it's not appropriate in a production environment. Instead you could use "profileSQL" connection property in a development environment, see https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-propertie... for details.