Bug #51610 | Exception thrown inside Connector.NET | ||
---|---|---|---|
Submitted: | 1 Mar 2010 15:52 | Modified: | 4 Mar 2010 16:31 |
Reporter: | Anker Berg-Sonne | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 6.2.2 | OS: | Windows (XP SP2) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
Tags: | Connector/Net, exception |
[1 Mar 2010 15:52]
Anker Berg-Sonne
[2 Mar 2010 18:37]
Anker Berg-Sonne
Here's another query that throws the same exception. insert into `hourmatch` SELECT `p`.`ClientID`,`p`.`NodeID`,`h`.`Date`,`h`.`time`,`p`.`SenTrolID`,sqrt(avg(pow(`p`.`Average`-`h`.`Average`,2))) FROM `patternmembers` `p` join `hourscaled` `h` on `p`.`ClientID`=`h`.`ClientID` and `p`.`NodeID`=`h`.`NodeID` and `h`.`Time`=`p`.`Hour` and `p`.`SenTrolID`=`h`.`SenTrolID` group by `p`.`NodeID`, `PatternID`, `Date`, `Time` I wonder what I am doing that's causing me to see these. Hmmmm.
[3 Mar 2010 18:20]
Tonci Grgin
Hi Anker and thanks for your report. To put your mind at ease, I see the same exception thrown. I'm just in no shape to deal with it now so I'll continue tomorrow.
[3 Mar 2010 18:28]
Brian Evans
Simplified cases: These 2 throw exceptions SELECT 'ABC', (0/`QOH`) from (SELECT 1 as `QOH`) `d1`; SELECT 'ABC', (0-`QOH`) from (SELECT 1 as `QOH`) `d1`; These do not SELECT 'ABC', (0+`QOH`) from (SELECT 1 as `QOH`) `d1` SELECT 'ABC', (0*`QOH`) from (SELECT 1 as `QOH`) `d1` SELECT 'ABC', (0/QOH) from (SELECT 1 as `QOH`) `d1` SELECT 'ABC', (0-QOH) from (SELECT 1 as `QOH`) `d1` Seems to relate to the quoting check on "`" and division and subtraction
[3 Mar 2010 18:38]
Tonci Grgin
Verified as described with first query, code breaks in MySqlTokenizer.cs, LN136 even though all demands seems to be met: string token = sql.Substring(startIndex, stopIndex - startIndex).Trim(); 695 706 695 sql.Length 705 int
[3 Mar 2010 23:36]
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/102243 798 Reggie Burnett 2010-03-03 - fixed parsing bug that was caused by special characters being jammed up beside a quoted identifier (bug #51610)
[3 Mar 2010 23:38]
Reggie Burnett
fixed in 6.0.6, 6.1.4, 6.2.3, and 6.3.2+
[4 Mar 2010 0:25]
Anker Berg-Sonne
Thanks guys, that was terrific! Anker
[4 Mar 2010 16:31]
Tony Bedford
An entry has been added to the 6.0.6, 6.1.4, 6.2.3, 6.3.2 changelogs: When calling ExecuteNonQuery on a command object, the following exception occurred: Index and length must refer to a location within the string. Parameter name: length
[8 Mar 2010 15:08]
Tonci Grgin
Reggie, please extend the fix to cover for Bug#51788 too.
[30 Mar 2010 5:29]
Tonci Grgin
Bug#52408 is closed as duplicate of this report.