I'm looking to alter activiti to use utf8mb4 instead of utf8_bin. When running the following sql command:
<sql>ALTER TABLE `activiti`.'ACT_RE_PROCDEF' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;<sql>
I get the following error: Error Code 1071. Specified key was to long; max key length is 767 bytes.
I've done a few things to get this far so heres some background: 1)Run: ALTER DATABASE `activiti` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin; 1) SET FOREIGN_KEY_CHECKS=0; 2) SET innodb_large_prefix=ON
Questions: Is the solution linked a possible option? If so, what are the issues that we may see? Is there anything on your road map that may allow utf8mb4 in the future?
Thank you!
P.S. If you need further details of information just let me know.
It probably means that some of the varchar columns we are using should have less characters, like the RESOURCE_NAME_ column with varchar(4000). We don't have it on the roadmap yet, but if there's a lot of interest in it in the community we can add it.
I was able to fix the issue with the keys not being able to be upgrade by changing from:
SET innodb_large_prefix=ON; to SET GLOBAL innodb_large_prefix=ON; Once I made these changes I was able to manually insert emoji characters into the database using MySQLWorkbench but ran into an issue when I tried to follow the publish process via java code. The issue occurs when trying to parse the data into xml. JDK 1.8 has an issue that cause the emojis to throw a xml parse issue. Here is a link to the exact error / location of the issue in stackoverflow: