On Sun, 18 Jan 2009 16:26:58 -0600, mos <mo...@fastmail.fm> wrote: > Walter, > I just re-ran the program this time using my old 5.0 my.ini file > (which worked fine with MySQL 5.0) with MySQL 5.1.30 and the same problem
> occurs, the Next statement loses connection to the MySQL 5.1 server after > a > while if there are a lot of updates in the loop. If the updates are moved > outside of the loop, the program completes without a problem. So it looks > to me that there is some sort of contention for the table, between the > Next > statement of the Select and the Update statement. They are both running on > > the same thread and nothing else is updating the table. You didn't note what language you're using, but I assume it's VB and using ADODB, right? Is your first query running in read-only mode? If not, it should be. Are your tables MyISAM? If changing your 1st query to read-only doesn't work, you can try migrating to InnoDB, which seems to fix issues like yours. Lastly, if you neither of the above solutions works, you can try caching your recordset in memory, closing the 1st query, and then doing all your updates. But I assume you've already done this when you say that executing the updates outside of the loop works OK. Sounds like you're on the right track with your diagnosis so far anyway. > Is there anything I should change in my My.Ini file? I doubt it. Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org