[MXS-2837] Router hints are ignored when executing a CallableStatement in a Java app using MariaDB Connector/J Created: 2020-01-16 Updated: 2020-02-14 Resolved: 2020-02-14 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | hintfilter |
| Affects Version/s: | 2.4.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Rich Theobald | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04, Java 1.8, MariaDB Connector/J 2.5.3 |
||
| Issue Links: |
|
||||||||
| Description |
|
In the following slow logs, the Callable Statement is executed before the maxscale end hint comment but after the maxscale begin comment. As is shown, the stored procedure is executed on the "master" node. Slow log for Galera "Slave" (as defined by Maxscale):
Slow log for Galera "Master":
|
| Comments |
| Comment by markus makela [ 2020-01-16 ] |
|
How are the queries executed? Do they use prepared statements? |
| Comment by Rich Theobald [ 2020-01-18 ] |
|
Yes - using prepareCall method The odd thing is, when I use a prepared statement from the MariaDB client, this works as expected except for the fact that the slow log shows explicit PREPARE statements as opposed to the posted log where it shows "administrator command: Prepare". I assumed this was due to using the Connector/J and JDBC. |
| Comment by markus makela [ 2020-01-18 ] |
|
Yes, the prepared statements done with the command line client use the text protocol whereas the ones done with the Connector/J must've been done with the binary protocol. I filed |
| Comment by markus makela [ 2020-02-14 ] |
|
Closing as Incomplete since it's now a documented limitation and a feture request for it exists. |