[ 
https://issues.apache.org/jira/browse/QPID-8122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16395092#comment-16395092
 ] 

Rob Godfrey commented on QPID-8122:
-----------------------------------

This table seems like it was designed with the notion of children having 
multiple parents in mind.  Given we removed that capability there seems no 
reason to have parent_type as part of the primary key.  In fact maybe it is 
simply better to remove this table altogether and move the parent_id field to 
whichever table stores the objects themselves.

> [Broker-J] Create JDBC backed virtualhost node fails on MariaDB when database 
> charset is utf8mb4
> ------------------------------------------------------------------------------------------------
>
>                 Key: QPID-8122
>                 URL: https://issues.apache.org/jira/browse/QPID-8122
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>         Environment: 10.0.34-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
>            Reporter: Keith Wall
>            Priority: Major
>
> With MariaDB 10.0.34 on Ubuntu 16.04 defaults its database character set type 
> to {{utf8mb4}}.
> {noformat}
> MariaDB [qpid]> show variables like 'character_set_database';
> +------------------------+--------+
> | Variable_name          | Value  |
> +------------------------+--------+
> | character_set_database | utf8mb4 |
> +------------------------+--------+
> 1 row in set (0.00 sec)
> {noformat}
> If I try and create a JDBC backed VHN, it fails with the following exception:
> {noformat}
> 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)
> {noformat}
> 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:
> {noformat}
> ALTER DATABASE qpid CHARACTER SET latin1{noformat}
> However, this would mean that a characters appearing in configuration items 
> outwith latin1 would be lost.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to