mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Limit key size to 3K (#13974)
User is reporting `Error 1071 :Specified key was too long,max key length is 3072 bytes`. Regression caused by #13414
This commit is contained in:
parent
1cf726348f
commit
ebd78e983f
@ -36,8 +36,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
mysqlTableExists = `SELECT 1 FROM %s;`
|
mysqlTableExists = `SELECT 1 FROM %s;`
|
||||||
mysqlCreateNamespaceTable = `CREATE TABLE %s (key_name VARCHAR(4096), value JSON, PRIMARY KEY (key_name))
|
// Some MySQL has a 3072 byte limit on key sizes.
|
||||||
|
mysqlCreateNamespaceTable = `CREATE TABLE %s (key_name VARCHAR(3072), value JSON, PRIMARY KEY (key_name))
|
||||||
CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;`
|
CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;`
|
||||||
mysqlCreateAccessTable = `CREATE TABLE %s (event_time DATETIME NOT NULL, event_data JSON)
|
mysqlCreateAccessTable = `CREATE TABLE %s (event_time DATETIME NOT NULL, event_data JSON)
|
||||||
ROW_FORMAT = Dynamic;`
|
ROW_FORMAT = Dynamic;`
|
||||||
|
Loading…
Reference in New Issue
Block a user