Bug #46939 | Connector/NET generates exception when using Session State Provider | ||
---|---|---|---|
Submitted: | 26 Aug 2009 13:26 | Modified: | 9 Sep 2009 9:50 |
Reporter: | Tony Bedford | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 6.1.1 | OS: | Windows (XP Pro sp3) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
Tags: | Connector/Net, Session State Provider |
[26 Aug 2009 13:26]
Tony Bedford
[26 Aug 2009 14:03]
Tony Bedford
Further info: If I reference a 'dummy' session state variable in Page_Load the code works every time. As long as I reference the session state variable in Page_Load everything seems to be fine. See the following working code. Is this right? Or just my poor understanding? using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TextBox1.Text = "Enter some text"; } Session["Dummy"] = "Dummy string"; } protected void Button1_Click(object sender, EventArgs e) { Session["SessionItem"] = TextBox1.Text; } protected void Button2_Click(object sender, EventArgs e) { TextBox1.Text = ""; } protected void Button3_Click(object sender, EventArgs e) { TextBox1.Text = (string)Session["SessionItem"]; } }
[27 Aug 2009 6:18]
Tonci Grgin
Hi Tony and thanks for your report. Let's us discuss it when you're on-line.
[27 Aug 2009 9:19]
Tony Bedford
Visual Studio Solution file
Attachment: WebSite7_sln.zip (application/x-zip-compressed, text), 2.79 KiB.
[27 Aug 2009 9:19]
Tony Bedford
Project source and config files
Attachment: WebSite7_files.zip (application/x-zip-compressed, text), 3.33 KiB.
[27 Aug 2009 14:56]
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/81745 753 Reggie Burnett 2009-08-27 - fixed some bugs with session state provider (bug #46939) - fixed typo in asp.net config wizard
[27 Aug 2009 14:56]
Reggie Burnett
fixed in 6.1.2
[9 Sep 2009 9:50]
Tony Bedford
An entry has been added to the 6.1.2 changelog: MySQL Connector/NET generated the following exception when using the Session State provider: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MINUTEWHERE SessionId = 'dtmgga55x35oi255nrfrxe45' AND ApplicationId = 1 AND Loc' at line 1 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MINUTEWHERE SessionId = 'dtmgga55x35oi255nrfrxe45' AND ApplicationId = 1 AND Loc' at line 1