@@ -19,7 +19,7 @@ public sealed class MySqlDataSource : DbDataSource
1919 /// <param name="connectionString">The connection string for the MySQL Server. This parameter is required.</param>
2020 /// <exception cref="ArgumentNullException">Thrown if <paramref name="connectionString"/> is <c>null</c>.</exception>
2121 public MySqlDataSource ( string connectionString )
22- : this ( connectionString ?? throw new ArgumentNullException ( nameof ( connectionString ) ) , MySqlConnectorLoggingConfiguration . NullConfiguration , null , null , null , null , default , default , default )
22+ : this ( connectionString ?? throw new ArgumentNullException ( nameof ( connectionString ) ) , MySqlConnectorLoggingConfiguration . NullConfiguration , null , null , null , null , default , default , default , default )
2323 {
2424 }
2525
@@ -31,7 +31,8 @@ internal MySqlDataSource(string connectionString,
3131 Func < MySqlProvidePasswordContext , CancellationToken , ValueTask < string > > ? periodicPasswordProvider ,
3232 TimeSpan periodicPasswordProviderSuccessRefreshInterval ,
3333 TimeSpan periodicPasswordProviderFailureRefreshInterval ,
34- ZstandardPlugin ? zstandardPlugin )
34+ ZstandardPlugin ? zstandardPlugin ,
35+ MySqlConnectionOpenedCallback ? connectionOpenedCallback )
3536 {
3637 m_connectionString = connectionString ;
3738 LoggingConfiguration = loggingConfiguration ;
@@ -40,6 +41,7 @@ internal MySqlDataSource(string connectionString,
4041 m_remoteCertificateValidationCallback = remoteCertificateValidationCallback ;
4142 m_logger = loggingConfiguration . DataSourceLogger ;
4243 m_zstandardPlugin = zstandardPlugin ;
44+ m_connectionOpenedCallback = connectionOpenedCallback ;
4345
4446 Pool = ConnectionPool . CreatePool ( m_connectionString , LoggingConfiguration , name ) ;
4547 m_id = Interlocked . Increment ( ref s_lastId ) ;
@@ -142,6 +144,7 @@ protected override DbConnection CreateDbConnection()
142144 ProvideClientCertificatesCallback = m_clientCertificatesCallback ,
143145 ProvidePasswordCallback = m_providePasswordCallback ,
144146 RemoteCertificateValidationCallback = m_remoteCertificateValidationCallback ,
147+ ConnectionOpenedCallback = m_connectionOpenedCallback ,
145148 } ;
146149 }
147150
@@ -225,6 +228,7 @@ private string ProvidePasswordFromInitialRefreshTask(MySqlProvidePasswordContext
225228 private readonly TimeSpan m_periodicPasswordProviderSuccessRefreshInterval ;
226229 private readonly TimeSpan m_periodicPasswordProviderFailureRefreshInterval ;
227230 private readonly ZstandardPlugin ? m_zstandardPlugin ;
231+ private readonly MySqlConnectionOpenedCallback ? m_connectionOpenedCallback ;
228232 private readonly MySqlProvidePasswordContext ? m_providePasswordContext ;
229233 private readonly CancellationTokenSource ? m_passwordProviderTimerCancellationTokenSource ;
230234 private readonly Timer ? m_passwordProviderTimer ;
0 commit comments