mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for com.alibaba.druid.proxy.jdbc.StatementProxyImpl.getMoreResults
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user