mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for sql parser && enhance mock driver
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user