You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log.Info("Session{0} canceling CommandId {1} from Session{2}; CommandText: {3}",m_logArguments[0],commandToCancel.CommandId,killCommand.Connection!.Session.Id,(commandToCancelasMySqlCommand)?.CommandText);
117
117
lock(m_lock)
118
118
{
119
119
if(ActiveCommandId!=commandToCancel.CommandId)
120
+
{
121
+
Log.Info("Session{0} ActiveCommandId {1} is not the CommandId {2} being canceled; ignoring cancellation.",m_logArguments[0],ActiveCommandId,commandToCancel.CommandId);
120
122
return;
123
+
}
121
124
122
125
// NOTE: This command is executed while holding the lock to prevent race conditions during asynchronous cancellation.
123
126
// For example, if the lock weren't held, the current command could finish and the other thread could set ActiveCommandId
124
127
// to zero, then start executing a new command. By the time this "KILL QUERY" command reached the server, the wrong
125
128
// command would be killed (because "KILL QUERY" specifies the connection whose command should be killed, not
126
129
// a unique identifier of the command itself). As a mitigation, we set the CommandTimeout to a low value to avoid
127
130
// blocking the other thread for an extended duration.
131
+
Log.Info("Session{0} canceling CommandId {1} with CommandText {2}",killCommand.Connection!.Session.Id,commandToCancel.CommandId,killCommand.CommandText);
0 commit comments