metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Du Krøger (JIRA) <j...@apache.org>
Subject [jira] [Updated] (METAMODEL-1093) JDBC CompiledQuery ResultSets not closed properly
Date Fri, 03 Jun 2016 09:48:59 GMT

     [ https://issues.apache.org/jira/browse/METAMODEL-1093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dennis Du Krøger updated METAMODEL-1093:
----------------------------------------
    Description: 
When running compiled queries, the JdbcResultSet only returns the lease on the query, it doesn't
close the result set.

For most JDBC drivers, that isn't really an issue, as they can easily handle connections with
multiple open result sets. However, the MySQL JDBC sometimes uses streaming result sets (to
save memory), of which only one can be open at a time.

I almost have a PR ready, but I'm having a hard time making any kind of test that makes sense:
When I make a simple test, the driver seems to close the resultset automatically right after
execution, but that is not what we see in DataCleaner, and I'm not really sure why.

I think I'll post it anyway, as it is rather large (I also tried to avoid repeats by making
sure that the JdbcDataContext only handles the connection, and the rest is handled by try-with-resources
as far as possible), so an early review would be nice.

  was:
When running compiled queries, the JdbcResultSet only returns the lease on the query, it doesn't
close the result set.

For most JDBC drivers, that isn't really an issue, as they can easily handle connections with
multiple open result sets. However, the MySQL JDBC sometimes uses streaming result sets (to
save memory), of which only one can be open at a time.

I almost have a PR ready, but I'm having a hard time making any kind of test that makes sense:
When I make a simple test, the driver seems to close the resultset automatically right after
execution, but that is not what we see in DataCleaner, and I'm not really sure why.

I think I'll post it anyway, as it is rather large (I also tried to avoid repeats by making
sure that the JdbcDataContext only handles the connection, and the rest is handled by try-with-resources
as far as possible)


> JDBC CompiledQuery ResultSets not closed properly
> -------------------------------------------------
>
>                 Key: METAMODEL-1093
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1093
>             Project: Apache MetaModel
>          Issue Type: Bug
>            Reporter: Dennis Du Krøger
>
> When running compiled queries, the JdbcResultSet only returns the lease on the query,
it doesn't close the result set.
> For most JDBC drivers, that isn't really an issue, as they can easily handle connections
with multiple open result sets. However, the MySQL JDBC sometimes uses streaming result sets
(to save memory), of which only one can be open at a time.
> I almost have a PR ready, but I'm having a hard time making any kind of test that makes
sense: When I make a simple test, the driver seems to close the resultset automatically right
after execution, but that is not what we see in DataCleaner, and I'm not really sure why.
> I think I'll post it anyway, as it is rather large (I also tried to avoid repeats by
making sure that the JdbcDataContext only handles the connection, and the rest is handled
by try-with-resources as far as possible), so an early review would be nice.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message