Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6201

Unknown system variable 'OPTION' [compatibility with MySQL]

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.10
    • None
    • None
    • None
    • CentOS 6.4

    Description

      I've used Rapidanalytics with MySQL and when changed it to MariaDB it throws an error:

      Caused by: java.sql.SQLException: Unknown system variable 'OPTION'
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) [:]
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597) [:]
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529) [:]
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990) [:]
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151) [:]
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619) [:]
              at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1606) [:]
              at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2265) [:]
              at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342) [:6.0.0.Final]
              at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) [:3.6.0.Final]
              at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) [:3.6.0.Final]
              at org.hibernate.loader.Loader.doQuery(Loader.java:802) [:3.6.0.Final]
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) [:3.6.0.Final]
              at org.hibernate.loader.Loader.doList(Loader.java:2533) [:3.6.0.Final]

      It uses mysql-connector-java-5.1.17.

      Doing some digging with Google I found out this link:
      http://www.everybodyhertz.co.uk/mariadb-how-100-compatible-is-it/

      With MySQL:

      SET OPTION SQL_QUOTE_SHOW_CREATE=1;
      /* Affected rows: 0  Found rows: 0  Warnings: 0  Duration for 1 query: 0,203 sec. */

      With MariaDB

      SET OPTION SQL_QUOTE_SHOW_CREATE=1;
      /* SQL Error (1193): Unknown system variable 'OPTION' */
      /* Affected rows: 0  Found rows: 0  Warnings: 0  Duration for 0 of 1 query: 0,000 sec. */

      I've noticed from keywords.test the following

      #
      # OPTION is not anymore a keyword
      #
       
      create table option (option int not null);
      drop table option;
      --error 1193
      set option=1;
      --error 1193
      set option option=1;

      Questions

      • do you plan to support SET OPTION?
      • is there any workaround to work with MariaDB (without digging deep within Rapidanalytics source code)?

      Best regards,
      António Fernandes

      Attachments

        Activity

          People

            Unassigned Unassigned
            ampf Antonio Fernandes
            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.