Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
10.0.34-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Description
With MariaDB 10.0.34 on Ubuntu 16.04 defaults its database character set type to utf8mb4.
MariaDB [qpid]> show variables like 'character_set_database'; +------------------------+--------+ | Variable_name | Value | +------------------------+--------+ | character_set_database | utf8mb4 | +------------------------+--------+ 1 row in set (0.00 sec)
If I try and create a JDBC backed VHN, it fails with the following exception:
2018-03-09 13:22:58,067 ERROR [Broker-Config] (o.a.q.s.u.ServerScopedRuntimeException) - Unable to open configuration tables java.sql.SQLSyntaxErrorException: (conn=173) Specified key was too long; max key length is 767 bytes at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:177) at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:110) at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:228) at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:334) at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:386) at com.jolbox.bonecp.StatementHandle.execute(StatementHandle.java:300) at org.apache.qpid.server.store.jdbc.AbstractJDBCConfigurationStore.createConfiguredObjectHierarchyTable(AbstractJDBCConfigurationStore.java:497) at org.apache.qpid.server.store.jdbc.AbstractJDBCConfigurationStore.createOrOpenConfigurationStoreDatabase(AbstractJDBCConfigurationStore.java:448)
The primary key length of the QPID_CONFIGURED_OBJECT_HIERARCHY is too long in this character set mode.
It seems other MariaDB packages on other distributions default to latin1 which does not face this problem. Switching to latin1 like so is a workaround:
ALTER DATABASE qpid CHARACTER SET latin1
However, this would mean that a characters appearing in configuration items outwith latin1 would be lost.