| Bug #28448 | show processlist; returns byte arrays in the resulting data table | ||
|---|---|---|---|
| Submitted: | 15 May 2007 15:10 | Modified: | 6 Jun 2007 10:30 |
| Reporter: | Robert Hood | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 5.1.0 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | byte[], show processlist | ||
[21 May 2007 14:51]
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/27075
[21 May 2007 14:52]
Reggie Burnett
Fixed in 5.0.7 and 5.1.1
[6 Jun 2007 10:30]
MC Brown
A note has been added to the 5.0.7 and 5.1.1 changelogs.

Description: Running the command Show ProcessList; using a MySqlConnection/MySqlCommand returns a data table with byte arrays in some of the columns. MySql.Data version: 5.1.0 MySql Server version: 5.0.41 How to repeat: run this code: using (MySqlConnection conn = new MySqlConnection()) { conn.ConnectionString = "Data Source=xxxxxx;Database=xxxx;uid=xxxx;pwd=xxxx;"; DbCommand cmd = conn.CreateCommand(); cmd.CommandText = "Show Processlist;"; DataTable dt = new DataTable(); conn.Open(); using (DbDataReader rdr = cmd.ExecuteReader()) { dt.Load(rdr); rdr.Close(); } foreach (DataRow row in dt.Rows) { if (Convert.ToInt32(row["Time"]) > 1 && row["Command"].ToString() == "Sleep" && row["Host"].ToString().Contains(txthost.Text)) { cmd.CommandText = "kill " + row["Id"].ToString(); cmd.ExecuteNonQuery(); } } conn.Close(); } put a break point after the datatable dt is loaded.