Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jdschmidt committed Feb 16, 2015
1 parent 3b13e3b commit 5c45624
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/codefutures/tpcc/NewOrder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/codefutures/tpcc/Tpcc.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/codefutures/tpcc/TpccThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c45624

Please sign in to comment.