Changeset: 65ef8a4f0684 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65ef8a4f0684
Removed Files:
sql/test/mergetables/Tests/qlsmith-exist-lateral.reqtests
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
clients/mapiclient/Makefile.ag
clients/mapilib/Makefile.ag
common/options/monet_getopt.h
common/options/monet_options.h
monetdb5/mal/Tests/tst050.malC
monetdb5/mal/Tests/tst050.stable.err
monetdb5/mal/Tests/tst161.stable.err
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_parser.c
monetdb5/mal/mal_resolve.c
monetdb5/mal/mal_session.c
monetdb5/mal/mal_stack.c
monetdb5/modules/atoms/xml.c
monetdb5/modules/atoms/xml.h
monetdb5/modules/atoms/xml.mal
monetdb5/modules/mal/orderidx.c
monetdb5/modules/mal/wlc.c
monetdb5/optimizer/opt_evaluate.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_remap.c
monetdb5/optimizer/opt_remoteQueries.c
sql/backends/monet5/Makefile.ag
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_gencode.h
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/sql_statement.c
sql/server/sql_mvc.c
sql/storage/bat/bat_storage.c
sql/storage/store.c
sql/test/mergetables/Tests/sqlsmith-exist-lateral.reqtests
tools/merovingian/client/Tests/monetdb_status.py
tools/mserver/Makefile.ag
Branch: linear-hashing
Log Message:
Merge with default branch.
diffs (truncated from 1251 to 300 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -12222,6 +12222,7 @@ stdout of test 'MAL-signatures` in direc
[ "xml", "document", "command xml.document(val:str):xml ",
"XMLdocument;", "Check the value for compliance as XML document" ]
[ "xml", "element", "command xml.element(name:str, ns:xml,
attr:xml, s:xml):xml ", "XMLelement;", "The basic building block for XML
elements are namespaces, attributes and a sequence of xml elements. The name
space and the attributes may be left unspecified(=nil:bat)." ]
[ "xml", "element", "command xml.element(name:str, s:xml):xml ",
"XMLelementSmall;", "The basic building block for XML elements are
namespaces, attributes and a sequence of xml elements. The name space and the
attributes may be left unspecified(=nil:bat)." ]
+[ "xml", "epilogue", "command xml.epilogue():void ", "XMLepilogue;",
"" ]
[ "xml", "forest", "pattern xml.forest(val:xml...):xml ",
"XMLforest;", "Construct an element list" ]
[ "xml", "isdocument", "command xml.isdocument(val:str):bit ",
"XMLisdocument;", "Validate the string as a document" ]
[ "xml", "parse", "command xml.parse(doccont:str, val:str,
option:str):xml ", "XMLparse;", "Parse the XML document or element
string values " ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -16642,6 +16642,7 @@ stdout of test 'MAL-signatures` in direc
[ "xml", "document", "command xml.document(val:str):xml ",
"XMLdocument;", "Check the value for compliance as XML document" ]
[ "xml", "element", "command xml.element(name:str, ns:xml,
attr:xml, s:xml):xml ", "XMLelement;", "The basic building block for XML
elements are namespaces, attributes and a sequence of xml elements. The name
space and the attributes may be left unspecified(=nil:bat)." ]
[ "xml", "element", "command xml.element(name:str, s:xml):xml ",
"XMLelementSmall;", "The basic building block for XML elements are
namespaces, attributes and a sequence of xml elements. The name space and the
attributes may be left unspecified(=nil:bat)." ]
+[ "xml", "epilogue", "command xml.epilogue():void ", "XMLepilogue;",
"" ]
[ "xml", "forest", "pattern xml.forest(val:xml...):xml ",
"XMLforest;", "Construct an element list" ]
[ "xml", "isdocument", "command xml.isdocument(val:str):bit ",
"XMLisdocument;", "Validate the string as a document" ]
[ "xml", "parse", "command xml.parse(doccont:str, val:str,
option:str):xml ", "XMLparse;", "Parse the XML document or element
string values " ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1958,6 +1958,7 @@ str XMLcontent(xml *x, str *s);
str XMLdocument(xml *x, str *s);
str XMLelement(xml *ret, str *name, xml *nspace, xml *attr, xml *val);
str XMLelementSmall(xml *ret, str *name, xml *val);
+str XMLepilogue(void *ret);
str XMLforest(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
ssize_t XMLfromString(const char *src, size_t *len, xml *x, bool external);
str XMLisdocument(bit *x, str *s);
diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag
--- a/clients/mapiclient/Makefile.ag
+++ b/clients/mapiclient/Makefile.ag
@@ -18,6 +18,7 @@ bin_mclient = {
../mapilib/libmapi \
../../common/stream/libstream \
../../common/utils/libmutils \
+ WIN32?../../common/options/libmoptions \
$(READLINE_LIBS) \
$(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS)
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
}
@@ -28,6 +29,7 @@ bin_msqldump = {
../mapilib/libmapi \
../../common/stream/libstream \
../../common/utils/libmutils \
+ WIN32?../../common/options/libmoptions \
$(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS)
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
}
@@ -37,6 +39,7 @@ bin_stethoscope = {
../mapilib/libmapi \
../../common/stream/libstream \
../../common/utils/libmutils \
+ WIN32?../../common/options/libmoptions \
$(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS)
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
}
@@ -46,6 +49,7 @@ bin_tachograph = {
../mapilib/libmapi \
../../common/stream/libstream \
../../common/utils/libmutils \
+ WIN32?../../common/options/libmoptions \
$(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS)
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
}
@@ -55,6 +59,7 @@ bin_tomograph = {
../../common/utils/libmutils \
../mapilib/libmapi \
../../common/stream/libstream \
+ WIN32?../../common/options/libmoptions \
$(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS)
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
}
diff --git a/clients/mapilib/Makefile.ag b/clients/mapilib/Makefile.ag
--- a/clients/mapilib/Makefile.ag
+++ b/clients/mapilib/Makefile.ag
@@ -12,8 +12,7 @@ INCLUDES = ../../common/stream ../../com
lib_mapi = {
VERSION = $(MAPI_VERSION)
SOURCES = mapi.c mapi.rc
- LIBS = ../../common/options/libmoptions \
- ../../common/utils/libmcrypt \
+ LIBS = ../../common/utils/libmcrypt \
WIN32?../../common/stream/libstream \
WIN32?../../common/utils/libmutils \
WIN32?$(SOCKET_LIBS) \
diff --git a/common/options/monet_getopt.h b/common/options/monet_getopt.h
--- a/common/options/monet_getopt.h
+++ b/common/options/monet_getopt.h
@@ -47,17 +47,8 @@ extern "C" {
#endif
#ifndef moptions_export
-/* avoid using "#ifdef WIN32" so that this file does not need our config.h */
-#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
-#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI)
-#define moptions_export extern __declspec(dllimport)
-#else
-#define moptions_export extern __declspec(dllexport)
-#endif
-#else
#define moptions_export extern
#endif
-#endif
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
diff --git a/common/options/monet_options.h b/common/options/monet_options.h
--- a/common/options/monet_options.h
+++ b/common/options/monet_options.h
@@ -26,17 +26,8 @@ extern "C" {
#endif
#ifndef moptions_export
-/* avoid using "#ifdef WIN32" so that this file does not need our config.h */
-#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
-#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI)
-#define moptions_export extern __declspec(dllimport)
-#else
-#define moptions_export extern __declspec(dllexport)
-#endif
-#else
#define moptions_export extern
#endif
-#endif
/* mo_print_options will print the option set on stderr */
moptions_export void mo_print_options(opt *set, int setlen);
diff --git a/monetdb5/mal/Tests/tst050.malC b/monetdb5/mal/Tests/tst050.malC
--- a/monetdb5/mal/Tests/tst050.malC
+++ b/monetdb5/mal/Tests/tst050.malC
@@ -10,15 +10,15 @@ z:bat[:int]:= bat.new(:int);
end f;
# type resolver should complain on the rest
-function f();
+function g();
j:sht := 1:lng;
-end f;
-function f();
+end g;
+function h();
k:lng := 1:sht;
-end f;
-function f();
+end h;
+function k();
y:bat[:str]:= bat.new(:int);
-end f;
-function f();
-f:flt := "wrong";
-end f;
+end k;
+function l();
+l:flt := "wrong";
+end l;
diff --git a/monetdb5/mal/Tests/tst050.stable.err
b/monetdb5/mal/Tests/tst050.stable.err
--- a/monetdb5/mal/Tests/tst050.stable.err
+++ b/monetdb5/mal/Tests/tst050.stable.err
@@ -43,24 +43,24 @@ QUERY = # Variables names may be tagged
end f;
# type resolver should complain on the rest
- function f();
+ function g();
j:sht := 1:lng;
- end f;
- function f();
+ end g;
+ function h();
k:lng := 1:sht;
- end f;
- function f();
+ end h;
+ function k();
y:bat[:str]:= bat.new(:int);
- end f;
- function f();
- f:flt := "wrong";
- end f;
-ERROR = !TypeException:user.f[1]:type mismatch sht := lng
- !TypeException:user.f[1]:type mismatch lng := sht
- !TypeException:user.f[1]:'bat.new' undefined in: y:bat[:str] :=
bat.new(:int);
- !TypeException:user.f[1]:type mismatch flt := str
+ end k;
+ function l();
+ l:flt := "wrong";
+ end l;
+ERROR = !TypeException:user.g[1]:type mismatch sht := lng
+ !TypeException:user.h[1]:type mismatch lng := sht
+ !TypeException:user.k[1]:'bat.new' undefined in: y:bat[:str] :=
bat.new(:int);
+ !TypeException:user.l[1]:type mismatch flt := str
-# 13:48:37 >
-# 13:48:37 > "Done."
-# 13:48:37 >
+# 22:14:56 >
+# 22:14:56 > "Done."
+# 22:14:56 >
diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c
--- a/monetdb5/mal/mal_builder.c
+++ b/monetdb5/mal/mal_builder.c
@@ -92,6 +92,7 @@ newComment(MalBlkPtr mb, const char *val
{
InstrPtr q = newInstruction(mb, NULL, NULL);
ValRecord cst;
+ int k;
assert(q);
q->token = REMsymbol;
@@ -101,9 +102,12 @@ newComment(MalBlkPtr mb, const char *val
addMalException(mb, createException(MAL, "newComment", "Can not
allocate comment"));
cst.len = strlen(cst.val.sval);
- getArg(q,0) = defConstant(mb,TYPE_str,&cst);
- clrVarConstant(mb,getArg(q,0));
- setVarDisabled(mb,getArg(q,0));
+ k = defConstant(mb, TYPE_str, &cst);
+ if( k >= 0){
+ getArg(q,0) = k;
+ clrVarConstant(mb,getArg(q,0));
+ setVarDisabled(mb,getArg(q,0));
+ }
pushInstruction(mb, q);
return q;
}
@@ -182,7 +186,8 @@ getIntConstant(MalBlkPtr mb, int val)
cst.len = 0;
_t= fndConstant(mb, &cst, mb->vtop);
if( _t < 0)
- _t = defConstant(mb, TYPE_int,&cst);
+ _t = defConstant(mb, TYPE_int, &cst);
+ assert(_t >= 0);
return _t;
}
@@ -197,8 +202,10 @@ pushInt(MalBlkPtr mb, InstrPtr q, int va
cst.vtype= TYPE_int;
cst.val.ival= val;
cst.len = 0;
- _t = defConstant(mb, TYPE_int,&cst);
- return pushArgument(mb, q, _t);
+ _t = defConstant(mb, TYPE_int, &cst);
+ if( _t >= 0)
+ return pushArgument(mb, q, _t);
+ return q;
}
int
@@ -213,6 +220,7 @@ getBteConstant(MalBlkPtr mb, bte val)
_t= fndConstant(mb, &cst, mb->vtop);
if( _t < 0)
_t = defConstant(mb, TYPE_bte, &cst);
+ assert(_t >= 0);
return _t;
}
@@ -227,7 +235,9 @@ pushBte(MalBlkPtr mb, InstrPtr q, bte va
cst.val.btval= val;
cst.len = 0;
_t = defConstant(mb, TYPE_bte,&cst);
- return pushArgument(mb, q, _t);
+ if( _t >= 0)
+ return pushArgument(mb, q, _t);
+ return q;
}
int
@@ -242,6 +252,7 @@ getOidConstant(MalBlkPtr mb, oid val)
_t= fndConstant(mb, &cst, mb->vtop);
if( _t < 0)
_t = defConstant(mb, TYPE_oid, &cst);
+ assert(_t >= 0);
return _t;
}
@@ -256,7 +267,9 @@ pushOid(MalBlkPtr mb, InstrPtr q, oid va
cst.val.oval= val;
cst.len = 0;
_t = defConstant(mb,TYPE_oid,&cst);
- return pushArgument(mb, q, _t);
+ if( _t >= 0)
+ return pushArgument(mb, q, _t);
+ return q;
}
InstrPtr
@@ -270,7 +283,9 @@ pushVoid(MalBlkPtr mb, InstrPtr q)
cst.val.oval= oid_nil;
cst.len = 0;
_t = defConstant(mb,TYPE_void,&cst);
- return pushArgument(mb, q, _t);
+ if( _t >= 0)
+ return pushArgument(mb, q, _t);
+ return q;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list