Bug #58757 Unneccessary Substrim+trim in MySqlTokenizer
Submitted: 6 Dec 2010 14:19 Modified: 7 Jan 2011 16:29
Reporter: Simen Endsjø Haugen Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S5 (Performance)
Version: OS:Windows
Assigned to: CPU Architecture:Any

[6 Dec 2010 14:19] Simen Endsjø Haugen
Description:
string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();

Token is not used anywhere. Reflector.Net shows that it's still included in the assembly.

http://bazaar.launchpad.net/%7Emysql-clr-team/connectornet/trunk/annotate/head%3A/MySql.Da...

How to repeat:
http://bazaar.launchpad.net/%7Emysql-clr-team/connectornet/trunk/annotate/head%3A/MySql.Da...
[14 Dec 2010 22:27] 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/126854

855 Reggie Burnett	2010-12-14
      - fixed unnecessary string code in MySqlTokenizer (bug #58757)
[14 Dec 2010 22:56] Reggie Burnett
Fixed in 6.0.8, 6.1.6, 6.2.5, 6.3.6+
[14 Dec 2010 22:56] 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/126856

855 Reggie Burnett	2010-12-14
      - fixed unnecessary string code in MySqlTokenizer (bug #58757)
[7 Jan 2011 16:29] Tony Bedford
An entry has been added to the 6.0.8, 6.1.6, 6.2.5, and 6.3.6 changelogs:

The MySqlTokenizer contained unnecessary Substring and Trim calls:

string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();

The variable token was not used anywhere in the code.