diff --git a/common/lib/authentication/iam_authentication_plugin.ts b/common/lib/authentication/iam_authentication_plugin.ts index e129514e..d3a128a0 100644 --- a/common/lib/authentication/iam_authentication_plugin.ts +++ b/common/lib/authentication/iam_authentication_plugin.ts @@ -71,7 +71,7 @@ export class IamAuthenticationPlugin extends AbstractConnectionPlugin implements ): Promise { const user = WrapperProperties.USER.get(props); if (!user) { - throw new AwsWrapperError(`${WrapperProperties.USER} is null or empty`); + throw new AwsWrapperError(`${WrapperProperties.USER.name} is null or empty`); } const host = IamAuthUtils.getIamHost(props, hostInfo); diff --git a/mysql/lib/client.ts b/mysql/lib/client.ts index 85d3e496..185a6875 100644 --- a/mysql/lib/client.ts +++ b/mysql/lib/client.ts @@ -577,6 +577,22 @@ class AwsMySQLPooledConnection extends BaseAwsMySQLClient { constructor(config: any, provider: ConnectionProvider) { super(config, provider); } + + async release(): Promise { + return this.pluginManager.execute( + this.pluginService.getCurrentHostInfo(), + this.properties, + "release", + async () => { + if (!this.targetClient) { + throw new UndefinedClientError(); + } + this.pluginService.removeErrorListener(this.targetClient); + return await ClientUtils.queryWithTimeout(this.targetClient.end(), this.properties); + }, + null + ); + } } export type { AwsMySQLPooledConnection };