[MDEV-14904] Please backport `innodb_default_row_format` to MariaDB 10.1 Created: 2018-01-09 Updated: 2018-09-10 Resolved: 2018-03-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.1.32 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jonas Meurer | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | innodb, regression | ||
| Environment: |
Debian Unstable, Debian Testing and Debian Stable |
||
| Issue Links: |
|
||||||||
| Description |
|
Hi there, MariaDB 10.1 doesn't support `innodb_default_row_format` yet. Since InnoDB in Debian uses `utf8mb4` as default character set since version `10.0.20-2`, this leads to major pain, e.g. due to keys longer than 767 bytes. A lot of applications silently expect the supported maximum size of VARCHAR to be 255 characters which means 1016 bytes with `utf8mb4`. In order to support larger keys, `innodb_large_prefix` needs to be enabled and ROW_FORMAT set to `dynamic`. The former can be configured in the MariaDB server configuration in a persistent way, the latter not due to missing configuration option `innodb_default_row_format`. Backporting `innodb_default_row_format` will at least give the option to server admins to configure MariaDB 10.1 in a way that applications don't break if they want to create keys > 767 bytes. PS: I already discussed this issue with Marko Mäkelä (dr-m) on IRC. |
| Comments |
| Comment by Jonas Meurer [ 2018-01-09 ] | ||
|
This is the related bugreport in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886756 | ||
| Comment by Jonas Meurer [ 2018-03-01 ] | ||
|
Any news on that? @dr-m, do you think that a fix will make it into the next mariadb 10.1 release? | ||
| Comment by Jonas Meurer [ 2018-03-01 ] | ||
|
Any news on that? @dr-m, do you think that a fix will make it into the next mariadb 10.1 release? | ||
| Comment by Marko Mäkelä [ 2018-03-05 ] | ||
|
mejo, sorry, I was busy with the 10.3.5 RC and the https://m18.mariadb.com preparations. As part of this, the parameter innodb_file_format (which was deprecated in MySQL 5.7 and MariaDB 10.2) will lose its meaning: tables can be created in ROW_FORMAT=DYNAMIC despite what this setting says. For maximum compatibility with older versions, the default value of the new parameter would be innodb_default_row_format=compact. In MariaDB 10.2, the default is dynamic. | ||
| Comment by Marko Mäkelä [ 2018-03-05 ] | ||
| Comment by Jonas Meurer [ 2018-03-07 ] | ||
|
Thanks a lot for the backport, @marko! Is there any ETA for the release of 10.1.32? | ||
| Comment by Marko Mäkelä [ 2018-03-07 ] | ||
|
mejo, the next 10.1 release should be in about 3 weeks. I would appreciate it if you can test if a package of the newest 10.1 build works for you and provide feedback. Remember to set the following:
| ||
| Comment by Dagang Wei [ 2018-08-23 ] | ||
|
I'm running a 3rd party application on Debian 9, I have upgraded MariaDB to 10.1.35 and added the properties in /etc/mysql/mariadb.conf.d/50-server.cnf: innodb_file_format = Barracuda but it still fails for "Specified key was too long; max key length is 767 bytes". Because I don't know what the application is doing, is there a simple way for me to verify I have upgraded MariaDB and configured correctly? Thanks in advance! | ||
| Comment by Marko Mäkelä [ 2018-08-24 ] | ||
|
Dagang Wei, if the application is doing CREATE INDEX or ALTER TABLE…ADD INDEX on an existing table, then the ROW_FORMAT of that table would be preserved. If the ROW_FORMAT is REDUNDANT (the old format before MySQL 5.0.3) or COMPACT (the default since MySQL 5.0.3), the limits would apply. You could try rebuilding all tables (ALTER TABLE … ROW_FORMAT=DYNAMIC), or initialize the database from an SQL dump (after ensuring that there are no ROW_FORMAT attributes referring to old formats). | ||
| Comment by Marko Mäkelä [ 2018-08-24 ] | ||
|
Dagang Wei, if the application is doing CREATE INDEX or ALTER TABLE…ADD INDEX on an existing table, then the ROW_FORMAT of that table would be preserved. If the ROW_FORMAT is REDUNDANT (the old format before MySQL 5.0.3) or COMPACT (the default since MySQL 5.0.3), the limits would apply. You could try rebuilding all tables (ALTER TABLE … ROW_FORMAT=DYNAMIC), or initialize the database from an SQL dump (after ensuring that there are no ROW_FORMAT attributes referring to old formats). | ||
| Comment by Marko Mäkelä [ 2018-08-24 ] | ||
|
Note that any ROW_FORMAT returned by SHOW CREATE TABLE will only show what was specified at CREATE TABLE time. Based on InnoDB parameters, InnoDB could choose a different format. SHOW TABLE STATUS should display the format chosen by InnoDB. |