Skip to content

Commit

Permalink
Remove duplicated code.
Browse files Browse the repository at this point in the history
  • Loading branch information
d4mian committed May 29, 2014
1 parent 862affa commit d4c46d8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/java/voldemort/store/mysql/MysqlStorageEngine.java
Expand Up @@ -116,19 +116,7 @@ public ClosableIterator<ByteArray> keys() {

@Override
public void truncate() {
Connection conn = null;
PreparedStatement stmt = null;
String select = "delete from " + getName();
try {
conn = datasource.getConnection();
stmt = conn.prepareStatement(select);
stmt.executeUpdate();
} catch(SQLException e) {
throw new PersistenceFailureException("Fix me!", e);
} finally {
tryClose(stmt);
tryClose(conn);
}
execute("delete from " + getName());
}

@Override
Expand Down

0 comments on commit d4c46d8

Please sign in to comment.