| Bug #22042 | mysql-connector-net-5.0.0-alpha BeginTransaction | ||
|---|---|---|---|
| Submitted: | 6 Sep 2006 5:34 | Modified: | 16 Oct 2006 17:27 |
| Reporter: | Felix Albani | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | 5.0.0 | OS: | W32 |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | BeginTransaction | ||
[11 Sep 2006 19:02]
Tonci Grgin
Hi Felix and thanks for your problem report. I was able to verify it with code provided. I will just note here that MySqlConnection conn = new MySqlConnection(); works as expected.
[15 Sep 2006 3:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/11989
[15 Sep 2006 3:47]
Reggie Burnett
Will be in 5.0.1
[16 Oct 2006 17:27]
MC Brown
A note has been added to the 5.0.1 changelog.

Description: When using the mysql-connector-net-5.0.0-alpha I run into the folowing error when trying to begin a transaction without specifying the isolation level: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 How to repeat: DbProviderFactory factory = new MySql.Data.MySqlClient.MySqlClientFactory(); DbConnection conexion = factory.CreateConnection(); conexion.ConnectionString = "server=localhost;user id=root; password=; database=seguridad"; conexion.Open(); DbTransaction trans = conexion.BeginTransaction(); trans.Rollback(); conexion.Close(); Suggested fix: The fix was done in the return statement in line 3 of BeginDbTransaction: 1: protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) 2: { 3: return (isolationLevel != IsolationLevel.Unspecified) ? BeginTransaction(isolationLevel) : BeginTransaction(); 4: }