Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
Linux
Description
This is issue shows up when MariaDB connector is used with EclipseLink.
EclipseLink is a JPA 2.0 implementation and allows calling a stored procedure. It works fine with MySQL connector, where it creates correctly sp call based on provided class. However, when MariaDB connector is used all calls to SP fails, this happens due to the fact that EclipseLink (platform->MySQLPlatform) sends a prepare request with a text like
.
The request fails with an error:
Internal Exception: java.sql.SQLSyntaxErrorException: 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 '
Query is : { CALL sp_list() }
Error Code: 1064
Call:
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Summary | Prepare Statement doesn't escape { } characters | Prepare Statement doesn't remove { } characters |
Comment |
[ Hi, this correspond to jira issue problem is when stored procedure hasn't any parameter, if there isn't a space before parenthesis, query parsing doesn't work. {CALL sp_list () } will work. This will be corrected in the 1.5.0 version (release in 15 days). ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 1.5.0 [ 19607 ] |
Component/s | Other [ 12201 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 76014 ] | MariaDB v4 [ 134883 ] |
https://docs.oracle.com/javase/7/docs/api/java/sql/CallableStatement.html does not have spaces after the curly bracket before CALL. I have not seen any mentioning of spaces in escape sequences (moreover, standard uses lowercase everywhere).
https://docs.oracle.com/cd/E13157_01/wlevs/docs30/jdbc_drivers/sqlescape.html