[CONJ-605] Newlines break calling stored procedures Created: 2018-05-16 Updated: 2018-05-28 Resolved: 2018-05-24 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | MySQL compatibility |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | 2.2.5, 1.7.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Björn Raupach | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi there, we switched from MySQL Connector/J to MariaDB Connector/J recently. Unfortunately we had some issues with our code calling stored procedures. It looks like MySQL Connector/J is more lenient when it comes to validating the curly braces syntax with newlines. For example the following character sequences work with MySQL Connector/J, but brake in MariaDB Connector/J. Examples are parameters for prepareCall in CallableStatement.
Maybe this looks better:
I have no clue how strict the JDBC specifications are with these things, but considering the following queries do work with MariaDB Connector/J, it makes sense to be either lenient in all cases or in none of them.
New lines break the prepareCall in two cases:
Both are easy to fix. If it is considered worth fixing. I open a PR, referencing this ticket in Github. By the way: kudos to the person who wrote the regex CALLABLE_STATEMENT_PATTERN. Thats one impressive regex. edit Here is the link to the PR: https://github.com/MariaDB/mariadb-connector-j/pull/125 |
| Comments |
| Comment by Diego Dupin [ 2018-05-16 ] |
|
right, that's not clear in the jdbc spec, but there is no reason not permitting line break. |
| Comment by Björn Raupach [ 2018-05-16 ] |
|
|