Skip to content

Commit

Permalink
bug fixed for com.alibaba.druid.proxy.jdbc.StatementProxyImpl.getMore…
Browse files Browse the repository at this point in the history
…Results
  • Loading branch information
wenshao committed Aug 25, 2013
1 parent 7d6e7e2 commit d10e85c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,7 @@ public int getMaxRows() throws SQLException {
public boolean getMoreResults() throws SQLException {
FilterChainImpl chain = createChain();
boolean value = chain.statement_getMoreResults(this);
if (value) {
updateCount = null;
}
updateCount = null;
recycleFilterChain(chain);
return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

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;

Expand Down Expand Up @@ -81,6 +82,10 @@ public void test_spring() throws Exception {
userMapper.addUser(user);
}

{
userMapper.errorSelect(1);
}

{
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
Expand All @@ -105,5 +110,8 @@ public static interface UserMapper {

@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);
}
}

0 comments on commit d10e85c

Please sign in to comment.