Re: .Read() causes "Connection unexpectedly terminated"
Posted by: paul c
Date: December 13, 2006 08:56PM

Ok, here's some more information. I ran the MySQL Admin GUI tool and under Server Connections, I see a locked state for the command:
UPDATE products Set disable=1 where id=56566

Which hangs there for awhile then timeouts with "Connection unexpectedly terminated" The outer loop had data reader operation from the product table via select query.

The high level logic is this. Using a data reader, retrieve a rowset of productIDs using a select query and method MySqlHelper.ExecuteReader() Loop through the reader and update a single BIT field in a single row in the same product table for each iteration using method MySqlHelper.ExecuteNonQuery(). This is console app, single threaded and no other process is accessing the database.


Is this valid operation? Doesn't MySql and the version 1.0.8 RC of MySql Connector 1.0 manage table write locks to avoid deadlocks? In my production webserver (Multithreaded), this the type of operation I expect to see and hence the above test. Exampe: you have a user paging through a product catalog on the web generating the select query. And you have a store administrator updating a single product field like pricing.... generating the single row update.

Or is there fundamental bug in Version 1.0.8 RC of MySql Connector 1.0?



Edited 1 time(s). Last edit at 12/14/2006 07:14AM by paul c.

Options: ReplyQuote


Subject
Written By
Posted
Re: .Read() causes "Connection unexpectedly terminated"
December 13, 2006 08:56PM


Sorry, you can't reply to this topic. It has been closed.

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.