apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r679235 - in /apr/apr-util/branches/1.3.x: CHANGES dbd/apr_dbd_mysql.c include/apr_dbd.h
Date Wed, 23 Jul 2008 23:50:19 GMT
Author: bojan
Date: Wed Jul 23 16:50:19 2008
New Revision: 679235

URL: http://svn.apache.org/viewvc?rev=679235&view=rev
Log:
Backport r678653 from the trunk.
Give MySQL DBD driver reconnect option.
PR 45407.

Modified:
    apr/apr-util/branches/1.3.x/CHANGES
    apr/apr-util/branches/1.3.x/dbd/apr_dbd_mysql.c
    apr/apr-util/branches/1.3.x/include/apr_dbd.h

Modified: apr/apr-util/branches/1.3.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/CHANGES?rev=679235&r1=679234&r2=679235&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.3.x/CHANGES [utf-8] Wed Jul 23 16:50:19 2008
@@ -14,6 +14,9 @@
      of each component of APR_DSOPATH. PR 45327
      [Joe Orton, William Rowe, Bojan Smojver]
 
+  *) Give MySQL DBD driver reconnect option. PR 45407
+     [Bojan Smojver]
+
 Changes with APR-util 1.3.2
 
   *) Fix parameter parsing error in ODBC DBD driver.  [Tom Donovan]

Modified: apr/apr-util/branches/1.3.x/dbd/apr_dbd_mysql.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/dbd/apr_dbd_mysql.c?rev=679235&r1=679234&r2=679235&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/dbd/apr_dbd_mysql.c (original)
+++ apr/apr-util/branches/1.3.x/dbd/apr_dbd_mysql.c Wed Jul 23 16:50:19 2008
@@ -1104,6 +1104,7 @@
         {"flags", NULL},
         {"fldsz", NULL},
         {"group", NULL},
+        {"reconnect", NULL},
         {NULL, NULL}
     };
     unsigned int port = 0;
@@ -1155,6 +1156,11 @@
     if (fields[8].value != NULL) {
          mysql_options(sql->conn, MYSQL_READ_DEFAULT_GROUP, fields[8].value);
     }
+#if MYSQL_VERSION_ID >= 50013
+    if (fields[9].value != NULL) {
+         do_reconnect = atoi(fields[9].value) ? 1 : 0;
+    }
+#endif
 
 #if MYSQL_VERSION_ID >= 50013
     /* the MySQL manual says this should be BEFORE mysql_real_connect */

Modified: apr/apr-util/branches/1.3.x/include/apr_dbd.h
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/include/apr_dbd.h?rev=679235&r1=679234&r2=679235&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/include/apr_dbd.h (original)
+++ apr/apr-util/branches/1.3.x/include/apr_dbd.h Wed Jul 23 16:50:19 2008
@@ -126,15 +126,16 @@
  *  keys, each followed by an equal sign and a value. Such key/value pairs can
  *  be delimited by space, CR, LF, tab, semicolon, vertical bar or comma.
  *  @remarks MySQL: the params can have "host", "port", "user", "pass",
- *  "dbname", "sock", "flags" "fldsz" and "group" keys, each followed by an
- *  equal sign and a value. Such key/value pairs can be delimited by space,
- *  CR, LF, tab, semicolon, vertical bar or comma. For now, "flags" can only
- *  recognise CLIENT_FOUND_ROWS (check MySQL manual for details). The value
- *  associated with "fldsz" determines maximum amount of memory (in bytes) for
- *  each of the fields in the result set of prepared statements. By default,
- *  this value is 1 MB. The value associated with "group" determines which
- *  group from configuration file to use (see MYSQL_READ_DEFAULT_GROUP option
- *  of mysql_options() in MySQL manual).
+ *  "dbname", "sock", "flags" "fldsz", "group" and "reconnect" keys, each
+ *  followed by an equal sign and a value. Such key/value pairs can be
+ *  delimited by space, CR, LF, tab, semicolon, vertical bar or comma. For
+ *  now, "flags" can only recognise CLIENT_FOUND_ROWS (check MySQL manual for
+ *  details). The value associated with "fldsz" determines maximum amount of
+ *  memory (in bytes) for each of the fields in the result set of prepared
+ *  statements. By default, this value is 1 MB. The value associated with
+ *  "group" determines which group from configuration file to use (see
+ *  MYSQL_READ_DEFAULT_GROUP option of mysql_options() in MySQL manual).
+ *  Reconnect is set to 1 by default (i.e. true).
  *  @remarks FreeTDS: the params can have "username", "password", "appname",
  *  "dbname", "host", "charset", "lang" and "server" keys, each followed by an
  *  equal sign and a value.



Mime
View raw message