Hello,
Is everyone using midgard in Europe now, because it seems like the list hits a quiet
spot
this time of day in EST (gmt -5) . Anyway, i just wanted to get on my old soapbox in
regard to repligard. Repligard is a cool tool with an awful flaw. It does not return
helpful error message on failure -even when you use the -d switch.
I noticed that in midgard.c of repligard, there seems to be no error detection around
the
mgd_connect function. Here is a rough patch that will finally do what I've been
begging for
for years: the error message from mysql itself to sterr.
Most LAMP heads are savvy enough to interpret and fixthose errors on their own.
Please look over my attached patch to see if it is ok.
Thank you.
*** midgard.c~ 2003-06-23 11:04:24.000000000 -0400
--- midgard.c 2004-03-22 14:28:07.000000000 -0500
***************
*** 348,355 ****
--- 348,359 ----
g_log("midgard-lib", G_LOG_LEVEL_WARNING,
"midgard-lib: mgd_connect to [EMAIL PROTECTED]://%s failed: %s",
user, host, database,
mgd->mysql ? mysql_error(mgd->mysql) : "<mysql server not found?>");
+
+ fprintf (stderr, "mysql_real_connect() failed:\nError %u (%s)\n",
+ mysql_errno (mgd->mysql), mysql_error (mgd->mysql));
+
if (mgd->mysql) mysql_close(mgd->mysql);
mgd->mysql = NULL;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]