Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-757

Cannot change ws_rep variables

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.5.3
    • N/A
    • configuration
    • None

    Description

      We would like to implement new 10.4 feature of Streaming Replication.
      It's necessary to change some variable at session scope, so we tried to change the url of the connector jdbc by appending :
      &sessionVariables=wsrep_trx_fragment_unit=rows,wsrep_trx_fragment_size=10000

      Then we had an error ( cf trace at the end ) .
      After several tests, it seems we cannot change any wsrep variables.
      I tried to change another global variable and it worked contrary to any wsrep variable .

      Is it a limitation of the Connector ?
      Is it the correct way to change wsrep_trx_fragment_unit and wsrep_trx_fragment_size at session scope in java ?

      java.sql.SQLSyntaxErrorException: Could not connect to address=(host=10.253.253.78)(port=3306)(type=master) : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows,wsrep_trx_fragment_size=10000' at line 1
      at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:243) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1241) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:610) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:142) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.Driver.connect(Driver.java:86) ~[mariadb-java-client-2.5.3.jar:?]
      at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44) ~[c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908) [c3p0-0.9.5.5.jar:0.9.5.5]
      at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696) [mchange-commons-java-0.2.19.jar:0.2.19]
      Caused by: java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows,wsrep_trx_fragment_size=10000' at line 1
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1599) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1461) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1424) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.additionalData(AbstractConnectProtocol.java:996) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.postConnectionQueries(AbstractConnectProtocol.java:800) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:549) ~[mariadb-java-client-2.5.3.jar:?]
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1236) ~[mariadb-java-client-2.5.3.jar:?]

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            slevieux Levieux stéphane
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.