emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

flushStatements will not close open statements in BatchExecutor.doQuery #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Rev:3019 is error.

  public List doQuery(MappedStatement ms, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler)
      throws SQLException {
      flushStatements();
      Configuration configuration = ms.getConfiguration();
      StatementHandler handler = configuration.newStatementHandler(this, ms, parameterObject, rowBounds, resultHandler);
      Connection connection = transaction.getConnection();
      Statement stmt = handler.prepare(connection);
      handler.parameterize(stmt);
      try {
      return handler.query(stmt, resultHandler);
    } finally {
        closeStatement(stmt);
// the statement don't add to statementList, so...
//      flushStatements();
    }
  }

Original issue reported on code.google.com by XueShuil...@gmail.com on 16 Nov 2010 at 2:13

GoogleCodeExporter commented 9 years ago
You are right. The behaviour should be the same than for the SimpleExecutor.
Thanks for the info. Fixed in r3470 

Original comment by eduardo.macarron on 31 Dec 2010 at 1:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 3 Mar 2012 at 9:41