No I am performing the second select Query only. I am including the pseudo code which I am trying to do.
Pseudo code Establish a connection to DB Get statement handler While(conditon) { Prepare a select statement. Bind input variable. Execute the statement. Bind o/p vars. Fetch results. Wait before I update the rows of that table in the DB using a separate session. } Close connection to DB. -----Original Message----- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 11:48 AM To: mysql@lists.mysql.com Subject: Re: Commit needed even after a select statement ?? Sujay Koduri wrote: > hi, > > i am using MysQL4.1.13. I tried doing the following. > > * Open a new session to DB. (Say session 1) > * Using prepared statements provided by C API, issued a select > statement to get some rows from a table. > * This worked absolutely fine. > * I didnt close the session, but still using the same session to issue > the same select statement and get the results again. (while loop) > * Before issuing the second select statement on session 1, I opened a > new session(say session 2) and updated the entries in the table. Did a > commit. > * Now i issued the second select statement on session 1, but still it > is showing the old results. Idealy it should show the new results, > which are a result of updations done using session 2. > > But when i issue a commit after the first select on session 1, and do > the rest as i mentioned above, it is showing all the results properly. > Is this the intended behaviour or do i need to make any configuration > changes or any ?? Are you actually performing a second SELECT query, or are you just fetching the second row from the original SELECT query. The former should show the new results, while I believe the latter will show the old results as it has already performed the query. Jasper -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]