Bug #15901 ResultSet can't reflect the update of mysql server.
Submitted: 21 Dec 2005 3:16 Modified: 21 Nov 2013 7:22
Reporter: Jon Wang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.1.11 OS:Linux (Red Hat Linux)
Assigned to: Alexander Soklakov CPU Architecture:Any

[21 Dec 2005 3:16] Jon Wang
Description:
OS  system :
Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
Kernel 2.6.9-11.EL on an ia64
Mysql Server: 
OS embedded -- Server version	4.1.10a 
Web Server:
Tomcat 4.1.27 + hibernate + mysql-connector-java-3.1.11-bin.jar

The problem is :
One table in mysql database is read by servlet and shown in JSP pages.
Case I. 
1. If the tomcat starts up , the table data is correctly shown by JSP.
2. and then ,If the table data is changed by mysql manual commands ( like 
insert ,update or delete )  .  
3. Reopen the JSP page , the result is as before without any modification.

Case II. a little different from Case I.
 1.Restart tomcat . and this time NOT visiting the JSP pages which shown the 
   target table. Just opening another JSP page to show another table in the 
   same schema(database).
 2.    and then ,If the table data is changed by mysql manual commands ( like 
insert ,update or delete )  .  
3. Open the just JSP pages to show the target table , the result of target table  
is as before without any modification.    

	

How to repeat:
session=sessions.openSession();
statement=session.connection().createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_READ_ONLY);
StringBuffer sql=new StringBuffer();
sql.append(" select * from channels ");
try{
ResultSet rt=statement.executeQuery(sql.toString());
}
[21 Dec 2005 9:50] Aleksey Kishkin
Jon, we do not maintain tomcat. When I try to reproduce it in the mysql console client, I got proper results. Could you please illustrate the bug you found in the mysql console client or in simple standalone java program? (not in tomcat environment)
[22 Jan 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[21 Nov 2013 7:22] Alexander Soklakov
There is no feedback for very long time and the behavior isn't related to c/J.