Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.3.6, 1.4.3
-
None
-
MariaDB galera server 10.0.24
Description
If using the JDBC connector as part of a MariaDB/Galera management tool, it is not possible to connect to a non-primary server to query or force it to go primary.
This is due to the driver, internally, issuing a select command upon connection, which returns an exception as "data access" is not allowed whilst non primary. Only SHOW and SET are allowed on non primary nodes.
This prevents the connection from being returned to the caller.
org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.loadServerData()
|
|
LineNumber: 596
|
executeQuery(qr, "SELECT "
|
+ "@@max_allowed_packet, "
|
+ "@@system_time_zone, "
|
+ "@@time_zone, "
|
+ "@@sql_mode", ResultSet.TYPE_FORWARD_ONLY);
|
In 1.2 versions, the driver issued:
org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(String, int)
|
|
LineNumber: 392
|
qr = (SelectQueryResult) executeQuery(new MySQLQuery("show variables like 'max_allowed_packet'"));
|
Attachments
Issue Links
- relates to
-
CONJ-391 Improve connection using SELECT in place of SHOW
- Closed
-
MDEV-11016 wsrep_node_is_ready() check is too strict
- Closed