← Back to team overview

enterprise-support team mailing list archive

[Bug 1733049] [NEW] Blackhole : Specified key was too long; max key length is 1000 bytes

 

Public bug reported:

With innodb_large_prefix=1 blackhole storage engine is incompatible with innodb table definitions,
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/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h
index df10e7d..e265ccf 100644
--- a/storage/blackhole/ha_blackhole.h
+++ b/storage/blackhole/ha_blackhole.h
@@ -66,7 +66,7 @@ public:
   /* The following defines can be increased if necessary */
 #define BLACKHOLE_MAX_KEY      64              /* Max allowed keys */
 #define BLACKHOLE_MAX_KEY_SEG  16              /* Max segments for key */
-#define BLACKHOLE_MAX_KEY_LENGTH 1000
+#define BLACKHOLE_MAX_KEY_LENGTH 10000
   uint max_supported_keys()          const { return BLACKHOLE_MAX_KEY; }
   uint max_supported_key_length()    const { return BLACKHOLE_MAX_KEY_LENGTH; }
   uint max_supported_key_part_length() const { return BLACKHOLE_MAX_KEY_LENGTH; }
[ihanick@dev percona-server]$ cat mysql-test/t/blackhole_max_key_len.test
--source include/have_blackhole.inc
CREATE TABLE t(c varchar(255)) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ENGINE=blackhole;
ALTER TABLE t ADD KEY (c);
DROP TABLE t;[ihanick@dev percona-server]$ cat mysql-test/r/blackhole_max_key_len.result
CREATE TABLE t(c varchar(255)) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ENGINE=blackhole;
ALTER TABLE t ADD KEY (c);
DROP TABLE t;
ihanick@dev percona-server]$ cat mysql-test/r/blackhole_max_key_len.result
CREATE TABLE t(c varchar(255)) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ENGINE=blackhole;
ALTER TABLE t ADD KEY (c);
DROP TABLE t;

** Affects: mysql-server
     Importance: Unknown
         Status: Unknown

** Affects: percona-server
     Importance: Undecided
         Status: Confirmed

** Affects: percona-server/5.5
     Importance: Undecided
         Status: Confirmed

** Affects: percona-server/5.6
     Importance: Undecided
         Status: Confirmed

** Affects: percona-server/5.7
     Importance: Undecided
         Status: Confirmed

** Affects: percona-server/8.0
     Importance: Undecided
         Status: Confirmed


** Tags: i212326 low-hanging-fruit upstream

** Tags added: low-hanging-fruit

** Also affects: percona-server/8.0
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.7
   Importance: Undecided
       Status: Confirmed

** Also affects: percona-server/5.5
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.6
   Importance: Undecided
       Status: New

** Changed in: percona-server/8.0
       Status: New => Confirmed

** Changed in: percona-server/5.6
       Status: New => Confirmed

** Changed in: percona-server/5.5
       Status: New => Confirmed

** Bug watch added: MySQL Bug System #53588
   http://bugs.mysql.com/bug.php?id=53588

** Also affects: mysql-server via
   http://bugs.mysql.com/bug.php?id=53588
   Importance: Unknown
       Status: Unknown

** Tags added: upstream

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1733049

Title:
  Blackhole : Specified key was too long; max key length is 1000 bytes

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1733049/+subscriptions


Follow ups