Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Not a Bug
-
Affects Version/s: 10.0.10
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment: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
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
This is 5.6-compatible change.
You need to compare MySQL-5.5 with MariaDB-5.5, or MySQL-5.6 with MariaDB-10.0.
But now you're comparing MySQL-5.5 and MariaDB-10.0. The support for 'SET OPTION' was removed in MySQL-5.6 and we've merged this feature into 10.0. You can downgrade to MariaDB-5.5, where 'SET OPTION' is still supported. And wait for Rapidanalytics to fix their SQL, because 'SET OPTION' was deprecated for many years and now it doesn't work in MySQL-5.6 at all.