Bug #34460 Connections doesn't close
| Submitted: | 11 Feb 2008 14:16 | Modified: | 1 Mar 2008 11:01 |
|---|---|---|---|
| Reporter: | Martin W | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 5.1.3-5.2 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Close Connection, pooling | ||
[1 Mar 2008 0:10]
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/43248
[1 Mar 2008 0:11]
Reggie Burnett
Fixed in 5.1.6 and 5.2.2
[1 Mar 2008 11:01]
MC Brown
A note has been added to the 5.1.6 and 5.2.2 changelogs: When using SqlDataSource to open a connection, the connection would not automatically be closed when access had completed.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: I'm using Connector/Net togheter with asp.net 2.0. I have problems with that my connections doesn't close. For each time I reload my page I get a new connection that doesn't close until max_user_connections is reached. I use this code: <asp:SqlDataSource ID="DS_processlist" runat="server" DataSourceMode="DataReader" ConnectionString="Data Source=**;Database=**;User ID=**;Password=**;Pooling=false" ProviderName="MySql.Data.MySqlClient" SelectCommand="show processlist"></asp:SqlDataSource> <asp:DataGrid ID="DG" runat="server" DataSourceID="DS_processlist" AutoGenerateColumns="true"></asp:DataGrid> When I bind my data in codebehind by myself and closes the connection myself everything works perfect and my connections is closed: MySqlConnection conn = new MySqlConnection("Data Source=**;Database=**;User ID=**;Password=**;Pooling=false"); cmd = new MySqlCommand("show processlist", conn); cmd.Connection.Open(); dr = cmd.ExecuteReader(); DG.DataSource = dr; DG.DataBind(); cmd.Connection.Close(); I've tried both with Pooling enabled and disabled, nothing seems to help. Please check this out! How to repeat: This doesn't work: <asp:SqlDataSource ID="DS_processlist" runat="server" DataSourceMode="DataReader" ConnectionString="Data Source=**;Database=**;User ID=**;Password=**;Pooling=false" ProviderName="MySql.Data.MySqlClient" SelectCommand="show processlist"></asp:SqlDataSource> <asp:DataGrid ID="DG" runat="server" DataSourceID="DS_processlist" AutoGenerateColumns="true"></asp:DataGrid> But this works: MySqlConnection conn = new MySqlConnection("Data Source=**;Database=**;User ID=**;Password=**;Pooling=false"); cmd = new MySqlCommand("show processlist", conn); cmd.Connection.Open(); dr = cmd.ExecuteReader(); DG.DataSource = dr; DG.DataBind(); cmd.Connection.Close();