Blackhole : Specified key was too long; max key length is 1000 bytes
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Fix Released
|
High
|
Vlad Lesin | |||
5.6 |
Fix Released
|
High
|
Vlad Lesin | |||
5.7 |
Fix Released
|
High
|
Vlad Lesin |
Bug Description
With innodb_
thus adding new indexes breaking slave.
mysqltest: At line 3: query 'ALTER TABLE t ADD KEY (c)' failed: 1071: Specified key was too long; max key length is 1000 bytes
ihanick@dev percona-server]$ git diff
diff --git a/storage/
index df10e7d..e265ccf 100644
--- a/storage/
+++ b/storage/
@@ -66,7 +66,7 @@ public:
/* The following defines can be increased if necessary */
#define BLACKHOLE_MAX_KEY 64 /* Max allowed keys */
#define BLACKHOLE_
-#define BLACKHOLE_
+#define BLACKHOLE_
uint max_supported_
uint max_supported_
uint max_supported_
[ihanick@dev percona-server]$ cat mysql-test/
--source include/
CREATE TABLE t(c varchar(255)) DEFAULT CHARSET=utf8mb4 COLLATE=
ALTER TABLE t ADD KEY (c);
DROP TABLE t;[ihanick@dev percona-server]$ cat mysql-test/
CREATE TABLE t(c varchar(255)) DEFAULT CHARSET=utf8mb4 COLLATE=
ALTER TABLE t ADD KEY (c);
DROP TABLE t;
ihanick@dev percona-server]$ cat mysql-test/
CREATE TABLE t(c varchar(255)) DEFAULT CHARSET=utf8mb4 COLLATE=
ALTER TABLE t ADD KEY (c);
DROP TABLE t;
tags: | added: low-hanging-fruit |
tags: | added: upstream |
tags: | added: contribution |
no longer affects: | percona-server/8.0 |
The maximum innodb key length is 3500 what is hardcoded in ha_innobase: :max_supported_ key_length( )).
The maximum number of innodb indexes is configured with MAX_INDEXES macro (see also MAX_KEY definition).
The same is implemented for blackhole now.
https:/ /github. com/vlad- lesin/percona- server/ tree/blackhole- max-key- length- 5.5-gca /github. com/vlad- lesin/percona- server/ tree/blackhole- max-key- length- 5.6-gca /github. com/vlad- lesin/percona- server/ tree/blackhole- max-key- length- 5.7-gca
https:/
https:/