Fix compilation of MySQL & Redshift plugins (#10640)

This commit is contained in:
Michael Golowka
2021-01-04 13:44:11 -07:00
committed by GitHub
parent 702929e881
commit 2a8f9632d3
3 changed files with 4 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ func main() {
// Run instantiates a MySQL object, and runs the RPC server for the plugin
func Run() error {
var f func() (interface{}, error)
f = mysql.New(false)
f = mysql.New(mysql.MetadataLen, mysql.MetadataLen, mysql.UsernameLen)
dbType, err := f()
if err != nil {
return err

View File

@@ -6,6 +6,7 @@ import (
"github.com/hashicorp/vault/plugins/database/mysql"
dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5"
"github.com/hashicorp/vault/sdk/database/helper/credsutil"
)
func main() {
@@ -19,7 +20,7 @@ func main() {
// Run instantiates a MySQL object, and runs the RPC server for the plugin
func Run() error {
var f func() (interface{}, error)
f = mysql.New(true)
f = mysql.New(credsutil.NoneLength, mysql.LegacyMetadataLen, mysql.LegacyUsernameLen)
dbType, err := f()
if err != nil {
return err