diff --git a/src/main/java/com/codefutures/tpcc/NewOrder.java b/src/main/java/com/codefutures/tpcc/NewOrder.java index ce82be0..26a4072 100644 --- a/src/main/java/com/codefutures/tpcc/NewOrder.java +++ b/src/main/java/com/codefutures/tpcc/NewOrder.java @@ -195,6 +195,8 @@ public int neword(int t_num, /* thread number (not used) */ logger.error("SELECT c_discount, c_last, c_credit FROM customer WHERE c_w_id = " + w_id + " AND c_d_id = " + d_id + " AND c_id = " + c_id, e); throw new Exception("NewOrder (join = false) select transaction error", e); } + } else { + logger.error("joins is empty or null"); } //Get prepared statement //"SELECT d_next_o_id, d_tax FROM district WHERE d_id = ? AND d_w_id = ? FOR UPDATE" diff --git a/src/main/java/com/codefutures/tpcc/Tpcc.java b/src/main/java/com/codefutures/tpcc/Tpcc.java index 5c9bfe8..4654ffe 100644 --- a/src/main/java/com/codefutures/tpcc/Tpcc.java +++ b/src/main/java/com/codefutures/tpcc/Tpcc.java @@ -41,7 +41,7 @@ public class Tpcc implements TpccConstants { private String jdbcUrl; private String dbUser; private String dbPassword; - private Boolean joins = true; + private static Boolean joins; private int numWare; @@ -162,7 +162,7 @@ private int runBenchmark(boolean overridePropertiesFile, String[] argv) { System.out.println("-j [java driver]"); System.out.println("-l [jdbc url]"); System.out.println("-h [jdbc fetch size]"); - System.out.println("-J [Joins (true|false) default=true]"); + System.out.println("-J [joins (true|false)]"); System.exit(-1); } diff --git a/src/main/java/com/codefutures/tpcc/TpccThread.java b/src/main/java/com/codefutures/tpcc/TpccThread.java index 3590f11..f9f7707 100644 --- a/src/main/java/com/codefutures/tpcc/TpccThread.java +++ b/src/main/java/com/codefutures/tpcc/TpccThread.java @@ -140,6 +140,7 @@ private Connection connectToDatabase() { prop.put("user", db_user); prop.put("password", db_password); + conn = DriverManager.getConnection(jdbcUrl, prop); conn.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ); conn.setAutoCommit(false);