File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -35,24 +35,24 @@ protected override void OnCommit(Enlistment enlistment)
3535
3636 protected override void OnRollback ( Enlistment enlistment )
3737 {
38- ExecuteXaCommand ( "END" ) ;
39- ExecuteXaCommand ( "ROLLBACK" ) ;
40- }
41-
42- private void ExecuteXaCommand ( string statement )
43- {
44- using var cmd = Connection . CreateCommand ( ) ;
45- cmd . CommandText = "XA " + statement + " " + m_xid ;
4638 try
4739 {
48- cmd . ExecuteNonQuery ( ) ;
40+ ExecuteXaCommand ( "END" ) ;
41+ ExecuteXaCommand ( "ROLLBACK" ) ;
4942 }
5043 catch ( MySqlException ex ) when ( ex . ErrorCode is MySqlErrorCode . XARBDeadlock )
5144 {
5245 // ignore deadlock when rolling back
5346 }
5447 }
5548
49+ private void ExecuteXaCommand ( string statement )
50+ {
51+ using var cmd = Connection . CreateCommand ( ) ;
52+ cmd . CommandText = "XA " + statement + " " + m_xid ;
53+ cmd . ExecuteNonQuery ( ) ;
54+ }
55+
5656 private static int s_currentId ;
5757
5858 private string ? m_xid ;
You can’t perform that action at this time.
0 commit comments