Changeset: 0733a491dded for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0733a491dded
Modified Files:
geom/monetdb5/geom.mx
monetdb5/mal/mal_exception.c
monetdb5/mal/mal_exception.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_parser.c
monetdb5/mal/mal_session.c
monetdb5/modules/mal/cbp.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/inout.c
monetdb5/modules/mal/language.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/tablet_sql.c
monetdb5/modules/mal/xmlcolumn.c
monetdb5/optimizer/opt_support.c
monetdb5/scheduler/run_octopus.c
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_bpm.c
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/vaults/fits.c
Branch: headless
Log Message:
Merge with default branch.
diffs (truncated from 834 to 300 lines):
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -364,24 +364,14 @@
PSAPILIB = psapi.lib
# When compiled with plain `nmake`,
-# 32-bit OIDs are used by default on 64-bit Windows
-# (see winconfig.h for details);
-# compile with `nmake MONET_OID64=1` to use 64-bit OIDs on 64-bit Windows;
-# compile with `nmake MONET_OID32=1` to use 32-bit OIDs on 64-bit Windows
-# in case the default is altered in winconfig.h .
-#!IFDEF BITS64
+# 64-bit OIDs are used by default on 64-bit Windows
+# (see monetdb_config.h.in for details);
+# compile with `nmake MONET_OID32=1` to use 32-bit OIDs on 64-bit Windows.
!IF $(bits) == 64
-!IFNDEF MONET_OID64
!IFDEF MONET_OID32
CFLAGS = $(CFLAGS) -DMONET_OID32
!ENDIF
!ENDIF
-!IFNDEF MONET_OID32
-!IFDEF MONET_OID64
-CFLAGS = $(CFLAGS) -DMONET_OID64
-!ENDIF
-!ENDIF
-!ENDIF
CONFIG_H = monetdb_config.h
diff --git a/geom/monetdb5/geom.mx b/geom/monetdb5/geom.mx
--- a/geom/monetdb5/geom.mx
+++ b/geom/monetdb5/geom.mx
@@ -957,7 +957,7 @@
GEOSGeom_destroy(geosGeometry);
if (ret != MAL_SUCCEED)
- throw(MAL, "geom.@1", ret);
+ throw(MAL, "geom.@1", "%s", ret);
return ret;
}
@@ -1030,7 +1030,7 @@
BBPreleaseref(bx->cacheid);
BBPreleaseref(by->cacheid);
BBPreleaseref(bo->cacheid);
- throw(MAL, "geom.point", err);
+ throw(MAL, "geom.point", "%s", err);
}
tfastins_nocheck(bo, o, p, Tsize(bo));
GDKfree(p);
@@ -1189,7 +1189,7 @@
GEOSGeom_destroy(ga);
if (ret != MAL_SUCCEED)
- throw(MAL, "geom.@1", ret);
+ throw(MAL, "geom.@1", "%s", ret);
return ret;
}
@= analysis2
@@ -1221,7 +1221,7 @@
GEOSGeom_destroy(gb);
if (ret != MAL_SUCCEED)
- throw(MAL, "geom.@1", ret);
+ throw(MAL, "geom.@1", "%s", ret);
return ret;
}
@= analysis3
diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -158,7 +158,7 @@
* is good.
*/
static str
-createExceptionInternal(enum malexception type, str fcn, str format, va_list
ap)
+createExceptionInternal(enum malexception type, const char *fcn, const char
*format, va_list ap)
{
char *message;
int len;
@@ -183,7 +183,7 @@
* the exceptionNames array.
*/
str
-createException(enum malexception type, str fcn, str format, ...)
+createException(enum malexception type, const char *fcn, const char *format,
...)
{
va_list ap;
str ret;
@@ -230,7 +230,7 @@
* console as defined by GDKout.
*/
void
-showException(enum malexception type, str fcn, str format, ...)
+showException(enum malexception type, const char *fcn, const char *format, ...)
{
va_list ap;
str msg;
@@ -253,7 +253,7 @@
* is good.
*/
static str
-createScriptExceptionInternal(MalBlkPtr mb, int pc, enum malexception type,
str prev, str format, va_list ap)
+createScriptExceptionInternal(MalBlkPtr mb, int pc, enum malexception type,
const char *prev, const char *format, va_list ap)
{
char buf[GDKMAXERRLEN];
size_t i;
@@ -284,7 +284,7 @@
* malexception enum is not aligned with the exceptionNames array.
*/
str
-createScriptException(MalBlkPtr mb, int pc, enum malexception type, str prev,
str format, ...)
+createScriptException(MalBlkPtr mb, int pc, enum malexception type, const char
*prev, const char *format, ...)
{
va_list ap;
str ret;
@@ -302,7 +302,7 @@
* defined by GDKout.
*/
void
-showScriptException(MalBlkPtr mb, int pc, enum malexception type, str format,
...)
+showScriptException(MalBlkPtr mb, int pc, enum malexception type, const char
*format, ...)
{
va_list ap;
str msg;
diff --git a/monetdb5/mal/mal_exception.h b/monetdb5/mal/mal_exception.h
--- a/monetdb5/mal/mal_exception.h
+++ b/monetdb5/mal/mal_exception.h
@@ -53,10 +53,18 @@
#define throwagain(KIND,FCN,MSG) \
return createException(KIND,FCN,"passed up\n%s",msg)
-mal_export str createException(enum malexception, str, str, ...);
-mal_export void showException(enum malexception, str, str, ...);
-mal_export str createScriptException(MalBlkPtr, int, enum malexception, str,
str, ...);
-mal_export void showScriptException(MalBlkPtr, int, enum malexception,
str, ...);
+mal_export str createException(enum malexception, const char *,
+ _In_z_ _Printf_format_string_ const char *, ...)
+ __attribute__((__format__(__printf__, 3, 4)));
+mal_export void showException(enum malexception, const char *,
+ _In_z_ _Printf_format_string_ const char *, ...)
+ __attribute__((__format__(__printf__, 3, 4)));
+mal_export str createScriptException(MalBlkPtr, int, enum malexception, const
char *,
+ _In_z_ _Printf_format_string_ const char *, ...)
+ __attribute__((__format__(__printf__, 5, 6)));
+mal_export void showScriptException(MalBlkPtr, int, enum malexception,
+ _In_z_ _Printf_format_string_ const char *, ...)
+ __attribute__((__format__(__printf__, 4, 5)));
mal_export int isExceptionVariable(str nme);
mal_export enum malexception getExceptionType(str);
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -1000,7 +1000,7 @@
ret = NULL;
if (getVarType(mb, getDestVar(pci)).type ==
TYPE_str) {
ret = createScriptException(mb, stkpc,
MAL, NULL,
-
stk->stk[getDestVar(pci)].val.sval);
+ "%s",
stk->stk[getDestVar(pci)].val.sval);
}
/*
* You can skip to a catch block by searching
for the corresponding 'lab'
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -1752,7 +1752,7 @@
sprintf(buf,"input%d",(int)(cntxt-mal_clients));
f = fopen(buf,"w");
if (f==NULL)
- showException(SYNTAX, "temp file not writeable", "");
+ showException(SYNTAX, "parser", "temp file not writeable");
while( (c=currChar(cntxt)) == '[' && c){
do {
if (f && c) fputc(c, f);
@@ -1761,8 +1761,8 @@
if (f && c && fputc(c, f) == EOF){
(void)fclose(f);
if (unlink(buf) < 0)
- showException(SYNTAX, "out of temp file space
and unable to unlink", "");
- showException(SYNTAX, "out of temp file space", "");
+ showException(SYNTAX, "parser", "out of temp
file space and unable to unlink");
+ showException(SYNTAX, "parser", "out of temp file
space");
return;
}
nextChar(cntxt);
@@ -1961,7 +1961,7 @@
*s++= '\n';
*s = 0;
if( s != buf+1 && strlen(buf)<1024){
- showException(SYNTAX, "parseError", buf);
+ showException(SYNTAX, "parseError", "%s", buf);
/* produce the position marker*/
s= buf;
i = position(cntxt) -1;
@@ -1975,6 +1975,6 @@
if( msg && strlen(msg))
snprintf(s,1020,"%s", msg);
skipToEnd(cntxt);
- showException(SYNTAX, "parseError", buf);
+ showException(SYNTAX, "parseError", "%s", buf);
return 0;
}
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -624,7 +624,7 @@
msg = (str) runMAL(c, prg->def, 1, 0, c->glb, 0);
if (msg) {
str place = getExceptionPlace(msg);
- showException(getExceptionType(msg), place,
getExceptionMessage(msg));
+ showException(getExceptionType(msg), place, "%s",
getExceptionMessage(msg));
GDKfree(place);
if (!c->listing)
printFunction(c->fdout, c->curprg->def, 0, c->listing);
diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -296,7 +296,7 @@
(void) mb; /* fool compiler */
if ( pci->argc==2 && cntxt->idx != 0)
- throw(MAL, "client.quit", INVCRED_ACCESS_DENIED,"");
+ throw(MAL, "client.quit", INVCRED_ACCESS_DENIED);
if ( pci->argc==2)
id = *(int*) getArgReference(stk,pci,1);
else id =cntxt->idx;
diff --git a/monetdb5/modules/mal/inout.c b/monetdb5/modules/mal/inout.c
--- a/monetdb5/modules/mal/inout.c
+++ b/monetdb5/modules/mal/inout.c
@@ -590,11 +590,11 @@
stream *s = open_rstream(*fnme);
*ret = 0;
if (s == NULL )
- throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", fnme);
+ throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", *fnme);
if (mnstr_errnr(s)) {
mnstr_close(s);
- throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", fnme);
+ throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", *fnme);
}
*ret= GDKstrdup(*fnme);
mnstr_close(s);
@@ -615,12 +615,12 @@
s = open_wastream(*fnme);
if (s == NULL ){
CBPreleaseref(b);
- throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", fnme);
+ throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", *fnme);
}
if (mnstr_errnr(s)) {
mnstr_close(s);
CBPreleaseref(b);
- throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", fnme);
+ throw(MAL, "io.export", RUNTIME_FILE_NOT_FOUND ":%s", *fnme);
}
COLprintf(s, b);
mnstr_close(s);
@@ -743,7 +743,7 @@
char msg[BUFSIZ]; \
CBPreleaseref(b); \
snprintf(msg,BUFSIZ,"error in input %s",buf); \
- throw(MAL, "io.import", msg); \
+ throw(MAL, "io.import", "%s", msg); \
} \
p += A1(p, A3, A4);
diff --git a/monetdb5/modules/mal/language.c b/monetdb5/modules/mal/language.c
--- a/monetdb5/modules/mal/language.c
+++ b/monetdb5/modules/mal/language.c
@@ -49,42 +49,42 @@
MALassertBit(int *ret, bit *val, str *msg){
(void) ret;
if( *val == 0 || *val == bit_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
}
str
MALassertInt(int *ret, int *val, str *msg){
(void) ret;
if( *val == 0 || *val == int_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
}
str
MALassertLng(int *ret, lng *val, str *msg){
(void) ret;
if( *val == 0 || *val == lng_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
}
str
MALassertSht(int *ret, sht *val, str *msg){
(void) ret;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list