Changeset: a56b4569186a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a56b4569186a
Added Files:
        sql/test/malloc_fail/Tests/initialize.sql
        sql/test/malloc_fail/Tests/initialize.stable.err
        sql/test/malloc_fail/Tests/initialize.stable.out
        sql/test/malloc_fail/Tests/setmemorylimit-fail.reqtests
        sql/test/malloc_fail/Tests/setmemorylimit-fail2.reqtests
        sql/test/malloc_fail/Tests/setmemorylimit.reqtests
Removed Files:
        sql/backends/monet5/sql_readline.c
        sql/backends/monet5/sql_readline.h
Modified Files:
        clients/Tests/SQL-dump.stable.out
        clients/Tests/SQL-dump.stable.out.int128
        clients/Tests/exports.stable.out
        clients/mapiclient/stethoscope.c
        clients/mapiclient/tachograph.c
        clients/mapiclient/tomograph.c
        monetdb5/mal/Makefile.ag
        monetdb5/mal/mal_atom.c
        monetdb5/mal/mal_client.c
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_errors.h
        monetdb5/mal/mal_exception.c
        monetdb5/mal/mal_function.c
        monetdb5/mal/mal_instruction.h
        monetdb5/mal/mal_module.c
        monetdb5/mal/mal_module.h
        monetdb5/mal/mal_parser.c
        monetdb5/mal/mal_private.h
        monetdb5/mal/mal_readline.c
        monetdb5/mal/mal_resolve.c
        monetdb5/mal/mal_session.c
        monetdb5/modules/mal/clients.c
        monetdb5/modules/mal/clients.h
        monetdb5/modules/mal/clients.mal
        monetdb5/modules/mal/inspect.c
        monetdb5/modules/mal/manual.c
        monetdb5/optimizer/opt_macro.c
        monetdb5/tools/Makefile.ag
        sql/backends/monet5/Makefile.ag
        sql/backends/monet5/UDF/pyapi/emit.c
        sql/backends/monet5/sql_execute.c
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/vaults/Makefile.ag
        sql/backends/monet5/vaults/fits/Makefile.ag
        sql/backends/monet5/vaults/lidar/Makefile.ag
        sql/backends/monet5/vaults/netcdf/Makefile.ag
        sql/backends/monet5/vaults/shp/Makefile.ag
        sql/scripts/25_debug.sql
        sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/check.stable.out
        sql/test/emptydb-upgrade-chain/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade-hge/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade/Tests/check.stable.out
        sql/test/emptydb-upgrade/Tests/check.stable.out.int128
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/emptydb/updatetests
        sql/test/malloc_fail/Tests/All
        sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
        sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
Branch: sfcgal
Log Message:

Merge


diffs (truncated from 2164 to 300 lines):

diff --git a/clients/Tests/SQL-dump.stable.out 
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -951,7 +951,7 @@ create filter function "like"(val string
 
 create procedure listdir(dirname string) external name fits.listdir;
 create procedure listdirpat(dirname string,pat string) external name 
fits.listdirpattern;
-create function sys.malfunctions() returns table("signature" string, "address" 
string, "comment" string) external name "manual"."functions";
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
 create function "masklen" (p inet) returns int external name inet."masklen";
 create function mbr(geom geometry) returns mbr external name geom."mbr";
 create function sys.md5(v string) returns string external name clients.md5sum;
@@ -2099,7 +2099,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "ltrim",        "ltrim",        "str",  0,      1,      false,  
false,  false   ]
 [ "sys",       "ltrim",        "ltrim",        "str",  0,      1,      false,  
false,  false   ]
 [ "sys",       "ltrim",        "ltrim",        "str",  0,      1,      false,  
false,  false   ]
-[ "sys",       "malfunctions", "create function sys.malfunctions() returns 
table(\"signature\" string, \"address\" string, \"comment\" string) external 
name \"manual\".\"functions\";",       "manual",       1,      5,      false,  
false,  false   ]
+[ "sys",       "malfunctions", "create function sys.malfunctions() returns 
table(\"module\" string, \"function\" string, \"signature\" string, \"address\" 
string, \"comment\" string) external name \"manual\".\"functions\";",       
"manual",       1,      5,      false,  false,  false   ]
 [ "sys",       "masklen",      "create function \"masklen\" (p inet) returns 
int external name inet.\"masklen\";",     "inet", 1,      1,      false,  
false,  false   ]
 [ "sys",       "max",  "max",  "aggr", 0,      3,      false,  false,  false   
]
 [ "sys",       "mbr",  "create function mbr(geom geometry) returns mbr 
external name geom.\"mbr\";",   "geom", 1,      1,      false,  false,  false   
]
@@ -3653,7 +3653,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "ltrim",        "arg_1",        "clob", 0,      0,      1,      
"arg_2",        "clob", 0,      0,      1,      NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "ltrim",        "arg_1",        "varchar",      0,      0,      
1,      NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "ltrim",        "arg_1",        "varchar",      0,      0,      
1,      "arg_2",        "varchar",      0,      0,      1,      NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
-[ "sys",       "malfunctions", "address",      "clob", 0,      0,      0,      
"comment",      "clob", 0,      0,      0,      NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
+[ "sys",       "malfunctions", "function",     "clob", 0,      0,      0,      
"signature",    "clob", 0,      0,      0,      "address",      "clob", 0,      
0,      0,      "comment",      "clob", 0,      0,      0,      NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
 [ "sys",       "masklen",      "p",    "inet", 0,      0,      1,      NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "max",  "arg",  "any",  0,      0,      1,      NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "mbr",  "geom", "geometry",     0,      0,      1,      NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
diff --git a/clients/Tests/SQL-dump.stable.out.int128 
b/clients/Tests/SQL-dump.stable.out.int128
--- a/clients/Tests/SQL-dump.stable.out.int128
+++ b/clients/Tests/SQL-dump.stable.out.int128
@@ -951,7 +951,7 @@ create filter function "like"(val string
 
 create procedure listdir(dirname string) external name fits.listdir;
 create procedure listdirpat(dirname string,pat string) external name 
fits.listdirpattern;
-create function sys.malfunctions() returns table("signature" string, "address" 
string, "comment" string) external name "manual"."functions";
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
 create function "masklen" (p inet) returns int external name inet."masklen";
 create function mbr(geom geometry) returns mbr external name geom."mbr";
 create function sys.md5(v string) returns string external name clients.md5sum;
@@ -2122,7 +2122,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "ltrim",        "ltrim",        "str",  0,      1,      false,  
false,  false   ]
 [ "sys",       "ltrim",        "ltrim",        "str",  0,      1,      false,  
false,  false   ]
 [ "sys",       "ltrim",        "ltrim",        "str",  0,      1,      false,  
false,  false   ]
-[ "sys",       "malfunctions", "create function sys.malfunctions() returns 
table(\"signature\" string, \"address\" string, \"comment\" string) external 
name \"manual\".\"functions\";",       "manual",       1,      5,      false,  
false,  false   ]
+[ "sys",       "malfunctions", "create function sys.malfunctions() returns 
table(\"module\" string, \"function\" string, \"signature\" string, \"address\" 
string, \"comment\" string) external name \"manual\".\"functions\";",       
"manual",       1,      5,      false,  false,  false   ]
 [ "sys",       "masklen",      "create function \"masklen\" (p inet) returns 
int external name inet.\"masklen\";",     "inet", 1,      1,      false,  
false,  false   ]
 [ "sys",       "max",  "max",  "aggr", 0,      3,      false,  false,  false   
]
 [ "sys",       "mbr",  "create function mbr(geom geometry) returns mbr 
external name geom.\"mbr\";",   "geom", 1,      1,      false,  false,  false   
]
@@ -3856,7 +3856,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "ltrim",        "arg_1",        "clob", 0,      0,      1,      
"arg_2",        "clob", 0,      0,      1,      NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "ltrim",        "arg_1",        "varchar",      0,      0,      
1,      NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "ltrim",        "arg_1",        "varchar",      0,      0,      
1,      "arg_2",        "varchar",      0,      0,      1,      NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
-[ "sys",       "malfunctions", "address",      "clob", 0,      0,      0,      
"comment",      "clob", 0,      0,      0,      NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
+[ "sys",       "malfunctions", "function",     "clob", 0,      0,      0,      
"signature",    "clob", 0,      0,      0,      "address",      "clob", 0,      
0,      0,      "comment",      "clob", 0,      0,      0,      NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
 [ "sys",       "masklen",      "p",    "inet", 0,      0,      1,      NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "max",  "arg",  "any",  0,      0,      1,      NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "mbr",  "geom", "geometry",     0,      0,      1,      NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
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
@@ -904,7 +904,6 @@ str CLTquit(Client cntxt, MalBlkPtr mb, 
 str CLTremoveUser(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str CLTripemd160sum(str *ret, str *pw);
 str CLTsessions(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CLTsetHistory(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str CLTsetListing(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str CLTsetPassword(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str CLTsetScenario(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -2026,7 +2025,6 @@ void deleteSymbol(Module scope, Symbol p
 str deltaRef;
 str dense_rankRef;
 str depositRef;
-void deriveModule(Module scope, str nme);
 malType destinationType(MalBlkPtr mb, InstrPtr p);
 str diffRef;
 str disconnectRef;
@@ -2061,7 +2059,6 @@ void freeException(str);
 void freeInstruction(InstrPtr p);
 void freeMalBlk(MalBlkPtr mb);
 void freeModule(Module cur);
-void freeModuleList(Module cur);
 void freeStack(MalStkPtr stk);
 void freeSymbol(Symbol s);
 void freeSymbolList(Symbol s);
@@ -2096,6 +2093,7 @@ int getIntConstant(MalBlkPtr mb, int val
 int getLngConstant(MalBlkPtr mb, lng val);
 MalBlkPtr getMalBlkHistory(MalBlkPtr mb, int idx);
 lng getMemoryClaim(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, int i, int flag);
+Module getModuleChain(void);
 str getName(const char *nme);
 str getNameLen(const char *nme, size_t len);
 int getOidConstant(MalBlkPtr mb, oid val);
@@ -2272,6 +2270,7 @@ int mnstr_writeInt_wrap(Stream *S, int *
 str mnstr_writeIntwrap(void *ret, Stream *S, int *data);
 int mnstr_write_string(Stream *S, str data);
 str mnstr_write_stringwrap(void *ret, Stream *S, str *data);
+Module moduleIndex[256][256];
 char monet_characteristics[PATHLENGTH];
 char monet_cwd[PATHLENGTH];
 size_t monet_memory;
@@ -2426,7 +2425,6 @@ str setAccessRef;
 void setArgType(MalBlkPtr mb, InstrPtr p, int i, int tpe);
 InstrPtr setArgument(MalBlkPtr mb, InstrPtr p, int idx, int varid);
 void setHeartbeat(int delay);
-void setModuleJump(str nme, Module cur);
 void setPolymorphic(InstrPtr p, int tpe, int force);
 void setReturnArgument(InstrPtr p, int varid);
 str setScenario(Client c, str nme);
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -339,6 +339,9 @@ main(int argc, char **argv)
        }
        conn = mapi_get_from(dbh);
        while ((n = mnstr_read(conn, buffer + len, 1, buflen - len-1)) >= 0) {
+               if (n == 0 &&
+                   (n = mnstr_read(conn, buffer + len, 1, buflen - len-1)) <= 
0)
+                       break;
                buffer[len + n] = 0;
                response = buffer;
                if( debug)
diff --git a/clients/mapiclient/tachograph.c b/clients/mapiclient/tachograph.c
--- a/clients/mapiclient/tachograph.c
+++ b/clients/mapiclient/tachograph.c
@@ -521,6 +521,9 @@ main(int argc, char **argv)
        }
        conn = mapi_get_from(dbh);
        while ((n = mnstr_read(conn, buffer + len, 1, buflen - len-1)) >= 0) {
+               if (n == 0 &&
+                   (n = mnstr_read(conn, buffer + len, 1, buflen - len-1)) <= 
0)
+                       break;
                buffer[len + n] = 0;
                response = buffer;
                while ((e = strchr(response, '\n')) != NULL) {
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1877,7 +1877,8 @@ main(int argc, char **argv)
                resetTomograph();
                conn = mapi_get_from(dbh);
                while ((m = mnstr_read(conn, buffer + len, 1, buflen - len-1)) 
>= 0) {
-                       if (m == 0 && (m = mnstr_read(conn, buffer + len, 1, 
buflen - len-1)) <= 0)
+                       if (m == 0 &&
+                           (m = mnstr_read(conn, buffer + len, 1, buflen - 
len-1)) <= 0)
                                break;
                        buffer[len + m] = 0;
                        response = buffer;
diff --git a/monetdb5/mal/Makefile.ag b/monetdb5/mal/Makefile.ag
--- a/monetdb5/mal/Makefile.ag
+++ b/monetdb5/mal/Makefile.ag
@@ -9,8 +9,7 @@ INCLUDES = ../../common/options \
                   ../../common/utils \
                   ../../clients/mapilib \
                   ../../gdk \
-                  ../optimizer \
-                  $(READLINE_INCS) 
+                  ../optimizer
 MTSAFE
 
 lib_mal = {
diff --git a/monetdb5/mal/mal_atom.c b/monetdb5/mal/mal_atom.c
--- a/monetdb5/mal/mal_atom.c
+++ b/monetdb5/mal/mal_atom.c
@@ -161,27 +161,28 @@ int malAtomProperty(MalBlkPtr mb, InstrP
  * acceptable for the kernel.
  */
 
-void malAtomDefinition(stream *out, str name, int tpe)
+int
+malAtomDefinition(stream *out, str name, int tpe)
 {
        int i;
 
        if (strlen(name) >= IDLENGTH) {
                showException(out, SYNTAX, "atomDefinition", "Atom name '%s' 
too long", name);
-               return;
+               return -1;
        }
        if (ATOMindex(name) >= 0) {
 #ifndef HAVE_EMBEDDED /* we can restart embedded MonetDB, making this an 
expected error */
                showException(out, TYPE, "atomDefinition", "Redefinition of 
atom '%s'", name);
 #endif
-               return;
+               return -1;
        }
        if (tpe < 0 || tpe >= GDKatomcnt) {
                showException(out, TYPE, "atomDefinition", "Undefined atom 
inheritance '%s'", name);
-               return;
+               return -1;
        }
 
        if (strlen(name) >= sizeof(BATatoms[0].name))
-               return;
+               return -1;
        i = ATOMallocate(name);
        /* overload atom ? */
        if (tpe) {
@@ -193,6 +194,7 @@ void malAtomDefinition(stream *out, str 
                BATatoms[i].storage = i;
                BATatoms[i].linear = 0;
        }
+       return 0;
 }
 /*
  * User defined modules may introduce fixed sized types
diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -342,7 +342,6 @@ MCforkClient(Client father)
                /* reuse the scopes wherever possible */
                if (son->nspace == 0)
                        son->nspace = newModule(NULL, putName("child"));
-               son->nspace->outer = father->nspace->outer;
        }
        return son;
 }
diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -517,7 +517,7 @@ retryRead:
                                        continue;
                                }
                                for (i = 0; i < MAXSCOPE; i++) {
-                                       fs = fsym->subscope[i];
+                                       fs = fsym->space[i];
                                        while (fs != NULL) {
                                                printSignature(out, fs, 0);
                                                fs = fs->peer;
@@ -525,13 +525,10 @@ retryRead:
                                }
                                continue;
                        } else{
-                               Module s;
-                               mnstr_printf(out,"#");
-                               for( s= cntxt->nspace; s; s= s->outer) {
-                                       mnstr_printf(out,"%s",s->name);
-                                       if( s->subscope==0) 
mnstr_printf(out,"?");
-                                       if(s->outer) mnstr_printf(out,",");
-                               }
+                               Module m;
+                               mnstr_printf(out,"#%s ",cntxt->nspace->name);
+                               for( m = getModuleChain(); m; m = m->next)
+                                       mnstr_printf(out,"%s ",m->name);
                                mnstr_printf(out,"\n");
                        }
                }
@@ -586,7 +583,7 @@ retryRead:
                                                continue;
                                        }
                                        for (i = 0; i < MAXSCOPE; i++) {
-                                               fs = fsym->subscope[i];
+                                               fs = fsym->space[i];
                                                while (fs != NULL) {
                                                        printStack(out, 
fs->def, 0);
                                                        fs = fs->peer;
@@ -603,7 +600,7 @@ retryRead:
                                }
                                /* display the overloaded symbol definition */
                                for (i = 0; i < MAXSCOPE; i++) {
-                                       fs = fsym->subscope[i];
+                                       fs = fsym->space[i];
                                        while (fs != NULL) {
                                                if (strcmp(fs->name, fcnname) 
== 0)
                                                        printStack(out, 
fs->def, 0);
@@ -874,7 +871,7 @@ retryRead:
                                                continue;
                                        }
                                        for (i = 0; i < MAXSCOPE; i++) {
-                                               fs = fsym->subscope[i];
+                                               fs = fsym->space[i];
                                                while (fs != NULL) {
                                                        printFunction(out, 
fs->def, 0, lstng);
                                                        fs = fs->peer;
diff --git a/monetdb5/mal/mal_errors.h b/monetdb5/mal/mal_errors.h
--- a/monetdb5/mal/mal_errors.h
+++ b/monetdb5/mal/mal_errors.h
@@ -60,7 +60,7 @@
 #define INTERNAL_OBJ_CREATE "Can not create object"
 #define INTERNAL_AUTHORIZATION "authorization BATs not empty"
 
-#define MAL_MALLOC_FAIL        "could not allocate space for"
+#define MAL_MALLOC_FAIL        "could not allocate space"
 #define MAL_STACK_FAIL "Running out of stack space."
 #define MAL_CALLDEPTH_FAIL     "Recursive call limit reached."
 
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
@@ -43,7 +43,7 @@ isExceptionVariable(str nme){
        return 0;
 }
 
-static char *M5OutOfMemory = "Memory allocation failed.";
+static char *M5OutOfMemory = "Out of memory. Memory allocation failed.";
 
 /**
  * Internal helper function for createException and
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to