-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug: count sql statement leak #1640
Conversation
Fix bug: mysql count sql statement leak fix apache#1626
Codecov Report
@@ Coverage Diff @@
## master #1640 +/- ##
============================================
+ Coverage 62.83% 63.24% +0.41%
- Complexity 6737 6759 +22
============================================
Files 421 421
Lines 34645 34646 +1
Branches 4798 4798
============================================
+ Hits 21770 21913 +143
+ Misses 10606 10460 -146
- Partials 2269 2273 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
we can specify the title like fix resultset leak for count query
@@ -340,6 +340,8 @@ public Number queryNumber(Session session, Query query) { | |||
return IteratorUtils.of(rs.resultSet().getLong(1)); | |||
} catch (SQLException e) { | |||
throw new BackendException(e); | |||
} finally { | |||
rs.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, can you also fix rocksdb:
try (BackendColumnIterator results = this.queryBy(session, query)) {
if (results instanceof Countable) {
return ((Countable) results).count();
}
return IteratorUtils.count(results);
}
Fix bug: mysql count sql statement leak
Fix bug: count sql statement leak
Fix bug: mysql count sql statement leak
fix #1626