|
|
@ -19,8 +19,11 @@ namespace FLocal.MySQLConnector { |
|
|
|
public Transaction(Connection connection, System.Data.IsolationLevel iso) : base() { |
|
|
|
public Transaction(Connection connection, System.Data.IsolationLevel iso) : base() { |
|
|
|
this.sqlconnection = connection.createConnection(); |
|
|
|
this.sqlconnection = connection.createConnection(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
//for some reason, call to BeginTransaction with IsolationLevel set fails somewhere deep in mysql library |
|
|
|
if(connection.traits.supportsIsolationLevel()) { |
|
|
|
this.sqltransaction = this.sqlconnection.BeginTransaction(); |
|
|
|
this.sqltransaction = this.sqlconnection.BeginTransaction(iso); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.sqltransaction = this.sqlconnection.BeginTransaction(); |
|
|
|
|
|
|
|
} |
|
|
|
} catch(Exception e) { |
|
|
|
} catch(Exception e) { |
|
|
|
this.close(); |
|
|
|
this.close(); |
|
|
|
throw e; |
|
|
|
throw e; |
|
|
|