[MDEV-24017] BLACKHOLE index limited to 1000 bytes: "Specified key was too long; max key length is 1000 bytes" Created: 2020-10-23 Updated: 2020-10-24 Resolved: 2020-10-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.1.48, 10.2.35, 10.3.26, 10.4.16, 10.5.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jaime Crespo | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | blackhole,index,key,length | ||
| Description |
|
(filed under Storage Engine - InnoDB because there is no component "Storage Engine - Blackhole", but it affects InnoDB compatibility) Previous versions of InnoDB had a max index length of <1KB. Most modern versions of MariaDB increase that to 3KB+ (the innodb_large_prefix option). Blackhole, while it is not an engine enabled by default on MariaDB, it is still shipped with it, and may have some limited usage for which it would be useful, even if can create many issues. One of the usages is to replicate to a separate server but ignore all data. However, there is a big compatibility issue between InnoDB and blackhole, and that is that indexes on Blackhole cannot be larger than 1KB. max index length for Blackwhole is an arbitrary constant (https://github.com/MariaDB/server/blob/10.6/storage/blackhole/ha_blackhole.h#L70 ), and increasing it is very simple (no complex data to manage), but Oracle MySQL ignored the upstream bug report: https://bugs.mysql.com/bug.php?id=53588 |
| Comments |
| Comment by Daniel Black [ 2020-10-24 ] |
|
Sure, seems easy. 10.5 still exposes 3500 with the comment: For page sizes = 16k, InnoDB historically reported 3500 bytes here, Changing MAX_KEY also in the patch seems easy enough as this defaults to the current 64, though is compile time configurable to 127/8. Testing https://github.com/MariaDB/server/commit/4fa6638031d968c955f224bf1d71ea1e80648ecf |
| Comment by Daniel Black [ 2020-10-24 ] |
|
pushed. Thanks for the bug report. |
| Comment by Manuel Arostegui [ 2020-10-24 ] |
|
That was fast! Thank you very much! |