| Bug #27668 | FillSchema and Stored Proc with an out parameter | ||
|---|---|---|---|
| Submitted: | 5 Apr 2007 14:44 | Modified: | 3 May 2007 11:23 |
| Reporter: | Guillaume Matte | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | DB 5.0.37 community, Connector : 5.0.6 | OS: | Windows (2000 pro) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | FillSchema, stored procedure | ||
[5 Apr 2007 14:44]
Guillaume Matte
[5 Apr 2007 14:48]
Guillaume Matte
Sorry for the long SQL code, I didn't copy the brief version...
[5 Apr 2007 18:26]
Tonci Grgin
Hi Guillaume and thanks for excellent report. You are right, this should work...
Verified as described:
- MySQL server 5.0.38BK on WinXP Pro SP2 localhost
- latest c/NET 5 sources (SVN) with NET fw 2
Simpler test case:
MySqlConnection conn = new MySqlConnection();
conn.ConnectionString = "DataSource=localhost;Database=test;UserID=root;Password=;PORT=3306";
conn.Open();
MySqlCommand cmdCreateTable = new MySqlCommand("DROP TABLE IF EXISTS Bug27688", conn);
cmdCreateTable.CommandTimeout = 0;
cmdCreateTable.ExecuteNonQuery();
cmdCreateTable.CommandText = "CREATE TABLE Bug27688 (id INT AUTO_INCREMENT, PRIMARY KEY (id)) ";
cmdCreateTable.ExecuteNonQuery();
cmdCreateTable.CommandText = ("drop procedure if exists spTestBug27688");
cmdCreateTable.ExecuteNonQuery();
cmdCreateTable.CommandText = ("CREATE PROCEDURE spTestBug27688 (OUT id INT) " + "BEGIN INSERT INTO Bug27688 VALUES (NULL); SET id=520; END");
cmdCreateTable.ExecuteNonQuery();
MySqlCommand cmd = new MySqlCommand("spTestBug27688", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("?id", MySqlDbType.Int32);
cmd.Parameters[0].Direction = ParameterDirection.Output;
MySqlDataAdapter da = new MySqlDataAdapter(cmd);
DataTable dt = new DataTable();
cmd.ExecuteNonQuery();
da.Fill(dt);
da.FillSchema(dt, SchemaType.Mapped);
Console.ReadLine();
[2 May 2007 15:29]
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/25912
[2 May 2007 15:32]
Reggie Burnett
Fixed in 5.0.7 and 5.1.1
[2 May 2007 21:00]
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/25945
[3 May 2007 11:23]
MC Brown
A note has been added to the 5.0.7 and 5.1.1 changelogs.
