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:
@@ -65,6 +65,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
|
||||
if (mockConnection != null && mockConnection.getDriver() != null) {
|
||||
return mockConnection.getDriver().createResultSet(this);
|
||||
}
|
||||
|
||||
if (mockConnection != null) {
|
||||
mockConnection.handleSleep();
|
||||
}
|
||||
|
||||
return new MockResultSet(this);
|
||||
}
|
||||
@@ -76,6 +80,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
|
||||
@Override
|
||||
public int executeUpdate() throws SQLException {
|
||||
checkOpen();
|
||||
|
||||
if (mockConnection != null) {
|
||||
mockConnection.handleSleep();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -186,6 +194,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
|
||||
public boolean execute() throws SQLException {
|
||||
checkOpen();
|
||||
|
||||
if (mockConnection != null) {
|
||||
mockConnection.handleSleep();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user