Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) mod_dbd: Key the storage of prepared statements on the hex string
+ value of server_rec, rather than the server name, as the server name
+ may change (eg when the server name is set) at any time, causing
+ weird behaviour in modules dependent on mod_dbd. [Graham Leggett]
+
*) mod_proxy_fcgi: Added win32 build. [Mladen Turk]
*) mod_authnz_ldap: Add an AuthLDAPRemoteUserAttribute directive. If
} cmd_parts;
static apr_hash_t *dbd_prepared_defns;
-static const char *const default_hostname = "*";
/* a default DBDriver value that'll generate meaningful error messages */
static const char *const no_dbdriver = "[DBDriver unset]";
const char *label)
{
dbd_prepared *prepared = apr_pcalloc(s->process->pool, sizeof(dbd_prepared));
- const char *key = s->server_hostname;
- if (key == NULL) {
- key = default_hostname;
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
- "DBD: ServerName should be set before declaring any prepared statements");
- }
+ const char *key = apr_psprintf(s->process->pool, "%pp", s);
prepared->label = label;
prepared->query = query;
prepared->next = apr_hash_get(dbd_prepared_defns, key, APR_HASH_KEY_STRING);
svr_cfg *svr;
server_rec *sp;
for (sp = s; sp; sp = sp->next) {
- const char *key = s->server_hostname;
- if (key == NULL) {
- key = default_hostname;
- }
+ const char *key = apr_psprintf(s->process->pool, "%pp", s);
svr = ap_get_module_config(sp->module_config, &dbd_module);
svr->prepared = apr_hash_get(dbd_prepared_defns, key,
APR_HASH_KEY_STRING);