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 feca115ef4
commit 075048ad27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

View File

@ -22,7 +22,7 @@ func main() {
// Run instantiates a RedShift object, and runs the RPC server for the plugin
func Run(apiTLSConfig *api.TLSConfig) error {
dbType, err := redshift.New(true)()
dbType, err := redshift.New()
if err != nil {
return err
}