Sha256: 8c5348128cf3abc8870125aed4deea28988e79cfd877a4d2b65e7a0ed7a63f7b
Contents?: true
Size: 685 Bytes
Versions: 12
Compression:
Stored size: 685 Bytes
Contents
import java.sql.*; public class UpdateTest extends PgpoolTest { public void do_test() throws SQLException { int N = 100; try { ResultSet rs; Statement stmt = null; for (int i = 0; i < N; i++) { connection.setAutoCommit(false); stmt = connection.createStatement(); stmt.executeUpdate("UPDATE up SET a = a + 1" ); stmt.close(); connection.commit(); } connection.setAutoCommit(true); stmt = connection.createStatement(); rs = stmt.executeQuery("SELECT max(a) FROM up" ); rs.next(); logwriter.println(rs.getInt(1)); } finally { connection.close(); } } public String getTestName() { return "update"; } }
Version data entries
12 entries across 12 versions & 1 rubygems