Mercurial > hg > monetdb-java
annotate tests/Bug_PrepStmt_With_Errors_Jira292.java @ 391:f523727db392
Moved Java classes from packages starting with nl.cwi.monetdb.* to package org.monetdb.*
This naming complies to the Java Package Naming convention as MonetDB's main website is www.monetdb.org.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 12 Nov 2020 22:02:01 +0100 (2020-11-12) |
parents | 54137aeb1f92 |
children | bf9f6b6ecf40 |
rev | line source |
---|---|
347
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
1 /* |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
2 * This Source Code Form is subject to the terms of the Mozilla Public |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
5 * |
350
54137aeb1f92
Update Copyright year.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
347
diff
changeset
|
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. |
347
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
7 */ |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
8 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
9 import java.sql.*; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
10 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
11 public class Bug_PrepStmt_With_Errors_Jira292 { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
12 public static void main(String[] args) throws Exception { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
13 Connection con = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
14 Statement stmt = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
15 PreparedStatement pstmt = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
16 ParameterMetaData pmd = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
17 ResultSet rs = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
18 ResultSetMetaData rsmd = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
19 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
20 try { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
21 con = DriverManager.getConnection(args[0]); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
22 System.out.println("0. true\t" + con.getAutoCommit()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
23 con.setNetworkTimeout(null, (10 *1000)); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
24 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
25 stmt = con.createStatement(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
26 stmt.executeUpdate("drop table if exists abacus;"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
27 stmt.executeUpdate("create table abacus ( \"'Zeitachse'\" date,\"'Abo_ID'\" int,\"'description'\" varchar(256),\"'Klassierungs-Typ'\" clob,\"'KlassierungApplikation'\" clob,\"'EP Netto'\" decimal,\"'Nettoumsatz'\" decimal,\"'validfrom'\" date,\"'validuntil'\" date,\"'Abo_aufgeschaltet'\" int,\"'Abo_deaktiviert'\" int,\"'Differenz'\" decimal,\"'User_ID'\" int,\"'UserName'\" varchar(256),\"'client'\" varchar(256),\"'Installations_ID'\" int,\"'InstallationsName'\" varchar(256),\"'Installationsprovider_ID'\" int,\"'InstallationsproviderName'\" varchar(256),\"'INR'\" bigint,\"'NAME'\" varchar(256),\"'PLZ'\" varchar(256),\"'ORT'\" varchar(256),\"'STAAT'\" varchar(256),\"'Reseller_ID'\" int,\"'ResellerName'\" varchar(256),\"'ET_ABO'\" clob,\"'UserName_1'\" varchar(256),\"'Anzahl_Abos'\" decimal,\"'Anzahl_User'\" decimal,\"'Jahr'\" decimal,\"'Monat'\" decimal,\"'Jahr_Monat'\" clob,\"'IFJ'\" clob,\"'RECNUM$'\" int,\"'InlineCalc_Year_Zeitachse'\" int);"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
28 stmt.executeUpdate("insert into abacus values ('2019-10-30',2239,'description','Klassierungs-Typ','Klassierung-Applikation',73.28,68.29,'2018-01-01','2018-12-01',563,63,56.3,852,'UserName','client',134,'InstallationsName',892,'InstallationsproviderName',9348,'NAME','PLZ','ORT','STAAT',934,'ResellerName','ET_ABO','UserName_1',849.2739,1742.718,395.824,39.824,'Jahr_Monat','IFJ',395824,3789);"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
29 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
30 System.out.println("1. table created and inserted 1 row"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
31 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
32 String qry = "SELECT \"'ResellerName'\" FROM abacus WHERE ( ( (\"'InstallationsproviderName'\"='Bienz Pius Treuhand- und Revisions AG')) AND ( (\"'validuntil'\"='2018-01-01' AND \"'description'\"='ABEA 2' AND (EXTRACT(YEAR FROM \"'Zeitachse'\")*100 + EXTRACT(MONTH FROM \"'Zeitachse'\"))/100.0='2019.010' AND \"'UserName'\"='AL - Astrid Lincke (Delphys)' AND \"'validfrom'\"='2016-12-01')) AND ( (\"'IFJ'\"='ohne IFJ')) AND ( (\"'InlineCalc_Year_Zeitachse'\"='2019'))) GROUP BY \"'ResellerName'\" LIMIT 1001 OFFSET 0;"; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
33 try { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
34 System.out.println("2. before select query execution"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
35 rs = stmt.executeQuery(qry); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
36 System.out.println("2a. select query executed"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
37 if (rs != null) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
38 if (rs.next()) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
39 System.out.println("2b. select query returned: " + rs.getString(1)); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
40 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
41 rs.close(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
42 rs = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
43 System.out.println("2c. closed select query resultset"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
44 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
45 System.out.println("2d. normal end of select query"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
46 } catch (SQLException se) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
47 System.out.println("select query Exception: "+ se.getMessage()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
48 while ((se = se.getNextException()) != null) |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
49 System.out.println("next Exception: "+ se.getMessage()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
50 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
51 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
52 try { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
53 System.out.println("3. before creating a prepared select query"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
54 pstmt = con.prepareStatement(qry); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
55 System.out.println("3a. prepared select query"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
56 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
57 pmd = pstmt.getParameterMetaData(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
58 System.out.println("3b. Prepared Query has " + pmd.getParameterCount() + " parameters."); // "Type of first is: " + pmd.getParameterTypeName(1)); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
59 rsmd = pstmt.getMetaData(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
60 System.out.println("3c. Prepared Query has " + rsmd.getColumnCount() + " columns. Type of first is: " + rsmd.getColumnTypeName(1)); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
61 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
62 System.out.println("3d. before executing the prepared select query"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
63 rs = pstmt.executeQuery(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
64 System.out.println("3e. prepared select query executed"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
65 if (rs != null) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
66 rsmd = rs.getMetaData(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
67 System.out.println("3f. prepared Query ResultSet has " + rsmd.getColumnCount() + " columns. Type of first is: " + rsmd.getColumnTypeName(1)); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
68 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
69 if (rs.next()) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
70 System.out.println("3g. prepared select query returned: " + rs.getString(1)); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
71 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
72 rs.close(); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
73 rs = null; |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
74 System.out.println("3h. closed prepared select query resultset"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
75 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
76 System.out.println("3i. normal end of prepared select query"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
77 } catch (SQLException se) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
78 System.out.println("prepared select query Exception: "+ se.getMessage()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
79 while ((se = se.getNextException()) != null) |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
80 System.out.println("next Exception: "+ se.getMessage()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
81 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
82 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
83 System.out.println("4. drop table"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
84 stmt.executeUpdate("drop table abacus"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
85 |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
86 System.out.println("5. normal end of test"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
87 } catch (SQLException e) { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
88 System.out.println("FAILED :( "+ e.getMessage()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
89 while ((e = e.getNextException()) != null) |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
90 System.out.println("FAILED :( " + e.getMessage()); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
91 System.out.println("ABORTING TEST!!!"); |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
92 } finally { |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
93 if (rs != null) try { rs.close(); } catch (SQLException e) { /* ignore */ } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
94 if (pstmt != null) try { pstmt.close(); } catch (SQLException e) { /* ignore */ } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
95 if (stmt != null) try { stmt.close(); } catch (SQLException e) { /* ignore */ } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
96 if (con != null) try { con.close(); } catch (SQLException e) { /* ignore */ } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
97 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
98 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
99 } |
4e2685f0b7fd
Add JDBC test program to reproduce the hang problem of a failed prepare due to mal error.
Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
parents:
diff
changeset
|
100 |