Bug #31930 | Stored procedures with "ambiguous column name" error cause lock-ups | ||
---|---|---|---|
Submitted: | 29 Oct 2007 23:14 | Modified: | 13 Nov 2007 11:30 |
Reporter: | Vasili Sviridov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S1 (Critical) |
Version: | 5.1.3 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[29 Oct 2007 23:14]
Vasili Sviridov
[1 Nov 2007 18:30]
Reggie Burnett
I cannot repeat this with the following test case. Are you sure your proc is not hanging for other reasons. [Test] public void AmbiguousColumns() { execSQL("CREATE TABLE t1 (id INT)"); execSQL("CREATE TABLE t2 (id1 INT, id INT)"); execSQL("CREATE PROCEDURE spTest() BEGIN SELECT id FROM t1 JOIN t2 on t1.id=t2.id; END"); MySqlCommand cmd = new MySqlCommand("spTest", conn); cmd.CommandType = CommandType.StoredProcedure; MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataTable dt = new DataTable(); try { da.Fill(dt); Assert.Fail("The above should have thrown an exception"); } catch (Exception ex) { } }
[1 Nov 2007 18:43]
Vasili Sviridov
Notice that you're trying it with DataTable, whereas my code contains a DataSet. It might make the difference. I'll try to test it on my side again to produce a minimal problematic code.
[5 Nov 2007 18:25]
Vasili Sviridov
I've tested it on my side, and I can confirm that when used with DataTable, errors in the stored procedure are indeed captured and appear on .Net side. But when used with DataSet they follow the behavior originally described. So please re-open this bug and investigate further.
[5 Nov 2007 19:44]
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/37129
[5 Nov 2007 19:47]
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/37132
[5 Nov 2007 19:48]
Reggie Burnett
Fixed in 5.0.9 and 5.1.4
[13 Nov 2007 11:30]
MC Brown
A note has been added to the 5.1.4 and 5.0.9 changelogs: A syntax error in a set of batch statements could leave the data adapter in a state that appears hung.