mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase & bug fixed
This commit is contained in:
@@ -77,7 +77,7 @@ public class MockResultSet extends ResultSetBase implements ResultSet {
|
||||
throw new SQLException();
|
||||
}
|
||||
|
||||
if (rowIndex > 0) {
|
||||
if (rowIndex >= 0) {
|
||||
rowIndex--;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -145,10 +145,15 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
public void restart() {
|
||||
lock.lock();
|
||||
try {
|
||||
if (LOG.isInfoEnabled()) {
|
||||
LOG.info("{dataSource-" + this.getID() + "} restart");
|
||||
}
|
||||
|
||||
this.close();
|
||||
this.resetStat();
|
||||
this.inited = false;
|
||||
this.enable = true;
|
||||
this.closed = false;
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ public final class DruidPooledResultSet extends PoolableWrapper implements Resul
|
||||
throw checkException(t);
|
||||
}
|
||||
}
|
||||
|
||||
public int getFetchRowCount() {
|
||||
return fetchRowCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wasNull() throws SQLException {
|
||||
|
||||
Reference in New Issue
Block a user