diff --git a/changelog/14231.txt b/changelog/14231.txt new file mode 100644 index 000000000..d0c261f47 --- /dev/null +++ b/changelog/14231.txt @@ -0,0 +1,3 @@ +```release-note:bug + physical/mysql: Create table with wider `vault_key` column when initializing database tables. +``` diff --git a/physical/mysql/mysql.go b/physical/mysql/mysql.go index bdf5a7c32..29bb3928a 100644 --- a/physical/mysql/mysql.go +++ b/physical/mysql/mysql.go @@ -120,7 +120,7 @@ func NewMySQLBackend(conf map[string]string, logger log.Logger) (physical.Backen // Create the required table if it doesn't exists. if !tableExist { create_query := "CREATE TABLE IF NOT EXISTS " + dbTable + - " (vault_key varbinary(512), vault_value mediumblob, PRIMARY KEY (vault_key))" + " (vault_key varbinary(3072), vault_value mediumblob, PRIMARY KEY (vault_key))" if _, err := db.Exec(create_query); err != nil { return nil, fmt.Errorf("failed to create mysql table: %w", err) }