From: Nick Kew Date: Fri, 23 Sep 2005 10:56:07 +0000 (+0000) Subject: Add note on DBD APIs to Module Developer Changes in new_features. X-Git-Tag: 2.3.0~2947 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f9e4fa4f95bf1f926fd690fd5c1329c48aafe09;p=thirdparty%2Fapache%2Fhttpd.git Add note on DBD APIs to Module Developer Changes in new_features. Update cast in mod_dbd.c as suggested by jorton. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@291100 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/new_features_2_2.html.en b/docs/manual/new_features_2_2.html.en index a1c60e7427a..54735d5a270 100644 --- a/docs/manual/new_features_2_2.html.en +++ b/docs/manual/new_features_2_2.html.en @@ -192,6 +192,20 @@ regexec and so on can be replaced by calls to ap_regcomp, ap_regcomp. +
DBD Framework (SQL Database API)
+ +

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.

+

Apache 2.1 and up provides the ap_dbd API for + managing database connections (including optimised strategies + for threaded and unthreaded MPMs), while APR 1.2 and up provides + the apr_dbd API for interacting with the database.

+

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.

@@ -201,4 +215,4 @@
- \ No newline at end of file + diff --git a/docs/manual/new_features_2_2.xml b/docs/manual/new_features_2_2.xml index f433c9cbc24..bb0d4a3a531 100644 --- a/docs/manual/new_features_2_2.xml +++ b/docs/manual/new_features_2_2.xml @@ -189,6 +189,20 @@ regexec and so on can be replaced by calls to ap_regcomp, ap_regcomp. +
DBD Framework (SQL Database API)
+ +

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.

+

Apache 2.1 and up provides the ap_dbd API for + managing database connections (including optimised strategies + for threaded and unthreaded MPMs), while APR 1.2 and up provides + the apr_dbd API for interacting with the database.

+

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.

diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c index 4ba80a65436..c0f240814e8 100644 --- a/modules/database/mod_dbd.c +++ b/modules/database/mod_dbd.c @@ -71,7 +71,7 @@ static const char *dbd_param(cmd_parms *cmd, void *cfg, const char *val) 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