You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2005/09/23 12:56:14 UTC
svn commit: r291100 - in /httpd/httpd/trunk:
docs/manual/new_features_2_2.html.en docs/manual/new_features_2_2.xml
modules/database/mod_dbd.c
Author: niq
Date: Fri Sep 23 03:56:07 2005
New Revision: 291100
URL: http://svn.apache.org/viewcvs?rev=291100&view=rev
Log:
Add note on DBD APIs to Module Developer Changes in new_features.
Update cast in mod_dbd.c as suggested by jorton.
Modified:
httpd/httpd/trunk/docs/manual/new_features_2_2.html.en
httpd/httpd/trunk/docs/manual/new_features_2_2.xml
httpd/httpd/trunk/modules/database/mod_dbd.c
Modified: httpd/httpd/trunk/docs/manual/new_features_2_2.html.en
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/new_features_2_2.html.en?rev=291100&r1=291099&r2=291100&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/new_features_2_2.html.en (original)
+++ httpd/httpd/trunk/docs/manual/new_features_2_2.html.en Fri Sep 23 03:56:07 2005
@@ -192,6 +192,20 @@
<code>regexec</code> and so on can be replaced by calls to
<code>ap_regcomp</code>, <code>ap_regcomp</code>.</dd>
+ <dt>DBD Framework (SQL Database API)</dt>
+
+ <dd><p>With Apache 1.x and 2.0, modules requiring an SQL backend
+ had to take responsibility for managing it themselves. Apart
+ from reinventing the wheel, this can be very inefficient, for
+ example when several modules each maintain their own connections.</p>
+ <p>Apache 2.1 and up provides the <code>ap_dbd</code> API for
+ managing database connections (including optimised strategies
+ for threaded and unthreaded MPMs), while APR 1.2 and up provides
+ the <code>apr_dbd</code> API for interacting with the database.</p>
+ <p>New modules SHOULD now use these APIs for all SQL database
+ operations. Existing applications SHOULD be upgraded to use it
+ where feasible, either transparently or as a recommended option
+ to their users.</p></dd>
</dl>
</div></div>
<div class="bottomlang">
@@ -201,4 +215,4 @@
</div><div id="footer">
<p class="apache">Copyright 1995-2005 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div>
-</body></html>
\ No newline at end of file
+</body></html>
Modified: httpd/httpd/trunk/docs/manual/new_features_2_2.xml
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/new_features_2_2.xml?rev=291100&r1=291099&r2=291100&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/new_features_2_2.xml (original)
+++ httpd/httpd/trunk/docs/manual/new_features_2_2.xml Fri Sep 23 03:56:07 2005
@@ -189,6 +189,20 @@
<code>regexec</code> and so on can be replaced by calls to
<code>ap_regcomp</code>, <code>ap_regcomp</code>.</dd>
+ <dt>DBD Framework (SQL Database API)</dt>
+
+ <dd><p>With Apache 1.x and 2.0, modules requiring an SQL backend
+ had to take responsibility for managing it themselves. Apart
+ from reinventing the wheel, this can be very inefficient, for
+ example when several modules each maintain their own connections.</p>
+ <p>Apache 2.1 and up provides the <code>ap_dbd</code> API for
+ managing database connections (including optimised strategies
+ for threaded and unthreaded MPMs), while APR 1.2 and up provides
+ the <code>apr_dbd</code> API for interacting with the database.</p>
+ <p>New modules SHOULD now use these APIs for all SQL database
+ operations. Existing applications SHOULD be upgraded to use it
+ where feasible, either transparently or as a recommended option
+ to their users.</p></dd>
</dl>
</section>
</manualpage>
Modified: httpd/httpd/trunk/modules/database/mod_dbd.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/database/mod_dbd.c?rev=291100&r1=291099&r2=291100&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/database/mod_dbd.c (original)
+++ httpd/httpd/trunk/modules/database/mod_dbd.c Fri Sep 23 03:56:07 2005
@@ -71,7 +71,7 @@
svr_cfg *svr = (svr_cfg*) ap_get_module_config
(cmd->server->module_config, &dbd_module);
- switch ((int) cmd->info) {
+ switch ((long) cmd->info) {
case cmd_name:
svr->name = val;
/* loading the driver involves once-only dlloading that is