Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4585
Modified Files:
merovingian_controlrunner.c
Log Message:
Implemented partial status support in merovingian
U merovingian_controlrunner.c
Index: merovingian_controlrunner.c
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/merovingian_controlrunner.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- merovingian_controlrunner.c 10 Sep 2009 08:47:15 -0000 1.13
+++ merovingian_controlrunner.c 14 Sep 2009 19:23:39 -0000 1.14
@@ -420,6 +420,44 @@
}
len = snprintf(buf2, sizeof(buf2),
"OK\n");
send(msgsock, buf2, len, 0);
+ } else if (strcmp(p, "status") == 0 || (
+ strcmp(q, "flyghende")
== 0 &&
+ strcmp(p, "hollander")
== 0 && (q = NULL) == NULL))
+ {
+ sabdb *stats;
+ sabdb *topdb;
+ char *sdb;
+
+ /* return a list of sabdb structs for
our local
+ * databases */
+ if ((e = SABAOTHgetStatus(&stats, q))
!= MAL_SUCCEED) {
+ len = snprintf(buf2,
sizeof(buf2),
+ "internal
error, please review the logs\n");
+ send(msgsock, buf2, len, 0);
+ Mfprintf(_mero_ctlerr, "status:
SABAOTHgetStatus: "
+ "%s\n", e);
+ freeErr(e);
+ continue;
+ }
+
+ for (topdb = stats; stats != NULL;
stats = stats->next) {
+ /* currently never fails (just
crashes) */
+ SABAOTHserialise(&sdb, stats);
+ len = snprintf(buf2,
sizeof(buf2),
+ "%s\n", sdb);
+ send(msgsock, buf2, len, 0);
+ GDKfree(sdb);
+ }
+
+ if (q == NULL) {
+ Mfprintf(_mero_ctlout, "served
status list\n");
+
+ /* because this command is
multi line, you can't
+ * combine it, disconnect the
client */
+ break;
+ } else {
+ Mfprintf(_mero_ctlout,
"returned status for '%s'\n", q);
+ }
} else if (strcmp(q, "anelosimus") == 0 &&
strcmp(p, "eximius") == 0)
{
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins