bug fixed for sql parser && enhance mock driver

This commit is contained in:
温少
2012-03-31 22:44:05 +08:00
parent ffcd1cae4a
commit 8a6bd52078
7 changed files with 126 additions and 31 deletions
@@ -127,7 +127,11 @@ public class MockStatement implements Statement {
@Override
public int executeUpdate(String sql) throws SQLException {
checkOpen();
if (mockConnection != null) {
mockConnection.handleSleep();
}
return 0;
}
@@ -227,6 +231,10 @@ public class MockStatement implements Statement {
if (ERROR_SQL.equals(sql)) {
throw new SQLException();
}
if (mockConnection != null) {
mockConnection.handleSleep();
}
return false;
}
@@ -300,6 +308,11 @@ public class MockStatement implements Statement {
@Override
public int[] executeBatch() throws SQLException {
checkOpen();
if (mockConnection != null) {
mockConnection.handleSleep();
}
return new int[0];
}