From: Graham Leggett Date: Tue, 29 Nov 2011 21:27:46 +0000 (+0000) Subject: mod_dbd: The dbd_prepared_init() function reported the result of the last X-Git-Tag: 2.5.0-alpha~7778 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7896eac83d212c9da4d10d8cda42c5ab8a6b5929;p=apache mod_dbd: The dbd_prepared_init() function reported the result of the last prepared statement, obscuring earlier errors. Fixed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208078 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c index a4a266d16a..e21297c4f7 100644 --- a/modules/database/mod_dbd.c +++ b/modules/database/mod_dbd.c @@ -435,7 +435,6 @@ static apr_status_t dbd_prepared_init(apr_pool_t *pool, dbd_cfg_t *cfg, ap_dbd_t *rec) { apr_hash_index_t *hi; - apr_status_t rv = APR_SUCCESS; rec->prepared = apr_hash_make(pool); @@ -453,14 +452,14 @@ static apr_status_t dbd_prepared_init(apr_pool_t *pool, dbd_cfg_t *cfg, stmt = NULL; if (apr_dbd_prepare(rec->driver, pool, rec->handle, query, label, &stmt)) { - rv = APR_EGENERAL; + return APR_EGENERAL; } else { apr_hash_set(rec->prepared, label, APR_HASH_KEY_STRING, stmt); } } - return rv; + return APR_SUCCESS; } static apr_status_t dbd_init_sql_init(apr_pool_t *pool, dbd_cfg_t *cfg,