]> granicus.if.org Git - apache/commitdiff
Log a message if we try to prepare a statement not attached to a hostname.
authorNick Kew <niq@apache.org>
Fri, 18 Aug 2006 12:38:28 +0000 (12:38 +0000)
committerNick Kew <niq@apache.org>
Fri, 18 Aug 2006 12:38:28 +0000 (12:38 +0000)
This fix supplements r432560 (don't crash).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@432562 13f79535-47bb-0310-9956-ffa450edef68

modules/database/mod_dbd.c

index 76eeca2b4c729dd37db6074b72666017e8d2019b..af404d494ea5eae71c461162ff525b8ba877fd9c 100644 (file)
@@ -151,6 +151,8 @@ DBD_DECLARE_NONSTD(void) ap_dbd_prepare(server_rec *s, const char *query,
     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");
     }
     prepared->label = label;
     prepared->query = query;