From fac24729ac71c5c38222da0fbb1269ba0c1dd18a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 24 Aug 2007 12:42:39 +0000 Subject: [PATCH] explicit setting of auto-reconnect (5.1 servers require it) --- org.glite.lb.server/src/lbs_db.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.glite.lb.server/src/lbs_db.c b/org.glite.lb.server/src/lbs_db.c index 7baaee1..ba7f7a6 100644 --- 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); -- 1.8.2.3