Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4630
Modified Files:
monetdb.c monetdb_status.c
Log Message:
implemented partial status support via merovingian, uplogstats are still missing
U monetdb_status.c
Index: monetdb_status.c
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/monetdb_status.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- monetdb_status.c 19 Aug 2009 13:41:08 -0000 1.1
+++ monetdb_status.c 14 Sep 2009 19:24:04 -0000 1.2
@@ -17,7 +17,6 @@
* All Rights Reserved.
*/
-
static void
printStatus(sabdb *stats, int mode, int twidth)
{
@@ -280,11 +279,45 @@
}
}
- if ((e = SABAOTHgetStatus(&orig, NULL)) != MAL_SUCCEED) {
- fprintf(stderr, "status: internal error: %s\n", e);
- GDKfree(e);
- exit(2);
+ if (mero_running == 0) {
+ if ((e = SABAOTHgetStatus(&orig, NULL)) != MAL_SUCCEED) {
+ fprintf(stderr, "status: internal error: %s\n", e);
+ GDKfree(e);
+ exit(2);
+ }
+ } else {
+ char *buf;
+ char *p;
+ sabdb *w;
+ char path[8096];
+
+ snprintf(path, sizeof(path), "%s/.merovingian_control", dbfarm);
+ e = control_send(&buf, path, -1, "flyghende", "hollander");
+ if (e != NULL) {
+ fprintf(stderr, "status: internal error: %s\n", e);
+ free(e);
+ exit(2);
+ }
+
+ orig = NULL;
+ if ((p = strtok(buf, "\n")) != NULL) {
+ do {
+ e = SABAOTHdeserialise(&stats, &p);
+ if (e != NULL) {
+ printf("WARNING: failed to parse
response from "
+ "merovingian: %s
(%s)\n", e, p);
+ GDKfree(e);
+ continue;
+ }
+ if (orig == NULL) {
+ orig = w = stats;
+ } else {
+ w = w->next = stats;
+ }
+ } while ((p = strtok(NULL, "\n")) != NULL);
+ }
}
+
/* don't even look at the arguments, if we are instructed
* to list all known databases */
if (doall != 1) {
U monetdb.c
Index: monetdb.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/monetdb.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- monetdb.c 14 Sep 2009 18:20:05 -0000 1.48
+++ monetdb.c 14 Sep 2009 19:24:04 -0000 1.49
@@ -213,8 +213,7 @@
match = argv[1];
}
- snprintf(path, 8095, "%s/.merovingian_control", dbfarm);
- path[8095] = '\0';
+ snprintf(path, sizeof(path), "%s/.merovingian_control", dbfarm);
/* Send the pass phrase to unlock the information available in
* merovingian. Anelosimus eximius is a social species of spiders,
------------------------------------------------------------------------------
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