bug fixed for com.alibaba.druid.proxy.jdbc.StatementProxyImpl.getMoreResults

This commit is contained in:
wenshao
2013-08-25 10:58:59 +08:00
parent 7d6e7e2080
commit d10e85c0f4
2 changed files with 9 additions and 3 deletions
@@ -321,9 +321,7 @@ public class StatementProxyImpl extends WrapperProxyImpl implements StatementPro
public boolean getMoreResults() throws SQLException {
FilterChainImpl chain = createChain();
boolean value = chain.statement_getMoreResults(this);
if (value) {
updateCount = null;
}
updateCount = null;
recycleFilterChain(chain);
return value;
}
@@ -24,6 +24,7 @@ import junit.framework.TestCase;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.junit.Assert;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -81,6 +82,10 @@ public class SpringMybatisFilterTest extends TestCase {
userMapper.addUser(user);
}
{
userMapper.errorSelect(1);
}
{
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
@@ -105,5 +110,8 @@ public class SpringMybatisFilterTest extends TestCase {
@Insert(value = "insert into t_User (id, name) values (#{user.id}, #{user.name})")
void addUser(@Param("user") User user);
@Select(value = "delete from t_User where id = #{id}")
void errorSelect(@Param("id") long id);
}
}