Bug #45502 error if "Allow Batch=False"
| Submitted: | 15 Jun 2009 14:05 | Modified: | 18 Jun 2009 8:59 |
|---|---|---|---|
| Reporter: | Miguel K | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 6.0.4 | OS: | Windows (Server 2008) |
| Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[15 Jun 2009 14:05]
Miguel K
[16 Jun 2009 9:02]
Tonci Grgin
Hi Miguel and thanks for your report.
Verified as described using latest SVN sources from trunk. Exception is thrown in command.cs, Ln:440. 5.2 branch is not affected by this problem.
Test case:
MySqlConnection c = new MySqlConnection();
c.ConnectionString = "DataSource=***;Database=test;UserID=***;Password=***;PORT=***;logging=True;Allow Batch=False";
c.Open();
MySqlCommand cmd = c.CreateCommand();
cmd.CommandText = "SELECT version();";
try
{
MySqlDataReader dr = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
while (dr.Read())
{
Console.WriteLine(dr.GetDataTypeName(0));
Console.WriteLine(dr.GetFieldType(0));
Console.WriteLine(dr.GetValue(0).GetType().FullName);
Console.WriteLine(dr.GetString(0));
}
dr.Close();
cmd.Dispose();
if (c.State == ConnectionState.Closed) {
Console.WriteLine("Conn closed"); }
else {
c.Close();
}
}
catch (Exception ex)
{
Console.Out.WriteLine(DateTime.UtcNow.ToLongTimeString() + " " + "Exception: " + ex.Message);
throw;
}
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET character_set_results=NULL' at line 1"
[16 Jun 2009 16:25]
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/76407
[16 Jun 2009 19:50]
Reggie Burnett
fixed in 6.0.5
[18 Jun 2009 8:59]
Tony Bedford
An entry was added to the 6.0.5 changelog: Adding the Allow Batch=False option to the connection string caused Connector/NET to generate the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET character_set_results=NULL' at line 1
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.