Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22625
Modified Files:
ChangeLog merovingian_forkmserver.c monetdb.c monetdb_get.c
properties.c
Log Message:
Add master property of boolean value that translates into replication_master
for mserver5 to trigger storing replication logs
U monetdb_get.c
Index: monetdb_get.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/monetdb_get.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- monetdb_get.c 19 Aug 2009 13:41:08 -0000 1.1
+++ monetdb_get.c 4 Sep 2009 09:45:11 -0000 1.2
@@ -67,7 +67,7 @@
if (strcmp(property, "all") == 0) {
/* die hard leak (can't use constant, strtok
modifies
* (and hence crashes)) */
- property =
GDKstrdup("name,forward,shared,nthreads");
+ property =
GDKstrdup("name,forward,shared,nthreads,master");
}
} else {
doall = 0;
@@ -140,7 +140,7 @@
if (kv->val == NULL) {
kv = findConfKey(defprops, p);
source = "default";
- value = kv->val != NULL ? kv->val :
"<unknown>";
+ value = kv != NULL && kv->val != NULL ?
kv->val : "<unknown>";
} else {
source = "local";
value = kv->val;
U ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/ChangeLog,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- ChangeLog 4 Sep 2009 09:15:57 -0000 1.22
+++ ChangeLog 4 Sep 2009 09:45:11 -0000 1.23
@@ -1,6 +1,11 @@
# ChangeLog file for sql/src/backends/monet5
# This file is updated with mchangelog (Gentoo echangelog bastard script)
+ 04 Sep 2009; Fabian Groffen <[email protected]> merovingian_forkmserver.c,
+ monetdb.c, monetdb_get.c, properties.c:
+ Add master property of boolean value that translates into
+ replication_master for mserver5 to trigger storing replication logs
+
20 Aug 2009; Fabian Groffen <[email protected]> database.c, database.h,
monetdb.c, monetdb.1:
Always put created databases under maintenance, they have to be explicitly
U monetdb.c
Index: monetdb.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/monetdb.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- monetdb.c 27 Aug 2009 15:14:52 -0000 1.34
+++ monetdb.c 4 Sep 2009 09:45:11 -0000 1.35
@@ -335,6 +335,7 @@
{"sql_logdir", NULL},
{"mero_doproxy", GDKstrdup("yes")},
{"mero_discoveryport", NULL},
+ {"#master", GDKstrdup("no")},
{ NULL, NULL}
};
confkeyval *kv;
@@ -448,6 +449,9 @@
}
kv = findConfKey(ckv, "gdk_nr_threads");
kv->key = "nthreads";
+ /* enable "hidden" option, to avoid override by config-file */
+ kv = findConfKey(ckv, "#master");
+ kv->key++;
command_get(argc - 1, &argv[1], ckv);
} else if (strcmp(argv[1], "inherit") == 0) {
command_set(argc - 1, &argv[1], INHERIT);
U properties.c
Index: properties.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/properties.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- properties.c 1 Jul 2009 13:18:34 -0000 1.7
+++ properties.c 4 Sep 2009 09:45:11 -0000 1.8
@@ -38,6 +38,7 @@
{"forward", NULL},
{"shared", NULL},
{"nthreads", NULL},
+ {"master", NULL},
{ NULL, NULL}
};
U merovingian_forkmserver.c
Index: merovingian_forkmserver.c
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/merovingian_forkmserver.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- merovingian_forkmserver.c 19 Aug 2009 13:53:05 -0000 1.1
+++ merovingian_forkmserver.c 4 Sep 2009 09:45:11 -0000 1.2
@@ -35,6 +35,7 @@
dpair dp;
str vaultkey = NULL;
str nthreads = NULL;
+ str master = NULL;
char mydoproxy;
confkeyval *ckv, *kv;
struct stat statbuf;
@@ -219,6 +220,16 @@
snprintf(nthreads, 24, "gdk_nr_threads=%s", kv->val);
}
+ kv = findConfKey(ckv, "master");
+ if (kv->val != NULL && /* can't have master configured by default */
+ (!strcmp(kv->val, "true") ||
+ !strcmp(kv->val, "yes") ||
+ !strcmp(kv->val, "1")))
+ {
+ master = alloca(sizeof(char) * 24);
+ snprintf(master, 24, "replication_master=true");
+ }
+
freeConfFile(ckv);
GDKfree(ckv); /* can make ckv static and reuse it all the time */
@@ -240,7 +251,7 @@
str conffile = alloca(sizeof(char) * 512);
str dbname = alloca(sizeof(char) * 512);
str port = alloca(sizeof(char) * 24);
- str argv[17]; /* for the exec arguments */
+ str argv[19]; /* for the exec arguments */
int c = 0;
/* redirect stdout and stderr to a new pair of fds for
@@ -278,6 +289,9 @@
if (nthreads != NULL) {
argv[c++] = "--set"; argv[c++] = nthreads;
}
+ if (master != NULL) {
+ argv[c++] = "--set"; argv[c++] = master;
+ }
argv[c++] = NULL;
fprintf(stdout, "arguments:");
------------------------------------------------------------------------------
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