From 89ae638d1d3b5a7157d086a9be2468cae764aae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Tue, 7 Aug 2018 00:05:50 +0300 Subject: [PATCH] Fix 'max key length is 767 bytes' errors (Closes: #886756) Allow index keys up to 3072 bytes. Many apps expect VARCAHR(255) to work. Since we introduced UTF-8, that has not been the case. This can be fixed via option 'innodb_default_row_format' that was backported to 10.0.x series recently. The option 'innodb_file_per_table' is 'on' by defautl since MariaDB 5.5, so there is no need to define it. See also https://jira.mariadb.org/browse/MDEV-14904 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848603 https://mariadb.com/kb/en/library/xtradbinnodb-server-system-variables/#innodb_file_format --- debian/additions/mariadb.conf.d/50-server.cnf | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/additions/mariadb.conf.d/50-server.cnf b/debian/additions/mariadb.conf.d/50-server.cnf index ee30148f..0365b364 100644 --- a/debian/additions/mariadb.conf.d/50-server.cnf +++ b/debian/additions/mariadb.conf.d/50-server.cnf @@ -78,12 +78,6 @@ max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = exclude_database_name -# -# * InnoDB -# -# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. -# Read the manual for more InnoDB related options. There are many! - # # * Security Features # @@ -111,6 +105,18 @@ max_binlog_size = 100M character-set-server = utf8mb4 collation-server = utf8mb4_general_ci +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# Allow index key prefixes up to 3072 bytes. If not set, the limit is 767 bytes. +# This is important as utf8mb4 is used. See Debian bug #886756. +innodb_file_format = barracuda +innodb_large_prefix = on +innodb_default_row_format = dynamic + # # * Unix socket authentication plugin is built-in since 10.0.22-6 # -- GitLab