apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41250] New: - unnecessary sub-pool creation in apr_dbd_oracle.c
Date Thu, 28 Dec 2006 05:05:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41250>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41250

           Summary: unnecessary sub-pool creation in apr_dbd_oracle.c
           Product: APR
           Version: HEAD
          Platform: Other
        OS/Version: other
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P3
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: chrisd@pearsoncmg.com
                CC: chrisd@pearsoncmg.com


There's no need to create a sub-pool in dbd_oracle_open() for the
apr_dbd_t.pool structure element.  The only use of that element is as the
parent pool passed to apr_pool_create() in dbd_oracle_query().  Since
dbd_oracle_query() is thread-safe because it uses only its own private
sub-pool, we don't need another extra layer of sub-pool creation and
deletion.

More importantly, consider the case where apr_dbd_close() is called in a
cleanup function registered on the pool passed to apr_dbd_open().
When apr_pool_destroy() is called on that pool, it will first destroy all
sub-pools of that pool -- including sub-pools created in driver open
functions, such as dbd_oracle_open() -- and then call the cleanup function.
When the cleanup function runs apr_dbd_open(), dbd_oracle_close() will
attempt to destroy the sub-pool that has already been destroyed.  So,
we should act like other APR DBD drivers and not create any sub-pools in
dbd_oracle_open().

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message