Sha256: 88fce616e9f80aa588f563a4a77f0ce17a8a902789cfb7cd75698e0328b9f3ca
Contents?: true
Size: 775 Bytes
Versions: 12
Compression:
Stored size: 775 Bytes
Contents
import java.sql.*; import java.io.*; public class LockTest extends PgpoolTest { public final int COUNT = 100; public void do_test() throws SQLException, IOException { PreparedStatement pstmt = null; Statement stmt = null; ResultSet rs = null; try{ for (int i = 0; i < COUNT; i++) { connection.setAutoCommit(false); /* table lock */ stmt = connection.createStatement(); stmt.executeUpdate("LOCK locktest"); pstmt = connection.prepareStatement("SELECT * FROM locktest"); rs = pstmt.executeQuery(); rs.next(); logwriter.println(rs.getInt(1)); rs.close(); connection.commit(); } } finally { if (connection != null) { connection.close(); } } } public String getTestName() { return "lock"; } }
Version data entries
12 entries across 12 versions & 1 rubygems