add testcase & bug fixed

This commit is contained in:
wenshao
2012-08-25 06:48:07 +08:00
parent f2b4c56a8c
commit 78550243b2
15 changed files with 558 additions and 1 deletions
@@ -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 {