@@ -90,13 +90,13 @@ public bool TryStartCancel(MySqlCommand command)
90
90
m_state = State . CancelingQuery ;
91
91
}
92
92
93
- Log . Info ( "Session{0} will cancel CommandId {1} (CancelledAttempts={2}) CommandText: {3}" , m_logArguments [ 0 ] , command . CommandId , command . CancelAttemptCount , command . CommandText ) ;
93
+ Log . Info ( "Session{0} will cancel CommandId: {1} (CancelledAttempts={2}) CommandText: {3}" , m_logArguments [ 0 ] , command . CommandId , command . CancelAttemptCount , command . CommandText ) ;
94
94
return true ;
95
95
}
96
96
97
97
public void DoCancel ( MySqlCommand commandToCancel , MySqlCommand killCommand )
98
98
{
99
- Log . Info ( "Session{0} canceling CommandId {1}: CommandText {2}" , m_logArguments [ 0 ] , commandToCancel . CommandId , commandToCancel . CommandText ) ;
99
+ Log . Info ( "Session{0} canceling CommandId {1}: CommandText: {2}" , m_logArguments [ 0 ] , commandToCancel . CommandId , commandToCancel . CommandText ) ;
100
100
lock ( m_lock )
101
101
{
102
102
if ( m_activeCommandId != commandToCancel . CommandId )
@@ -129,7 +129,7 @@ public void StartQuerying(MySqlCommand command)
129
129
if ( m_state == State . Querying || m_state == State . CancelingQuery )
130
130
{
131
131
m_logArguments [ 1 ] = m_state ;
132
- Log . Error ( "Session{0} can't execute new command when in CommandState {1}: CommandText: {2}" , m_logArguments [ 0 ] , m_state , command . CommandText ) ;
132
+ Log . Error ( "Session{0} can't execute new command when in SessionState: {1}: CommandText: {2}" , m_logArguments [ 0 ] , m_state , command . CommandText ) ;
133
133
throw new InvalidOperationException ( "There is already an open DataReader associated with this Connection which must be closed first." ) ;
134
134
}
135
135
@@ -143,7 +143,7 @@ public void StartQuerying(MySqlCommand command)
143
143
public void FinishQuerying ( )
144
144
{
145
145
m_logArguments [ 1 ] = m_state ;
146
- Log . Debug ( "Session{0} entering FinishQuerying; CommandState = {1}" , m_logArguments ) ;
146
+ Log . Debug ( "Session{0} entering FinishQuerying; SessionState = {1}" , m_logArguments ) ;
147
147
bool clearConnection = false ;
148
148
lock ( m_lock )
149
149
{
@@ -159,7 +159,7 @@ public void FinishQuerying()
159
159
// KILL QUERY will kill a subsequent query if the command it was intended to cancel has already completed.
160
160
// In order to handle this case, we issue a dummy query that will consume the pending cancellation.
161
161
// See https://bugs.mysql.com/bug.php?id=45679
162
- Log . Info ( "Session{0} sending 'DO SLEEP(0)' command to clear pending cancellation" , m_logArguments [ 0 ] ) ;
162
+ Log . Info ( "Session{0} sending 'DO SLEEP(0)' command to clear pending cancellation" , m_logArguments ) ;
163
163
var payload = QueryPayload . Create ( "DO SLEEP(0);" ) ;
164
164
SendAsync ( payload , IOBehavior . Synchronous , CancellationToken . None ) . GetAwaiter ( ) . GetResult ( ) ;
165
165
payload = ReceiveReplyAsync ( IOBehavior . Synchronous , CancellationToken . None ) . GetAwaiter ( ) . GetResult ( ) ;
@@ -266,10 +266,10 @@ public async Task ConnectAsync(ConnectionSettings cs, ILoadBalancer loadBalancer
266
266
else
267
267
authPluginName = ( initialHandshake . ProtocolCapabilities & ProtocolCapabilities . SecureConnection ) == 0 ? "mysql_old_password" : "mysql_native_password" ;
268
268
m_logArguments [ 1 ] = authPluginName ;
269
- Log . Debug ( "Session{0} server sent auth_plugin_name ' {1}' " , m_logArguments ) ;
269
+ Log . Debug ( "Session{0} server sent AuthPluginName= {1}" , m_logArguments ) ;
270
270
if ( authPluginName != "mysql_native_password" && authPluginName != "sha256_password" && authPluginName != "caching_sha2_password" )
271
271
{
272
- Log . Error ( "Session{0} unsupported authentication method auth_plugin_name' {1}' " , m_logArguments ) ;
272
+ Log . Error ( "Session{0} unsupported authentication method AuthPluginName= {1}" , m_logArguments ) ;
273
273
throw new NotSupportedException ( "Authentication method '{0}' is not supported." . FormatInvariant ( initialHandshake . AuthPluginName ) ) ;
274
274
}
275
275
@@ -442,7 +442,7 @@ private async Task<PayloadData> SwitchAuthenticationAsync(ConnectionSettings cs,
442
442
if ( ! m_isSecureConnection && cs . Password . Length > 1 )
443
443
{
444
444
#if NET45
445
- Log . Error ( "Session{0} can't use AuthenticationMethod {1} without secure connection on .NET 4.5" , m_logArguments ) ;
445
+ Log . Error ( "Session{0} can't use AuthenticationMethod ' {1}' without secure connection on .NET 4.5" , m_logArguments ) ;
446
446
throw new MySqlException ( "Authentication method '{0}' requires a secure connection (prior to .NET 4.6)." . FormatInvariant ( switchRequest . Name ) ) ;
447
447
#else
448
448
var publicKey = await GetRsaPublicKeyAsync ( switchRequest . Name , cs , ioBehavior , cancellationToken ) . ConfigureAwait ( false ) ;
0 commit comments