git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66f24a0
)
explicit setting of auto-reconnect (5.1 servers require it)
author
Aleš Křenek
<ljocha@ics.muni.cz>
Fri, 24 Aug 2007 12:42:39 +0000
(12:42 +0000)
committer
Aleš Křenek
<ljocha@ics.muni.cz>
Fri, 24 Aug 2007 12:42:39 +0000
(12:42 +0000)
org.glite.lb.server/src/lbs_db.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.server/src/lbs_db.c
b/org.glite.lb.server/src/lbs_db.c
index
7baaee1
..
ba7f7a6
100644
(file)
--- a/
org.glite.lb.server/src/lbs_db.c
+++ b/
org.glite.lb.server/src/lbs_db.c
@@
-32,6
+32,7
@@
static edg_wll_ErrorCode db_connect(edg_wll_Context ctx, const char *cs, MYSQL *
char *buf = NULL;
char *host,*user,*pw,*db;
char *slash,*at,*colon;
+ my_bool reconnect = 1;
if (!cs) cs = DEFAULTCS;
@@
-40,6
+41,9
@@
static edg_wll_ErrorCode db_connect(edg_wll_Context ctx, const char *cs, MYSQL *
mysql_options(*mysql, MYSQL_READ_DEFAULT_FILE, "my");
+/* XXX: may result in weird behaviour in the middle of transaction */
+ mysql_options(*mysql, MYSQL_OPT_RECONNECT, &reconnect);
+
host = user = pw = db = NULL;
buf = strdup(cs);