MonetDB: sessions - Move the workers/memory status to clients. S...
Changeset: f15d5695796f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f15d5695796f Modified Files: clients/Tests/exports.stable.out monetdb5/mal/Tests/performanceTests/run monetdb5/mal/mal.h monetdb5/mal/mal_client.c monetdb5/mal/mal_client.h monetdb5/mal/mal_dataflow.c monetdb5/mal/mal_resource.c monetdb5/mal/mal_resource.h monetdb5/mal/mal_runtime.c monetdb5/mal/mal_runtime.h monetdb5/modules/mal/sysmon.c sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6219.stable.out sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6432.stable.err sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6432.stable.out sql/test/BugTracker-2017/Tests/sqlsmith04.stable.out sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.sql sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.stable.out Branch: sessions Log Message: Move the workers/memory status to clients. Some cleanup and prepare for more decisions. diffs (truncated from 556 to 300 lines): 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 @@ -1347,7 +1347,7 @@ str LIKEjoin(bat *r1, bat *r2, const bat str LIKEjoin1(bat *r1, bat *r2, const bat *lid, const bat *rid, const bat *slid, const bat *srid, const bit *nil_matches, const lng *estimate); str MACROprocessor(Client cntxt, MalBlkPtr mb, Symbol t); int MAL_MAXCLIENTS; -int MALadmission(lng argclaim, lng hotclaim); +int MALadmission(Client cntxt, lng argclaim, lng hotclaim); str MALassertBit(void *ret, bit *val, str *msg); str MALassertHge(void *ret, hge *val, str *msg); str MALassertInt(void *ret, int *val, str *msg); @@ -2356,8 +2356,6 @@ int mayhaveSideEffects(Client cntxt, Mal void mdbDump(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); str mdbRef; void mdbSetBreakRequest(Client cntxt, MalBlkPtr mb, str request, char cmd); -int memoryclaims; -lng memorypool; str mergecandRef; str mergepackRef; str minRef; diff --git a/monetdb5/mal/Tests/performanceTests/run b/monetdb5/mal/Tests/performanceTests/run --- a/monetdb5/mal/Tests/performanceTests/run +++ b/monetdb5/mal/Tests/performanceTests/run @@ -1,5 +1,7 @@ #!/bin/bash +# NEEDS UPDATES + iter=5 tsts="base tst400a tst400bHuge tst400cHuge tst400d tst400e tst901a tst901b" diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -89,8 +89,6 @@ mal_export lng MALdebug; mal_export char monet_cwd[FILENAME_MAX]; mal_export size_t monet_memory; mal_export charmonet_characteristics[4096]; -mal_export lng memorypool; /* memory claimed by concurrent threads */ -mal_export int memoryclaims;/* number of threads active with expensive operations */ mal_export stream *maleventstream; #ifdef HAVE_HGE 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 @@ -249,6 +249,7 @@ MCinitClientRecord(Client c, oid user, b c->memorylimit = 0; c->querytimeout = 0; c->sessiontimeout = 0; + c->workers = c->memory = 0; c->itrace = 0; c->errbuf = 0; @@ -372,6 +373,8 @@ MCforkClient(Client father) son->memorylimit = father->memorylimit; son->querytimeout = father->querytimeout; son->sessiontimeout = father->sessiontimeout; + son->workers = father->workers; + son->memory = father->memory; if (son->prompt) GDKfree(son->prompt); @@ -441,6 +444,7 @@ MCfreeClient(Client c) c->memorylimit = 0; c->querytimeout = 0; c->sessiontimeout = 0; + c->workers = c->memory = 0; c->user = oid_nil; if( c->username){ GDKfree(c->username); diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h --- a/monetdb5/mal/mal_client.h +++ b/monetdb5/mal/mal_client.h @@ -78,7 +78,9 @@ typedef struct CLIENT { /* * For program debugging and performance trace we keep the actual resource claims. */ - time_t lastcmd;/* set when query is received */ + time_t lastcmd;/* set when query is received */ + int workers;/* Actual number of concurrent workers */ + int memory; /* Actual memory claim highwater mark */ /* The user can request a TRACE SQL statement, calling for collecting the events locally */ BAT *profticks; diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c --- a/monetdb5/mal/mal_dataflow.c +++ b/monetdb5/mal/mal_dataflow.c @@ -187,7 +187,6 @@ q_enqueue(Queue *q,
MonetDB: default - Use right types to match SQL definitions
Changeset: 1ff258f4636f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ff258f4636f Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out monetdb5/modules/mal/clients.c monetdb5/modules/mal/clients.mal Branch: default Log Message: Use right types to match SQL definitions diffs (288 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 @@ -10750,34 +10750,40 @@ stdout of test 'MAL-signatures` in direc [ "clients", "getLogins","command clients.getLogins() (user:bat[:oid], start:bat[:str]) ", "CLTLogin;","Pseudo bat of client id and login time." ] [ "clients", "getPasswordHash", "pattern clients.getPasswordHash(user:str):str ", "CLTgetPasswordHash;", "Return the password hash of the given user"] [ "clients", "getScenario", "pattern clients.getScenario():str ", "CLTgetScenario;", "Retrieve current scenario name." ] -[ "clients", "getTimeout", "pattern clients.getTimeout() (q:lng, s:lng) ", "CLTgetTimeout;", "A query is aborted after q milliseconds (q=0 means run undisturbed).\nThe session timeout aborts the connection after spending too\nmany seconds on query processing." ] [ "clients", "getUsername", "pattern clients.getUsername():str ", "CLTgetUsername;", "Return the username of the currently logged in user" ] [ "clients", "getUsers", "pattern clients.getUsers() (X_0:bat[:oid], X_1:bat[:str]) ", "CLTgetUsers;", "return a BAT with user id and one with name available in the system" ] +[ "clients", "getprofile", "pattern clients.getprofile() (opt:str, q:lng, s:lng, w:int, m:lng) ", "CLTgetProfile;", "Retrieve the profile settings for a client"] [ "clients", "md5sum", "command clients.md5sum(pw:str):str ", "CLTmd5sum;", "Return hex string representation of the MD5 hash of the given string" ] -[ "clients", "querytimeout", "pattern clients.querytimeout(sid:bte, n:lng):void ", "CLTqueryTimeout;", "" ] -[ "clients", "querytimeout", "pattern clients.querytimeout(sid:int, n:lng):void ", "CLTqueryTimeout;", "" ] -[ "clients", "querytimeout", "pattern clients.querytimeout(sid:sht, n:lng):void ", "CLTqueryTimeout;", "" ] [ "clients", "quit", "pattern clients.quit():void ", "CLTquit;", "Terminate the client session." ] [ "clients", "quit", "pattern clients.quit(idx:int):void ", "CLTquit;", "Terminate the session for a single client using a soft error.\nIt is the privilige of the console user." ] [ "clients", "removeUser", "pattern clients.removeUser(nme:str):void ", "CLTremoveUser;", "Remove the given user from the system" ] [ "clients", "ripemd160sum", "command clients.ripemd160sum(pw:str):str ", "CLTripemd160sum;", "Return hex string representation of the RIPEMD160 hash of the given string"] -[ "clients", "sessiontimeout", "pattern clients.sessiontimeout(sid:bte, n:lng):void ", "CLTsessionTimeout;", "Set the session timeout for a particulat session id" ] -[ "clients", "sessiontimeout", "pattern clients.sessiontimeout(sid:int, n:lng):void ", "CLTsessionTimeout;", "Set the session timeout for a particulat session id" ] -[ "clients", "sessiontimeout", "pattern clients.sessiontimeout(sid:sht, n:lng):void ", "CLTsessionTimeout;", "Set the session timeout for a particulat session id" ] [ "clients", "setListing", "pattern clients.setListing(flag:int):int ", "CLTsetListing;", "Turn on/off echo of MAL instructions:\n\t1 - echo input,\n\t2 - show mal instruction,\n\t4 - show details of type resolutoin, \n\t8 - show binding information." ] [ "clients", "setPassword", "pattern clients.setPassword(user:str, pass:str):void ","CLTsetPassword;", "Set the password for the given user" ] [ "clients", "setScenario", "pattern clients.setScenario(msg:str):str ", "CLTsetScenario;", "Switch to other scenario handler, return previous one."] +[ "clients", "setmemorylimit", "pattern clients.setmemorylimit(n:lng):void ", "CLTsetmemorylimit;", "" ] +[ "clients", "setmemorylimit", "pattern clients.setmemorylimit(sid:int, n:lng):void ", "CLTsetmemorylimit;", "Limit the memory claim in MB per query"] +[ "clients", "setoptimizer", "pattern clients.setoptimizer(opt:str):void ", "CLTsetoptimizer;", "" ] +[ "clients", "setoptimizer", "pattern clients.setoptimizer(sid:int, opt:str):void ", "CLTsetoptimizer;", "Set the session optimizer" ] [ "clients", "setprinttimeout", "command clients.setprinttimeout(n:int):void ", "CLTsetPrintTimeout;", "Print running query
MonetDB: mosaic - Introduce nil semantics for raw compression.
Changeset: e9c766ce78cb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9c766ce78cb Added Files: monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.MAL.py monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.options5 monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.err monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.out monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.raw.MAL.py monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.raw.options5 monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.raw.stable.err monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.raw.stable.out monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.raw.MAL.py monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.raw.options5 monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.raw.stable.err monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.raw.stable.out monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.raw.MAL.py monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.raw.options5 monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.raw.stable.err monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.raw.stable.out monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.raw.MAL.py monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.raw.options5 monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.raw.stable.err monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.raw.stable.out Modified Files: monetdb5/modules/mosaic/Tests/All monetdb5/modules/mosaic/mosaic.c monetdb5/modules/mosaic/mosaic_raw.c monetdb5/modules/mosaic/mosaic_raw.h Branch: mosaic Log Message: Introduce nil semantics for raw compression. diffs (truncated from 6634 to 300 lines): diff --git a/monetdb5/modules/mosaic/Tests/All b/monetdb5/modules/mosaic/Tests/All --- a/monetdb5/modules/mosaic/Tests/All +++ b/monetdb5/modules/mosaic/Tests/All @@ -35,6 +35,11 @@ mosaic_lng_1.raw mosaic_oid_1.raw mosaic_date_1.raw mosaic_timestamp_1.raw +mosaic_bit_with_nills_1.raw +mosaic_lng_with_nills_1.raw +mosaic_oid_with_nills_1.raw +mosaic_date_with_nills_1.raw +mosaic_timestamp_with_nills_1.raw mosaic_bit_2.runlength mosaic_lng_2.runlength diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.MAL.py b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.MAL.py copy from monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.MAL.py copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.MAL.py diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.options5 b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.options5 copy from monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.options5 copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.options5 diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.err copy from monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.err --- a/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err +++ b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.err @@ -1,4 +1,4 @@ -stderr of test 'mosaic_bit_with_nills_1.frame` in directory 'monetdb5/modules/mosaic` itself: +stderr of test 'mosaic_bit_with_nills_1.raw` in directory 'monetdb5/modules/mosaic` itself: # 13:33:23 > diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.out copy from monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.out --- a/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out +++ b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.raw.stable.out @@ -1,4 +1,4 @@ -stdout of test 'mosaic_bit_with_nills_1.frame` in directory 'monetdb5/modules/mosaic` itself: +stdout of test 'mosaic_bit_with_nills_1.raw` in directory 'monetdb5/modules/mosaic` itself: # 16:26:45 > @@ -16,604 +16,95 @@ stdout of test 'mosaic_bit_with_nills_1. # Listening for connection requests on mapi:monetdb://aris-XPS-13-9380:34578/ # Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-26512/.s.monetdb.34578 # MonetDB/SQL module loaded - -# 16:26:45 > -# 16:26:45 > "mclient" "-lmal" "-ftest" "-tnone" "-Eutf-8" "--host=/var/tmp/mtest-26512" "--port=34578" -# 16:26:45 > +MOScompress_raw +#BATmosaic: mosaic construction 21 usec +MOSdecompress_raw +MOSselect_raw +MOSselect_raw +MOSthetaselect_raw +MOSselect_raw
MonetDB: mosaic - Update comment.
Changeset: bdb9b00d02bc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bdb9b00d02bc Modified Files: monetdb5/modules/mosaic/mosaic_frame.c Branch: mosaic Log Message: Update comment. diffs (41 lines): diff --git a/monetdb5/modules/mosaic/mosaic_frame.c b/monetdb5/modules/mosaic/mosaic_frame.c --- a/monetdb5/modules/mosaic/mosaic_frame.c +++ b/monetdb5/modules/mosaic/mosaic_frame.c @@ -275,35 +275,8 @@ MOSdecompress_frame(MOStask task) #define SELECT(Boolean) (Boolean) /* generic range select * - * Return a BAT with the OID values of b for qualifying tuples. The - * return BAT is sorted (i.e. in the same order as the input BAT). - * - * If s is non-NULL, it is a list of candidates. s must be sorted. - * - * tl may not be NULL, li, hi, and anti must be either 0 or 1. - * - * If th is NULL, hi is ignored. - * - * If anti is 0, qualifying tuples are those whose value is between tl - * and th (as in x >[=] tl && x <[=] th, where equality depends on li - * and hi--so if tl > th, nothing will be returned). If li or hi is - * 1, the respective boundary is inclusive, otherwise exclusive. If - * th is NULL it is taken to be equal to tl, turning this into an - * equi- or point-select. Note that for a point select to return - * anything, li (and hi if th was not NULL) must be 1. There is a - * special case if tl is nil and th is NULL. This is the only way to - * select for nil values. - * - * If anti is 1, the result is the complement of what the result would - * be if anti were 0, except that nils are filtered out. - * - * In brief: - * - if tl==nil and th==NULL and anti==0, return all nils (only way to - * get nils); - * - it tl==nil and th==nil, return all but nils; - * - if tl==nil and th!=NULL, no lower bound; - * - if th==NULL or tl==th, point (equi) select; - * - if th==nil, no upper bound + * This macro is based on the combined behavior of ALGselect2 and BATselect. + * It should return the same output on the same input. * * A complete breakdown of the various arguments follows. Here, v, v1 * and v2 are values from the appropriate domain, and ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: tracer - Added tracer to sql_mem
Changeset: 9430ba64a724 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9430ba64a724 Modified Files: gdk/gdk_tracer.h sql/backends/monet5/sql_scenario.c sql/include/sql_mem.h Branch: tracer Log Message: Added tracer to sql_mem diffs (158 lines): diff --git a/gdk/gdk_tracer.h b/gdk/gdk_tracer.h --- a/gdk/gdk_tracer.h +++ b/gdk/gdk_tracer.h @@ -26,7 +26,8 @@ typedef enum { // ALL ALL, - + ALLOC, + // SQL SQL_ALL, SQL_ATOM_TR, diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -562,7 +562,7 @@ SQLinit(Client c) freeException(other); if (msg) - fprintf(stderr, "%s", msg); + INFO(SQL_ALL, "%s\n", msg); #endif } else {/* handle upgrades */ if (!m->sa) diff --git a/sql/include/sql_mem.h b/sql/include/sql_mem.h --- a/sql/include/sql_mem.h +++ b/sql/include/sql_mem.h @@ -10,6 +10,7 @@ #define _SQL_MEM_H_ #include "gdk.h" +#include "gdk_tracer.h" #define SQL_OK 1 #define SQL_ERR 0 @@ -79,74 +80,58 @@ extern size_t sa_size( sql_allocator *sa #define _strlen(s) (int)strlen(s) #if !defined(NDEBUG) && !defined(STATIC_CODE_ANALYSIS) && defined(__GNUC__) -#define sa_alloc(sa, sz) \ - ({ \ - sql_allocator *_sa = (sa); \ - size_t _sz = (sz); \ - void *_res = sa_alloc(_sa, _sz);\ - ALLOCDEBUG \ - fprintf(stderr, \ - "#sa_alloc(%p,%zu) -> %p" \ - " %s[%s:%d]\n", \ - _sa, _sz, _res, \ - __func__, __FILE__, __LINE__); \ - _res; \ +#define sa_alloc(sa, sz) \ + ({ \ + sql_allocator *_sa = (sa); \ + size_t _sz = (sz); \ + void *_res = sa_alloc(_sa, _sz); \ + DEBUG(ALLOC, \ + "sa_alloc(%p, %zu) -> %p\n", \ + _sa, _sz, _res); \ + _res; \ }) -#define sa_zalloc(sa, sz) \ - ({ \ - sql_allocator *_sa = (sa); \ - size_t _sz = (sz); \ - void *_res = sa_zalloc(_sa, _sz); \ - ALLOCDEBUG \ - fprintf(stderr, \ - "#sa_zalloc(%p,%zu) -> %p" \ - " %s[%s:%d]\n", \ - _sa, _sz, _res, \ - __func__, __FILE__, __LINE__); \ - _res; \ +#define sa_zalloc(sa, sz) \ + ({ \ + sql_allocator *_sa = (sa); \ + size_t _sz = (sz); \ + void *_res = sa_zalloc(_sa, _sz); \ + DEBUG(ALLOC, \ + "sa_zalloc(%p, %zu) -> %p\n", \ + _sa, _sz, _res); \ + _res; \ }) -#define sa_realloc(sa, ptr,
MonetDB: default - Merge with Nov2019
Changeset: 2e8a54c6fce0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2e8a54c6fce0 Added Files: sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql Removed Files: clients/mapiclient/mnc.c sql/test/datacell/Tests/All sql/test/datacell/Tests/crashonundefined.sql sql/test/datacell/Tests/crashonundefined.stable.err sql/test/datacell/Tests/crashonundefined.stable.out sql/test/datacell/Tests/garbagecollect.sql sql/test/datacell/Tests/garbagecollect.stable.err sql/test/datacell/Tests/garbagecollect.stable.out sql/test/datacell/Tests/select.sql sql/test/datacell/Tests/select.stable.err sql/test/datacell/Tests/select.stable.out sql/test/datacell/Tests/topbasket.sql sql/test/datacell/Tests/topbasket.stable.err sql/test/datacell/Tests/topbasket.stable.out Modified Files: NT/mkodbcwxs.py NT/mksqlwxs.py clients/Tests/MAL-signatures.stable.out.int128 clients/mapiclient/Makefile.ag gdk/gdk_bbp.c monetdb5/modules/atoms/00_json_hge.mal sql/ChangeLog.Nov2019 sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_upgrades.c sql/common/sql_types.c sql/scripts/40_json.sql sql/test/BugTracker-2019/Tests/All sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/sql_xml/Tests/funcs.sql sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 Branch: default Log Message: Merge with Nov2019 diffs (truncated from 1320 to 300 lines): diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -55,16 +55,13 @@ def main(): print(r'') print(r'') print(r'') -if vs in ('17', '19'): -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs -d = sorted(os.listdir(msvc))[-1] -msm = '_CRT_%s.msm' % arch -for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): -if msm in f: -fn = f -print(r' ' % (msvc, d, fn)) -else: -print(r' ' % (vs, arch)) +msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs +d = sorted(os.listdir(msvc))[-1] +msm = '_CRT_%s.msm' % arch +for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): +if msm in f: +fn = f +print(r' ' % (msvc, d, fn)) print(r' ' % folder) print(r'') print(r' ') diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -114,16 +114,13 @@ def main(): print(r'') print(r'') print(r'') -if vs in ('17', '19'): -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs -d = sorted(os.listdir(msvc))[-1] -msm = '_CRT_%s.msm' % arch -for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): -if msm in f: -fn = f -print(r' ' % (msvc, d, fn)) -else: -print(r' ' % (vs, arch)) +msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs +d = sorted(os.listdir(msvc))[-1] +msm = '_CRT_%s.msm' % arch +for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): +if msm in f: +fn = f +print(r' ' % (msvc, d, fn)) print(r' ' % folder) print(r'') print(r' ') 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 @@ -15544,8 +15544,6 @@ stdout of test 'MAL-signatures` in direc [ "io","setmallocsuccesscount","command io.setmallocsuccesscount(count:lng):void ","IOsetmallocsuccesscount;", "Set number of mallocs that are allowed to succeed."] [ "io","stdin","pattern io.stdin():bstream ", "io_stdin;", "return the input stream to the database client"] [ "io","stdout", "pattern io.stdout():streams ", "io_stdout;", "return the output stream for the database client" ] -[ "iterator", "filter", "command iterator.filter(name:json, idx:hge, other:str):json ", "JSONfilterArrayDefault_hge;", "" ] -[ "iterator", "filter", "command iterator.filter(name:json, idx:hge):json ","JSONfilterArray_hge;", "" ] [ "iterator", "new", "pattern iterator.new(b:bat[:any_2]) (h:oid, t:any_2) ","ITRbunIterator;", "Process the buns one by one extracted from a void table." ]
MonetDB: Nov2019 - Disable type checking for now on monet5_resol...
Changeset: 7656d09286fb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7656d09286fb Modified Files: sql/backends/monet5/sql_gencode.c Branch: Nov2019 Log Message: Disable type checking for now on monet5_resolve_function. There are more exceptions than rules diffs (55 lines): diff --git a/sql/backends/monet5/sql_gencode.c b/sql/backends/monet5/sql_gencode.c --- a/sql/backends/monet5/sql_gencode.c +++ b/sql/backends/monet5/sql_gencode.c @@ -878,40 +878,42 @@ monet5_resolve_function(ptr M, sql_func InstrPtr sig = getSignature(s); int argc = sig->argc - sig->retc, nfargs = list_length(f->ops), nfres = list_length(f->res); - if ((sig->varargs & VARARGS) == VARARGS && f->vararg) + if ((sig->varargs & VARARGS) == VARARGS || f->vararg || f->varres) return 1; - else if (nfargs == argc && nfres == sig->retc) { /* check for types of inputs and outputs */ + else if (nfargs == argc && (nfres == sig->retc || (sig->retc == 1 && (IS_FILT(f) || IS_PROC(f) { + /* I removed this code because, it was triggering many errors on te SQL <-> MAL translation */ + /* Check for types of inputs and outputs. SQL procedures and filter functions always return 1 value in the MAL implementation bool all_match = true; - if (nfres != 0) { /* if function has output variables, test types are equivalent */ + if (nfres != 0) { if function has output variables, test types are equivalent int i = 0; for (node *n = f->res->h; n && all_match; n = n->next, i++) { sql_arg *arg = (sql_arg *) n->data; int nsql_tpe = arg->type.type->localtype; int nmal_tpe = getArgType(s->def, sig, i); - if (isaBatType(nmal_tpe)) + if (isaBatType(nmal_tpe) || (nmal_tpe & 0377) == TYPE_any) any type is excluded from isaBatType nmal_tpe = getBatType(nmal_tpe); - /* any/void types allways match */ +any/void types allways match if (nsql_tpe != TYPE_any && nmal_tpe != TYPE_any && nsql_tpe != TYPE_void && nmal_tpe != TYPE_void) all_match = nsql_tpe == nmal_tpe; } } - if (all_match && nfargs != 0) { /* if function has arguments, test types are equivalent */ + if (all_match && nfargs != 0) { if function has arguments, test types are equivalent int i = sig->retc; for (node *n = f->ops->h; n && all_match; n = n->next, i++) { sql_arg *arg = (sql_arg *) n->data; int nsql_tpe = arg->type.type->localtype; int nmal_tpe = getArgType(s->def, sig, i); - if (isaBatType(nmal_tpe)) + if (isaBatType(nmal_tpe) || (nmal_tpe & 0377) == TYPE_any) any type is excluded from isaBatType nmal_tpe = getBatType(nmal_tpe); - /* any/void types allways match */ +any/void types allways match if (nsql_tpe != TYPE_any && nmal_tpe != TYPE_any && nsql_tpe != TYPE_void && nmal_tpe != TYPE_void) all_match = nsql_tpe == nmal_tpe; } } - if (all_match) + if (all_match)*/ return 1; } } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: tracer - Undo last commit
Changeset: cb3f499f3ffa for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb3f499f3ffa Modified Files: sql/backends/monet5/wlr.c Branch: tracer Log Message: Undo last commit diffs (13 lines): diff --git a/sql/backends/monet5/wlr.c b/sql/backends/monet5/wlr.c --- a/sql/backends/monet5/wlr.c +++ b/sql/backends/monet5/wlr.c @@ -420,6 +420,9 @@ WLRprocessBatch(void *arg) if ( wlr_tag == wlr_limit) break; } + /* CHECK */ + // Remove this when fprintFunction is fixed! + (void) fflush(stderr); close_stream(c->fdout); SQLexitClient(c); MCcloseClient(c); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: tracer - Removed unused fflush
Changeset: a5364a9a5083 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5364a9a5083 Modified Files: sql/backends/monet5/wlr.c Branch: tracer Log Message: Removed unused fflush diffs (11 lines): diff --git a/sql/backends/monet5/wlr.c b/sql/backends/monet5/wlr.c --- a/sql/backends/monet5/wlr.c +++ b/sql/backends/monet5/wlr.c @@ -420,7 +420,6 @@ WLRprocessBatch(void *arg) if ( wlr_tag == wlr_limit) break; } - (void) fflush(stderr); close_stream(c->fdout); SQLexitClient(c); MCcloseClient(c); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: tracer - Merge with default
Changeset: 669ddcefd233 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=669ddcefd233 Added Files: sql/test/miscellaneous/Tests/select_groupby.sql sql/test/miscellaneous/Tests/select_groupby.stable.err sql/test/miscellaneous/Tests/select_groupby.stable.out Removed Files: sql/test/miscellaneous/README sql/test/miscellaneous/Tests/now.sql sql/test/miscellaneous/Tests/now.stable.err Branch: tracer Log Message: Merge with default diffs (truncated from 636 to 300 lines): diff --git a/sql/test/miscellaneous/README b/sql/test/miscellaneous/README deleted file mode 100644 --- a/sql/test/miscellaneous/README +++ /dev/null @@ -1,2 +0,0 @@ -The tests in this director produce time/system/ dependent output. -It is included to ensure some testing diff --git a/sql/test/miscellaneous/Tests/now.sql b/sql/test/miscellaneous/Tests/now.sql deleted file mode 100644 --- a/sql/test/miscellaneous/Tests/now.sql +++ /dev/null @@ -1,1 +0,0 @@ -select now(); diff --git a/sql/test/miscellaneous/Tests/now.stable.err b/sql/test/miscellaneous/Tests/now.stable.err deleted file mode 100644 --- a/sql/test/miscellaneous/Tests/now.stable.err +++ /dev/null @@ -1,37 +0,0 @@ -stderr of test 'now` in directory 'sql/test/miscellaneous` itself: - - -# 17:34:22 > -# 17:34:22 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33116" "--set" "mapi_usock=/var/tmp/mtest-28433/.s.monetdb.33116" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/home/manegold/Monet/_/prefix/_/var/MonetDB/mTests_sql_test_miscellaneous" "--set" "mal_listing=0" "--set" "embedded_r=yes" -# 17:34:22 > - -# builtin opt gdk_dbpath = /home/manegold/Monet/_/prefix/_/var/monetdb5/dbfarm/demo -# builtin opt gdk_debug = 0 -# builtin opt gdk_vmtrim = no -# builtin opt monet_prompt = > -# builtin opt monet_daemon = no -# builtin opt mapi_port = 5 -# builtin opt mapi_open = false -# builtin opt mapi_autosense = false -# builtin opt sql_optimizer = default_pipe -# builtin opt sql_debug = 0 -# cmdline opt gdk_nr_threads = 0 -# cmdline opt mapi_open = true -# cmdline opt mapi_port = 33116 -# cmdline opt mapi_usock = /var/tmp/mtest-28433/.s.monetdb.33116 -# cmdline opt monet_prompt = -# cmdline opt mal_listing = 2 -# cmdline opt gdk_dbpath = /home/manegold/Monet/_/prefix/_/var/MonetDB/mTests_sql_test_miscellaneous -# cmdline opt mal_listing = 0 -# cmdline opt embedded_r = yes -# cmdline opt gdk_debug = 536870922 - -# 17:34:23 > -# 17:34:23 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-28433" "--port=33116" -# 17:34:23 > - - -# 17:34:23 > -# 17:34:23 > "Done." -# 17:34:23 > - diff --git a/sql/test/miscellaneous/Tests/select_groupby.sql b/sql/test/miscellaneous/Tests/select_groupby.sql new file mode 100644 --- /dev/null +++ b/sql/test/miscellaneous/Tests/select_groupby.sql @@ -0,0 +1,186 @@ +create schema "myschema"; +create sequence "myschema"."myseq"; +create table myschema.mytable +( + "first" char(100), + "second" double, + "third" double, + "fourth" clob, + "fifth" clob, + "sixth" double, + "seventh" clob, + "eighth" date, + "ninth" double, + "tenth" double, + "eleventh" char(100), + "tweelfth" char(4), + "thirteenth" char(50), + "fourteenth" char(50), + "fifteenth" clob, + "sixteenth" char(100), + "seventeenth" char(100), + "eighteenth" char(30), + "nineteenth" double, + "twentieth" char(100), + "twentieth-first" clob, + "twentieth-second" double, + "twentieth-third" double, + "twentieth-fourth" double, + "twentieth-fifth" double, + "twentieth-sixth" double, + "twentieth-seventh" char(100), + "twentieth-eighth" char(100), + "twentieth-ninth" char(100), + "thirtieth" char(14), + "thirtieth-first" bigint, + "thirtieth-second" bigint, + "thirtieth-third" bigint, + "thirtieth-fourth" bigint, + "thirtieth-fifth" bigint, + "thirtieth-sixth" bigint, + "thirtieth-seventh" bigint, + "thirtieth-eighth" bigint, + "thirtieth-ninth" bigint, + "fortieth" bigint, + "fortieth-first" tinyint, + "fortieth-second" blob, + "fortieth-third" int default next value for "myschema"."myseq" +); +INSERT INTO myschema.mytable ("first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "tweelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth", + "seventeenth", "eighteenth", "nineteenth", "twentieth", "twentieth-first", "twentieth-second", "twentieth-third", "twentieth-fourth", "twentieth-fifth", "twentieth-sixth", + "twentieth-seventh", "twentieth-eighth", "twentieth-ninth",
MonetDB: tracer - Merge with default
Changeset: a84ca4644f52 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a84ca4644f52 Modified Files: NT/monetdb_config.h.in clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out clients/mapiclient/dump.c clients/mapiclient/mhelp.c clients/mapiclient/msqldump.c common/utils/mutils.c gdk/gdk_analytic_bounds.c gdk/gdk_analytic_func.c gdk/gdk_posix.c gdk/gdk_private.h gdk/gdk_system.c gdk/gdk_system.h gdk/gdk_utils.c geom/monetdb5/geom.c geom/monetdb5/geom_upgrade.c monetdb5/mal/mal_builder.c monetdb5/mal/mal_builder.h monetdb5/mal/mal_client.c monetdb5/mal/mal_client.h monetdb5/mal/mal_instruction.c monetdb5/mal/mal_instruction.h monetdb5/mal/mal_interpreter.c monetdb5/mal/mal_module.c monetdb5/mal/mal_profiler.c monetdb5/mal/mal_runtime.c monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/mtime_analytic.c monetdb5/modules/mal/Tests/inspect05.stable.out.int128 monetdb5/modules/mal/Tests/mat.malC monetdb5/modules/mal/Tests/mat.stable.out monetdb5/modules/mal/clients.c monetdb5/modules/mal/clients.h monetdb5/modules/mal/clients.mal monetdb5/modules/mal/manual.c monetdb5/modules/mal/mat.c monetdb5/modules/mal/mat.mal monetdb5/modules/mal/profiler.c monetdb5/modules/mal/profiler.mal monetdb5/modules/mal/tokenizer.c monetdb5/optimizer/opt_pipes.c sql/backends/monet5/UDF/udf/Tests/udf-fuse.stable.out sql/backends/monet5/UDF/udf/Tests/udf-reverse.stable.out sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql.mal sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_optimizer.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_upgrades.c sql/backends/monet5/sql_upgrades.h sql/backends/monet5/vaults/fits/fits.c sql/backends/monet5/vaults/shp/shp.c sql/scripts/22_clients.sql sql/scripts/26_sysmon.sql sql/scripts/99_system.sql sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_psm.c sql/server/rel_rel.c sql/server/rel_schema.c sql/server/rel_updates.c sql/server/sql_parser.y sql/server/sql_scan.c sql/storage/store.c sql/test/BugConstraints/Tests/check_constraint.SF-1714829.stable.err sql/test/BugDay_2005-12-19_2.9.3/Tests/default_next_value_for_non_ex_seq.SF.1246631.stable.err sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out sql/test/BugTracker-2012/Tests/create_function.Bug-3172.sql sql/test/BugTracker-2012/Tests/create_function.Bug-3172.stable.err sql/test/BugTracker-2012/Tests/create_function.Bug-3172.stable.out sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2012/Tests/table_function_with_column_subselects.Bug-3172.sql sql/test/BugTracker-2012/Tests/table_function_with_column_subselects.Bug-3172.stable.err sql/test/BugTracker-2013/Tests/pivot.Bug-3339.stable.err sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.err sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2016/Tests/CREATE_INDEX_breaks_table_queries.Bug-4053.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out sql/test/BugTracker-2019/Tests/disallow_duplicate_column_aliases.Bug-6723.stable.out sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.stable.out sql/test/BugTracker-2019/Tests/prepare-types.Bug-6724.stable.out sql/test/BugTracker/Tests/bug_in_selection.SF-1892413.stable.err sql/test/BugTracker/Tests/bug_in_selection.SF-1892413.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-0join-query.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-0join-view.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-query.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-view.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-query.stable.out
MonetDB: Apr2019 - Fix comment to reflect code.
Changeset: 39388637cf12 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=39388637cf12 Modified Files: gdk/gdk_select.c Branch: Apr2019 Log Message: Fix comment to reflect code. diffs (13 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1201,7 +1201,8 @@ ilog2(BUN x) * v1 v2 truefalse truex < v1 or x >= v2 * v1 v2 false truetruex <= v1 or x > v2 * v1 v2 truetruetruex < v1 or x > v2 - * v2 v1 ignored ignored ignored NOTHING + * v2 v1 ignored ignored false NOTHING + * v2 v1 ignored ignored truex != nil */ BAT * BATselect(BAT *b, BAT *s, const void *tl, const void *th, ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mosaic - Whitespace.
Changeset: 31030d8a908c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=31030d8a908c Modified Files: monetdb5/modules/mosaic/Tests/All Branch: mosaic Log Message: Whitespace. diffs (11 lines): diff --git a/monetdb5/modules/mosaic/Tests/All b/monetdb5/modules/mosaic/Tests/All --- a/monetdb5/modules/mosaic/Tests/All +++ b/monetdb5/modules/mosaic/Tests/All @@ -47,6 +47,7 @@ mosaic_lng_1.var mosaic_oid_1.var mosaic_date_1.var mosaic_timestamp_1.var + mosaic_bit_1.capped mosaic_lng_1.capped mosaic_oid_1.capped ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mosaic - Add nil tests for other types of frame compres...
Changeset: fb1aafec91c8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fb1aafec91c8 Added Files: monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.MAL.py monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.options5 monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.mal monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.frame.MAL.py monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.frame.options5 monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.frame.stable.err monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.frame.stable.out monetdb5/modules/mosaic/Tests/mosaic_date_with_nills_1.mal monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.frame.MAL.py monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.frame.options5 monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.frame.stable.err monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.frame.stable.out monetdb5/modules/mosaic/Tests/mosaic_oid_with_nills_1.mal monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.frame.MAL.py monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.frame.options5 monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.frame.stable.err monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.frame.stable.out monetdb5/modules/mosaic/Tests/mosaic_timestamp_with_nills_1.mal Modified Files: monetdb5/modules/mosaic/Tests/All Branch: mosaic Log Message: Add nil tests for other types of frame compression. diffs (truncated from 23357 to 300 lines): diff --git a/monetdb5/modules/mosaic/Tests/All b/monetdb5/modules/mosaic/Tests/All --- a/monetdb5/modules/mosaic/Tests/All +++ b/monetdb5/modules/mosaic/Tests/All @@ -69,7 +69,11 @@ mosaic_lng_1.frame mosaic_oid_1.frame mosaic_date_1.frame mosaic_timestamp_1.frame +mosaic_bit_with_nills_1.frame mosaic_lng_with_nills_1.frame +mosaic_oid_with_nills_1.frame +mosaic_date_with_nills_1.frame +mosaic_timestamp_with_nills_1.frame mosaic_bit_1.prefix mosaic_lng_1.prefix diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.MAL.py b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.MAL.py copy from monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.MAL.py copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.MAL.py diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.options5 b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.options5 copy from monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.options5 copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.options5 diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.err b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err copy from monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.err copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err --- a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.err +++ b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.err @@ -1,4 +1,4 @@ -stderr of test 'mosaic_bit_1.frame` in directory 'monetdb5/modules/mosaic` itself: +stderr of test 'mosaic_bit_with_nills_1.frame` in directory 'monetdb5/modules/mosaic` itself: # 13:33:23 > diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.out b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out copy from monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.out copy to monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out --- a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.out +++ b/monetdb5/modules/mosaic/Tests/mosaic_bit_with_nills_1.frame.stable.out @@ -1,4 +1,4 @@ -stdout of test 'mosaic_bit_1.frame` in directory 'monetdb5/modules/mosaic` itself: +stdout of test 'mosaic_bit_with_nills_1.frame` in directory 'monetdb5/modules/mosaic` itself: # 16:26:45 > @@ -22,53 +22,533 @@ stdout of test 'mosaic_bit_1.frame` in d # 16:26:45 > MOScompress_frame -#BATmosaic: mosaic construction 15 usec +MOScompress_frame +MOScompress_frame +MOScompress_frame +MOScompress_frame +MOScompress_frame +MOScompress_frame +#BATmosaic: mosaic construction 26 usec +MOSdecompress_frame +MOSdecompress_frame +MOSdecompress_frame +MOSdecompress_frame +MOSdecompress_frame +MOSdecompress_frame MOSdecompress_frame MOSselect_frame MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSselect_frame +MOSthetaselect_frame +MOSthetaselect_frame +MOSthetaselect_frame +MOSthetaselect_frame +MOSthetaselect_frame
MonetDB: mosaic - Fixing some testweb compilation errors.
Changeset: 572a419df1a6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=572a419df1a6 Modified Files: monetdb5/modules/mosaic/mosaic_capped.c monetdb5/modules/mosaic/mosaic_var.c Branch: mosaic Log Message: Fixing some testweb compilation errors. diffs (60 lines): diff --git a/monetdb5/modules/mosaic/mosaic_capped.c b/monetdb5/modules/mosaic/mosaic_capped.c --- a/monetdb5/modules/mosaic/mosaic_capped.c +++ b/monetdb5/modules/mosaic/mosaic_capped.c @@ -145,7 +145,7 @@ MOSlayout_capped_hdr(MOStask task, BAT * BUN dictsize = GetCount(task->capped_info); for(i=0; i< dictsize; i++){ - snprintf(buf, BUFSIZ,"capped[%d]",i); + snprintf(buf, BUFSIZ,"capped[%u]",i); if( BUNappend(btech, buf, false) != GDK_SUCCEED || BUNappend(bcount, , false) != GDK_SUCCEED || BUNappend(binput, , false) != GDK_SUCCEED || @@ -291,7 +291,7 @@ do {\ size_t new_bytes= new_keys_size + new_dict_size + new_headers_size;\ \ (CURRENT)->compression_strategy.tag = MOSAIC_CAPPED;\ - (CURRENT)->compression_strategy.cnt = nr_compressed;\ + (CURRENT)->compression_strategy.cnt = (unsigned int) nr_compressed;\ \ (CURRENT)->uncompressed_size+= (BUN) ( nr_compressed * sizeof(TPE));\ (CURRENT)->compressed_size += (wordaligned( MosaicBlkSize, BitVector) + new_bytes - old_bytes);\ @@ -354,7 +354,7 @@ static str vmh->free += GetSizeInBytes(info); vmh->dirty = true; - *length_dict = GetCount(info); + *length_dict = (ulng) GetCount(info); *bits_dict = calculateBits(*length_dict); BBPreclaim(info->dict); diff --git a/monetdb5/modules/mosaic/mosaic_var.c b/monetdb5/modules/mosaic/mosaic_var.c --- a/monetdb5/modules/mosaic/mosaic_var.c +++ b/monetdb5/modules/mosaic/mosaic_var.c @@ -110,7 +110,7 @@ MOSlayout_var_hdr(MOStask task, BAT *bte BUN dictsize = GetCount(task->var_info); for(i=0; i< dictsize; i++){ - snprintf(buf, BUFSIZ,"var[%d]",i); + snprintf(buf, BUFSIZ,"var[%u]",i); if( BUNappend(btech, buf, false) != GDK_SUCCEED || BUNappend(bcount, , false) != GDK_SUCCEED || BUNappend(binput, , false) != GDK_SUCCEED || @@ -195,7 +195,7 @@ do {\ size_t new_bytes= new_keys_size + new_dict_size + new_headers_size;\ \ (CURRENT)->compression_strategy.tag = MOSAIC_VAR;\ - (CURRENT)->compression_strategy.cnt = nr_compressed;\ + (CURRENT)->compression_strategy.cnt = (unsigned int) nr_compressed;\ \ (CURRENT)->uncompressed_size+= (BUN) ( nr_compressed * sizeof(TPE));\ (CURRENT)->compressed_size += (wordaligned( MosaicBlkSize, BitVector) + new_bytes - old_bytes);\ @@ -255,7 +255,7 @@ static str vmh->dirty = true; *pos_dict = 0; - *length_dict = GetCount(info); + *length_dict = (ulng) GetCount(info); *bits_dict = calculateBits(*length_dict); BBPreclaim(info->dict); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mosaic - Do math according to C99 §6.3.1.3 Signed and u...
Changeset: 66f9d68f3203 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66f9d68f3203 Modified Files: monetdb5/modules/mosaic/mosaic_frame.c Branch: mosaic Log Message: Do math according to C99 §6.3.1.3 Signed and unsigned integers. diffs (232 lines): diff --git a/monetdb5/modules/mosaic/mosaic_frame.c b/monetdb5/modules/mosaic/mosaic_frame.c --- a/monetdb5/modules/mosaic/mosaic_frame.c +++ b/monetdb5/modules/mosaic/mosaic_frame.c @@ -118,11 +118,11 @@ MOSskip_frame(MOStask task) #define MOScodevectorFrame(Task) (((char*) (Task)->blk)+ wordaligned(sizeof(MosaicBlkHeader_frame_t), unsigned int)) -/* Use ternary operator because (in theory) we have to be careful not to get overflow's*/\ -#define GET_DELTA_FOR_SIGNED_TYPE(DELTA_TPE, max, min) (min < 0? max < 0?(DELTA_TPE) (max - min) : (DELTA_TPE)(max) + (DELTA_TPE)(-1 * min) : (DELTA_TPE) (max - min)) -#define GET_DELTA_FOR_UNSIGNED_TYPE(DELTA_TPE, max, min) ((DELTA_TPE) (max - min)) +/* Use standard unsigned integer operations because (in theory) we have to be careful not to get overflow's and undefined behavior*/\ +#define GET_DELTA(DELTA_TPE, max, min) ((DELTA_TPE) max - (DELTA_TPE) min) +#define ADD_DELTA(TPE, DELTA_TPE, min, delta) (TPE) ((DELTA_TPE) min + (DELTA_TPE) delta) -#define determineFrameParameters(PARAMETERS, SRC, LIMIT, TPE, DELTA_TPE, GET_DELTA) \ +#define determineFrameParameters(PARAMETERS, SRC, LIMIT, TPE, DELTA_TPE) \ do {\ TPE *val = SRC, max, min;\ int bits = 1;\ @@ -165,12 +165,12 @@ do {\ (PARAMETERS).base.cnt = i;\ } while(0) -#define estimateFrame(TASK, TPE, DELTA_TPE, GET_DELTA)\ +#define estimateFrame(TASK, TPE, DELTA_TPE)\ do {\ TPE *src = getSrc(TPE, (TASK));\ BUN limit = (TASK)->stop - (TASK)->start > MOSAICMAXCNT? MOSAICMAXCNT: (TASK)->stop - (TASK)->start;\ MosaicBlkHeader_frame_t parameters;\ - determineFrameParameters(parameters, src, limit, TPE, DELTA_TPE, GET_DELTA);\ + determineFrameParameters(parameters, src, limit, TPE, DELTA_TPE);\ assert(parameters.base.cnt > 0);/*Should always compress.*/\ current->is_applicable = true;\ current->uncompressed_size += (BUN) (parameters.base.cnt * sizeof(TPE));\ @@ -186,20 +186,20 @@ MOSestimate_frame(MOStask task, MosaicEs current->compression_strategy.tag = MOSAIC_FRAME; switch(ATOMbasetype(task->type)){ - case TYPE_bte: estimateFrame(task, bte, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_sht: estimateFrame(task, sht, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_int: estimateFrame(task, int, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_lng: estimateFrame(task, lng, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_oid: estimateFrame(task, oid, oid, GET_DELTA_FOR_UNSIGNED_TYPE); break; + case TYPE_bte: estimateFrame(task, bte, ulng); break; + case TYPE_sht: estimateFrame(task, sht, ulng); break; + case TYPE_int: estimateFrame(task, int, ulng); break; + case TYPE_lng: estimateFrame(task, lng, ulng); break; + case TYPE_oid: estimateFrame(task, oid, oid); break; #ifdef HAVE_HGE - case TYPE_hge: estimateFrame(task, hge, uhge, GET_DELTA_FOR_SIGNED_TYPE); break; + case TYPE_hge: estimateFrame(task, hge, uhge); break; #endif } return MAL_SUCCEED; } -#define FRAMEcompress(TASK, TPE, DELTA_TPE, GET_DELTA)\ +#define FRAMEcompress(TASK, TPE, DELTA_TPE)\ do {\ TPE *src = getSrc(TPE, (TASK));\ TPE delta;\ @@ -207,7 +207,7 @@ do {\ BUN limit = estimate->cnt;\ BitVector base;\ MosaicBlkHeader_frame_t* parameters = (MosaicBlkHeader_frame_t*) ((TASK))->blk;\ - determineFrameParameters(*parameters, src, limit, TPE, DELTA_TPE, GET_DELTA);\ + determineFrameParameters(*parameters, src, limit, TPE, DELTA_TPE);\ (TASK)->dst = MOScodevectorFrame(TASK);\ base = (BitVector) ((TASK)->dst);\ for(i = 0; i < parameters->base.cnt; i++, src++) {\ @@ -227,13 +227,13 @@ MOScompress_frame(MOStask task, MosaicBl MOSsetCnt(blk, 0); switch(ATOMbasetype(task->type)) { - case TYPE_bte: FRAMEcompress(task, bte, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_sht: FRAMEcompress(task, sht, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_int: FRAMEcompress(task, int, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_lng: FRAMEcompress(task, lng, ulng, GET_DELTA_FOR_SIGNED_TYPE); break; - case TYPE_oid: FRAMEcompress(task, oid, oid, GET_DELTA_FOR_UNSIGNED_TYPE); break; + case TYPE_bte: FRAMEcompress(task, bte, ulng); break; + case TYPE_sht: FRAMEcompress(task, sht, ulng); break; + case TYPE_int: FRAMEcompress(task, int, ulng); break; + case TYPE_lng: FRAMEcompress(task, lng, ulng); break; + case TYPE_oid: FRAMEcompress(task, oid, oid); break; #ifdef HAVE_HGE -
MonetDB: mosaic - Introduce nil semantics for frame compression.
Changeset: 047e1632ba8e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=047e1632ba8e Added Files: monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.MAL.py monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.options5 monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.stable.err monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.stable.out monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.mal Modified Files: monetdb5/modules/mosaic/Tests/All monetdb5/modules/mosaic/mosaic.c monetdb5/modules/mosaic/mosaic_frame.c monetdb5/modules/mosaic/mosaic_frame.h Branch: mosaic Log Message: Introduce nil semantics for frame compression. diffs (truncated from 25750 to 300 lines): diff --git a/monetdb5/modules/mosaic/Tests/All b/monetdb5/modules/mosaic/Tests/All --- a/monetdb5/modules/mosaic/Tests/All +++ b/monetdb5/modules/mosaic/Tests/All @@ -69,6 +69,7 @@ mosaic_lng_1.frame mosaic_oid_1.frame mosaic_date_1.frame mosaic_timestamp_1.frame +mosaic_lng_with_nills_1.frame mosaic_bit_1.prefix mosaic_lng_1.prefix diff --git a/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.MAL.py b/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.MAL.py new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.MAL.py @@ -0,0 +1,2 @@ +from run_mal_client import main +main(__file__) diff --git a/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.options5 b/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.options5 new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.options5 @@ -0,0 +1,1 @@ +--debug=2097152 diff --git a/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.stable.err b/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.stable.err new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mosaic/Tests/mosaic_lng_with_nills_1.frame.stable.err @@ -0,0 +1,20255 @@ +stderr of test 'mosaic_lng_with_nills_1.frame` in directory 'monetdb5/modules/mosaic` itself: + + +# 14:24:54 > +# 14:24:54 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=36479" "--set" "mapi_usock=/var/tmp/mtest-16514/.s.monetdb.36479" "--forcemito" "--dbpath=/home/aris/sources/monetdb/build/installation/var/MonetDB/mTests_monetdb5_modules_mosaic" "--debug=2097152" "--set" "embedded_c=true" +# 14:24:54 > + +# builtin opt gdk_dbpath = /home/aris/sources/monetdb/build/installation/var/monetdb5/dbfarm/demo +# builtin opt mapi_port = 5 +# builtin opt mapi_open = false +# builtin opt mapi_ipv6 = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 36479 +# cmdline opt mapi_usock = /var/tmp/mtest-16514/.s.monetdb.36479 +# cmdline opt gdk_dbpath = /home/aris/sources/monetdb/build/installation/var/MonetDB/mTests_monetdb5_modules_mosaic +# cmdline opt embedded_c = true +#COLnew()=tmp_1#0@0[str]TSRN +#COLnew()=tmp_2#0@0[str]TSRN +#BAThash: create hash(environment_key#10@0[str]TN); +#HASHnew: create hash(size 256, mask 256, width 2, total 1024 bytes); +#BAThash: hash construction 21 usec +#BAThash: statistics (10, entries 9, mask 255, max 2, avg 1.11); +#BAThash: NOT persisting hash 1 +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#BATcheckhash: already has hash environment_key, waited 0 usec +#COLnew()=tmp_3#0@0[str]TSRN +#COLnew()=tmp_4#0@0[str]TSRN
MonetDB: mosaic - Remove for now the test case when low > hgh:
Changeset: 85013a64a44d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=85013a64a44d Modified Files: monetdb5/modules/mosaic/Tests/mosaic_bit_1.capped.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_1.frame.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_1.mal monetdb5/modules/mosaic/Tests/mosaic_bit_1.prefix.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_1.raw.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_1.var.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_2.linear.stable.out monetdb5/modules/mosaic/Tests/mosaic_bit_2.mal monetdb5/modules/mosaic/Tests/mosaic_bit_2.runlength.stable.out Branch: mosaic Log Message: Remove for now the test case when low > hgh: it is unclear what BATselect should do in this case. diffs (truncated from 2530 to 300 lines): diff --git a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.capped.stable.out b/monetdb5/modules/mosaic/Tests/mosaic_bit_1.capped.stable.out --- a/monetdb5/modules/mosaic/Tests/mosaic_bit_1.capped.stable.out +++ b/monetdb5/modules/mosaic/Tests/mosaic_bit_1.capped.stable.out @@ -33,7 +33,6 @@ MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped -MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped @@ -46,7 +45,6 @@ MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped -MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped @@ -59,7 +57,6 @@ MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped -MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped @@ -71,7 +68,6 @@ MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped -MOSselect_capped MOSthetaselect_capped MOSselect_capped MOSselect_capped @@ -106,10 +102,6 @@ MOSselect_capped MOSselect_capped MOSselect_capped MOSselect_capped -MOSselect_capped -MOSselect_capped -MOSselect_capped -MOSselect_capped MOSjoin_capped MOSthetaselect_capped MOSprojection_capped @@ -1382,69 +1374,6 @@ MOSprojection_capped [ 58@0,58@0, 58@0] #--# # tt t # name -# void voidoid # type -#--# -[ 0@0, 0@0,0@0 ] -[ 1@0, 1@0,1@0 ] -[ 2@0, 2@0,2@0 ] -[ 3@0, 3@0,3@0 ] -[ 4@0, 4@0,4@0 ] -[ 5@0, 5@0,5@0 ] -[ 6@0, 6@0,6@0 ] -[ 7@0, 7@0,7@0 ] -[ 8@0, 8@0,8@0 ] -[ 9@0, 9@0,9@0 ] -[ 10@0,10@0, 10@0] -[ 11@0,11@0, 11@0] -[ 12@0,12@0, 12@0] -[ 13@0,13@0, 13@0] -[ 14@0,14@0, 14@0] -[ 15@0,15@0, 15@0] -[ 16@0,16@0, 16@0] -[ 17@0,17@0, 17@0] -[ 18@0,18@0, 18@0] -[ 19@0,19@0, 19@0] -[ 20@0,20@0, 20@0] -[ 21@0,21@0, 21@0] -[ 22@0,22@0, 22@0] -[ 23@0,23@0, 23@0] -[ 24@0,24@0, 24@0] -[ 25@0,25@0, 25@0] -[ 26@0,26@0, 26@0] -[ 27@0,27@0, 27@0] -[ 28@0,28@0, 28@0] -[ 29@0,29@0, 29@0] -[ 30@0,30@0, 30@0] -[ 31@0,31@0, 31@0] -[ 32@0,32@0, 32@0] -[ 33@0,33@0, 33@0] -[ 34@0,34@0, 34@0] -[ 35@0,35@0, 35@0] -[ 36@0,36@0, 36@0] -[ 37@0,37@0, 37@0] -[ 38@0,38@0, 38@0] -[ 39@0,39@0, 39@0] -[ 40@0,40@0, 40@0] -[ 41@0,41@0, 41@0] -[ 42@0,42@0, 42@0] -[ 43@0,43@0, 43@0] -[ 44@0,44@0, 44@0] -[ 45@0,45@0, 45@0] -[ 46@0,46@0, 46@0] -[ 47@0,47@0, 47@0] -[ 48@0,48@0, 48@0] -[ 49@0,49@0, 49@0] -[ 50@0,50@0, 50@0] -[ 51@0,51@0, 51@0] -[ 52@0,52@0, 52@0] -[ 53@0,53@0, 53@0] -[ 54@0,54@0, 54@0] -[ 55@0,55@0, 55@0] -[ 56@0,56@0, 56@0] -[ 57@0,57@0, 57@0] -[ 58@0,58@0, 58@0] -#--# -# tt t # name # void oid oid # type #--# [ 0@0, 1@0,1@0 ] @@ -1772,69 +1701,6 @@ MOSprojection_capped [ 58@0,58@0, 58@0] #--# # tt t # name -# void voidoid # type -#--# -[ 0@0, 0@0,0@0 ] -[ 1@0, 1@0,1@0 ] -[ 2@0, 2@0,2@0 ] -[ 3@0, 3@0,3@0 ] -[ 4@0, 4@0,4@0 ] -[ 5@0, 5@0,5@0 ] -[ 6@0, 6@0,6@0 ] -[ 7@0, 7@0,7@0 ] -[ 8@0, 8@0,8@0 ] -[ 9@0, 9@0,9@0 ] -[ 10@0,10@0, 10@0] -[ 11@0,11@0, 11@0] -[ 12@0,12@0, 12@0] -[ 13@0,13@0, 13@0] -[ 14@0,14@0, 14@0] -[ 15@0,15@0, 15@0] -[ 16@0,
MonetDB: mosaic - Fix memory corruption error in frame compression.
Changeset: af90a750b234 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=af90a750b234 Modified Files: monetdb5/modules/mosaic/mosaic.c monetdb5/modules/mosaic/mosaic_frame.c monetdb5/modules/mosaic/mosaic_frame.h Branch: mosaic Log Message: Fix memory corruption error in frame compression. diffs (184 lines): diff --git a/monetdb5/modules/mosaic/mosaic.c b/monetdb5/modules/mosaic/mosaic.c --- a/monetdb5/modules/mosaic/mosaic.c +++ b/monetdb5/modules/mosaic/mosaic.c @@ -512,7 +512,7 @@ MOScompressInternal(BAT* bsrc, const cha break; case MOSAIC_FRAME: ALGODEBUG mnstr_printf(GDKstdout, "MOScompress_frame\n"); - MOScompress_frame(task); + MOScompress_frame(task, estimate); MOSupdateHeader(task); MOSadvance_frame(task); MOSnewBlk(task); diff --git a/monetdb5/modules/mosaic/mosaic_frame.c b/monetdb5/modules/mosaic/mosaic_frame.c --- a/monetdb5/modules/mosaic/mosaic_frame.c +++ b/monetdb5/modules/mosaic/mosaic_frame.c @@ -51,17 +51,45 @@ bool MOStypes_frame(BAT* b) { // we use longs as the basis for bit vectors #define chunk_size(Task, Cnt) wordaligned(MosaicBlkSize + (Cnt * Task->hdr->framebits)/8 + (((Cnt * Task->hdr->framebits) %8) != 0), lng) +typedef struct _FrameParameters_t { + MosaicBlkRec base; + int bits; + union { + bte minbte; + sht minsht; + int minint; + lng minlng; + oid minoid; +#ifdef HAVE_HGE + hge minhge; +#endif + } min; + union { + bte maxbte; + sht maxsht; + int maxint; + lng maxlng; + oid maxoid; +#ifdef HAVE_HGE + hge maxhge; +#endif + } max; + +} MosaicBlkHeader_frame_t; + +#define toEndOfBitVector(CNT, BITS) wordaligned(((CNT) * (BITS) / CHAR_BIT) + ( ((CNT) * (BITS)) % CHAR_BIT != 0 ), lng) + void MOSadvance_frame(MOStask task) { - int *dst = (int*) (((char*) task->blk) + MosaicBlkSize); - long cnt = MOSgetCnt(task->blk); - long bytes; + MosaicBlkHeader_frame_t* parameters = (MosaicBlkHeader_frame_t*) (task)->blk; + int *dst = (int*) (((char*) task->blk) + wordaligned(sizeof(MosaicBlkHeader_frame_t), unsigned int)); + long cnt = parameters->base.cnt; + long bytes = toEndOfBitVector(cnt, parameters->bits); assert(cnt > 0); task->start += (oid) cnt; - bytes = (cnt * task->hdr->framebits)/8 + (((cnt * task->hdr->framebits) %8) != 0) + sizeof(ulng); - task->blk = (MosaicBlk) (((char*) dst) + wordaligned(bytes, lng)); + task->blk = (MosaicBlk) (((char*) dst) + bytes); } void @@ -88,33 +116,7 @@ MOSskip_frame(MOStask task) task->blk = 0; // ENDOFLIST } -typedef struct _FrameParameters_t { - MosaicBlkRec base; - int bits; - union { - bte minbte; - sht minsht; - int minint; - lng minlng; - oid minoid; -#ifdef HAVE_HGE - hge minhge; -#endif - } min; - union { - bte maxbte; - sht maxsht; - int maxint; - lng maxlng; - oid maxoid; -#ifdef HAVE_HGE - hge maxhge; -#endif - } max; - -} MosaicBlkHeader_frame_t; - -#define MOScodevectorFrame(Task) (((char*) (Task)->blk)+ wordaligned(sizeof(MosaicBlkHeader_frame_t), BitVector)) +#define MOScodevectorFrame(Task) (((char*) (Task)->blk)+ wordaligned(sizeof(MosaicBlkHeader_frame_t), unsigned int)) /* Use ternary operator because (in theory) we have to be careful not to get overflow's*/\ #define GET_DELTA_FOR_SIGNED_TYPE(DELTA_TPE, max, min) (min < 0? max < 0?(DELTA_TPE) (max - min) : (DELTA_TPE)(max) + (DELTA_TPE)(-1 * min) : (DELTA_TPE) (max - min)) @@ -129,17 +131,19 @@ do {\ min = *val;\ /*TODO: add additional loop to find best bit wise upper bound*/\ for(i = 0; i < LIMIT; i++, val++){\ + TPE current_max = max;\ + TPE current_min = min;\ bool evaluate_bits = false;\ - if (*val > max) {\ - max = *val;\ + if (*val > current_max) {\ + current_max = *val;\ evaluate_bits = true;\ }\ - if (*val < min) {\ - min = *val;\ + if (*val < current_min) {\ + current_min = *val;\ evaluate_bits = true;\ }\ if (evaluate_bits) {\ - DELTA_TPE width = GET_DELTA(DELTA_TPE, max, min);\ + DELTA_TPE width = GET_DELTA(DELTA_TPE, current_max, current_min);\
MonetDB: Nov2019 - Removed mmc binary. It was being used for com...
Changeset: 3f21c1cae59e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f21c1cae59e Removed Files: clients/mapiclient/mnc.c Modified Files: clients/mapiclient/Makefile.ag Branch: Nov2019 Log Message: Removed mmc binary. It was being used for compilation. diffs (truncated from 363 to 300 lines): diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag --- a/clients/mapiclient/Makefile.ag +++ b/clients/mapiclient/Makefile.ag @@ -54,15 +54,6 @@ bin_tomograph = { $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) $(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS) } -# disabled: it's not really a tool for users, more to debug mapi -# problems, or measure performance -#bin_mnc = { -# SOURCES = mnc.c -# LIBS = ../../common/stream/libstream \ -# ../mapilib/libmapi \ -# $(curl_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) $(SOCKET_LIBS) -#} - man_MANS = mclient.1 msqldump.1 EXTRA_DIST = $(man_MANS) diff --git a/clients/mapiclient/mnc.c b/clients/mapiclient/mnc.c deleted file mode 100644 --- a/clients/mapiclient/mnc.c +++ /dev/null @@ -1,339 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. - */ - -/** - * mnc - * Fabian Groffen - * - * MCL netcat - * Simple utility meant to measure the protocol overhead incurred by our - * stream library compared to "plain" netcat (nc). - */ - -#include "monetdb_config.h" -#include "mapi.h" -#include "stream.h" -#include "stream_socket.h" -#include -#include -#include -#ifdef HAVE_PTHREAD_H -#include -#endif -#include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_WINSOCK_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif - -#ifndef HAVE_GETOPT_LONG -# include "monet_getopt.h" -#else -# ifdef HAVE_GETOPT_H -# include "getopt.h" -# endif -#endif - -#define SOCKPTR struct sockaddr * -#ifdef HAVE_SOCKLEN_T -#define SOCKLEN socklen_t -#else -#define SOCKLEN int -#endif - -#if !defined(HAVE_ACCEPT4) || !defined(SOCK_CLOEXEC) -#define accept4(sockfd, addr, addlen, flags) accept(sockfd, addr, addrlen) -#endif - -static void -usage(void) -{ - fprintf(stderr, "mnc [options] destination port\n"); - fprintf(stderr, " -l | --listen listen for connection instead\n"); - /* TODO - fprintf(stderr, " -u | --udp use UDP instead of TCP\n"); - fprintf(stderr, " -g | --gzip use gzip stream wrapper\n"); - fprintf(stderr, " -j | --bzip2use bzip2 stream wrapper\n"); - fprintf(stderr, " -b | --buffer use buffered stream\n"); - */ - fprintf(stderr, " -B | --blockuse block stream\n"); -} - -int -main(int argc, char **argv) -{ - int a = 1; - char *host = NULL; - int port = 0; - char clisten = 0; - /* char udp = 0; */ - /* char zip = 0; */ - /* char buffer = 0; */ - char block = 0; - SOCKET s = INVALID_SOCKET; - stream *in = NULL; - stream *out = NULL; - char buf[8096]; - ssize_t len; - fd_set fds; - char seeneof = 0; - char seenflush = 0; - - static struct option long_options[8] = { - { "listen", 0, 0, 'l' }, - { "udp", 0, 0, 'u' }, - { "gzip", 0, 0, 'g' }, - { "bzip2", 0, 0, 'j' }, - { "buffer", 0, 0, 'b' }, - { "block", 0, 0, 'B' }, - { "help", 0, 0, '?' }, - { 0, 0, 0, 0 } - }; - while (1) { - int option_index = 0; - int c = getopt_long(argc, argv, "lugjbB?h", - long_options, _index); - if (c == -1) - break; - switch (c) { - case 'l': - clisten = 1; - break; - case 'u': - /* udp = 1; */ - break; - case 'g': - /* zip = 1; */ - break; - case 'j': - /* zip = 2; */ - break; - case 'b': - /* buffer = 1; */ - break; - case 'B': - block = 1; - break; - default: - usage(); - exit(0); - } - } - - a = optind; - if (argc - a != 2) { - fprintf(stderr, "%s:
MonetDB: Nov2019 - Updated ChangeLog
Changeset: 50efd210a885 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=50efd210a885 Modified Files: sql/ChangeLog.Nov2019 Branch: Nov2019 Log Message: Updated ChangeLog diffs (15 lines): diff --git a/sql/ChangeLog.Nov2019 b/sql/ChangeLog.Nov2019 --- a/sql/ChangeLog.Nov2019 +++ b/sql/ChangeLog.Nov2019 @@ -1,6 +1,11 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Mon Nov 4 2019 Pedro Ferreira +- Removed functions json.text(string) returns string and json.text(int) + returns string. Their MAL implementation didn't exist, so they were + meaningless. + * Mon Sep 23 2019 Sjoerd Mullender - There are new aggregate functions sys.median_avg and sys.quantile_avg that return the interpolated value if the median/quantile doesn't fall ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Nov2019 - Removed datacell tests.
Changeset: c2a26f8f021d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2a26f8f021d Removed Files: sql/test/datacell/Tests/All sql/test/datacell/Tests/crashonundefined.sql sql/test/datacell/Tests/crashonundefined.stable.err sql/test/datacell/Tests/crashonundefined.stable.out sql/test/datacell/Tests/garbagecollect.sql sql/test/datacell/Tests/garbagecollect.stable.err sql/test/datacell/Tests/garbagecollect.stable.out sql/test/datacell/Tests/select.sql sql/test/datacell/Tests/select.stable.err sql/test/datacell/Tests/select.stable.out sql/test/datacell/Tests/topbasket.sql sql/test/datacell/Tests/topbasket.stable.err sql/test/datacell/Tests/topbasket.stable.out Branch: Nov2019 Log Message: Removed datacell tests. The moduel was removed a long time ago, so the tests are no meaningless. diffs (truncated from 537 to 300 lines): diff --git a/sql/test/datacell/Tests/All b/sql/test/datacell/Tests/All deleted file mode 100644 --- a/sql/test/datacell/Tests/All +++ /dev/null @@ -1,4 +0,0 @@ -#crashonundefined -#garbagecollect -#topbasket -#select diff --git a/sql/test/datacell/Tests/crashonundefined.sql b/sql/test/datacell/Tests/crashonundefined.sql deleted file mode 100644 --- a/sql/test/datacell/Tests/crashonundefined.sql +++ /dev/null @@ -1,1 +0,0 @@ -select * from [select * from undefinedbasket] as t; diff --git a/sql/test/datacell/Tests/crashonundefined.stable.err b/sql/test/datacell/Tests/crashonundefined.stable.err deleted file mode 100644 --- a/sql/test/datacell/Tests/crashonundefined.stable.err +++ /dev/null @@ -1,80 +0,0 @@ -stderr of test 'crashonundefined` in directory 'sql/test/datacell` itself: - - -# 12:41:35 > -# 12:41:35 > mserver5 "--config=/ufs/niels/scratch/MonetDB/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=4 --set "monet_mod_path=/ufs/niels/scratch/MonetDB/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/MonetDB/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/MonetDB/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/MonetDB/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=35517 --set xrpc_port=48343 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_datacell" --set mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over.. -# 12:41:35 > - -# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu -# builtin opt gdk_version = 1.39.0 -# builtin opt prefix = /ufs/niels/scratch/MonetDB/Linux-x86_64 -# builtin opt exec_prefix = ${prefix} -# builtin opt gdk_dbname = demo -# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm -# builtin opt gdk_debug = 0 -# builtin opt gdk_alloc_map = no -# builtin opt gdk_vmtrim = yes -# builtin opt monet_admin = adm -# builtin opt monet_prompt = > -# builtin opt monet_welcome = yes -# builtin opt monet_mod_path = ${exec_prefix}/lib/MonetDB -# builtin opt monet_daemon = no -# builtin opt host = localhost -# builtin opt mapi_port = 5 -# builtin opt mapi_clients = 2 -# builtin opt mapi_open = false -# builtin opt mapi_autosense = false -# builtin opt sql_debug = 0 -# builtin opt standoff_ns = -# builtin opt standoff_start = start -# builtin opt standoff_end = end -# config opt prefix = /ufs/niels/scratch/MonetDB/Linux-x86_64 -# config opt config = ${prefix}/etc/monetdb5.conf -# config opt prefix = /ufs/niels/scratch/MonetDB/Linux-x86_64 -# config opt exec_prefix = ${prefix} -# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm -# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin -# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid -# config opt mero_controlport = 50001 -# config opt sql_optimizer = default_pipe -# config opt minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector -# config opt default_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector -# config opt nov2009_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector -# config opt replication_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,replication,multiplex,garbageCollector -# config opt accumulator_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,dataflow,history,multiplex,garbageCollector -# config opt recycler_pipe =
MonetDB: tracer - Added tracer -> store.c
Changeset: 4c0c88bc6b64 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c0c88bc6b64 Modified Files: gdk/gdk_tracer.h sql/common/sql_types.c sql/common/sql_types.h sql/server/sql_mvc.c sql/storage/sql_storage.h sql/storage/store.c Branch: tracer Log Message: Added tracer -> store.c diffs (truncated from 540 to 300 lines): diff --git a/gdk/gdk_tracer.h b/gdk/gdk_tracer.h --- a/gdk/gdk_tracer.h +++ b/gdk/gdk_tracer.h @@ -40,6 +40,8 @@ typedef enum { SQL_READER, SQL_SYMBOL, SQL_MVC, + SQL_STORE, + SQL_STORE_FLUSHER, // MAL MAL_ALL, diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c --- a/sql/common/sql_types.c +++ b/sql/common/sql_types.c @@ -2186,9 +2186,8 @@ sqltypeinit( sql_allocator *sa) } void -types_init(sql_allocator *sa, int debug) +types_init(sql_allocator *sa) { - (void)debug; aliases = sa_list(sa); types = sa_list(sa); localtypes = sa_list(sa); diff --git a/sql/common/sql_types.h b/sql/common/sql_types.h --- a/sql/common/sql_types.h +++ b/sql/common/sql_types.h @@ -72,6 +72,6 @@ extern char *sql_func_imp(sql_func *f); extern char *sql_func_mod(sql_func *f); extern int is_sqlfunc(sql_func *f); -extern void types_init(sql_allocator *sa, int debug); +extern void types_init(sql_allocator *sa); #endif /* SQL_TYPES_H */ diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c --- a/sql/server/sql_mvc.c +++ b/sql/server/sql_mvc.c @@ -117,7 +117,7 @@ mvc_init(int debug, store_type store, in return -1; } - if ((first = store_init(debug, store, ro, su, stk)) < 0) { + if ((first = store_init(store, ro, su, stk)) < 0) { fprintf(stderr, "!mvc_init: unable to create system tables\n"); return -1; } diff --git a/sql/storage/sql_storage.h b/sql/storage/sql_storage.h --- a/sql/storage/sql_storage.h +++ b/sql/storage/sql_storage.h @@ -367,7 +367,7 @@ extern res_table *res_tables_remove(res_ extern void res_tables_destroy(res_table *results); extern res_table *res_tables_find(res_table *results, int res_id); -extern int store_init(int debug, store_type store, int readonly, int singleuser, backend_stack stk); +extern int store_init(store_type store, int readonly, int singleuser, backend_stack stk); extern void store_exit(void); extern int store_apply_deltas(bool locked); diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -16,6 +16,7 @@ #include "bat/bat_storage.h" #include "bat/bat_table.h" #include "bat/bat_logger.h" +#include "gdk_tracer.h" /* version 05.22.03 of catalog */ #define CATALOG_VERSION 52203 @@ -44,8 +45,6 @@ logger_functions logger_funcs; static int schema_number = 0; /* each committed schema change triggers a new schema number (session wise unique number) */ -static int bs_debug = 0; -static int logger_debug = 0; #define MAX_SPARES 32 static sql_trans *spare_trans[MAX_SPARES]; @@ -209,26 +208,15 @@ trans_drop_tmp(sql_trans *tr) } } -/*#define STORE_DEBUG 1*/ -/*#define STORE_FLUSHER_DEBUG 1 */ - -#ifdef STORE_DEBUG -#define STORE_FLUSHER_DEBUG 1 -#endif - sql_trans * sql_trans_destroy(sql_trans *t, bool try_spare) { sql_trans *res = t->parent; -#ifdef STORE_DEBUG - fprintf(stderr, "#destroy trans (%p)\n", t); -#endif + DEBUG(SQL_STORE, "Destroy transaction: %p\n", t); if (res == gtrans && spares < MAX_SPARES && !t->name && try_spare) { -#ifdef STORE_DEBUG - fprintf(stderr, "#spared (%d) trans (%p)\n", spares, t); -#endif + DEBUG(SQL_STORE, "Spared '%d' transactions '%p'\n", spares, t); trans_drop_tmp(t); spare_trans[spares++] = t; return res; @@ -546,7 +534,7 @@ load_column(sql_trans *tr, sql_table *t, if (!sql_find_subtype(>type, tpe, sz, d)) { sql_type *lt = sql_trans_bind_type(tr, t->s, tpe); if (lt == NULL) { - fprintf(stderr, "SQL type %s missing\n", tpe); + ERROR(SQL_ALL, "SQL type '%s' is missing\n", tpe); _DELETE(tpe); return NULL; } @@ -573,8 +561,7 @@ load_column(sql_trans *tr, sql_table *t, store_funcs.create_col(tr, c); c->sorted = sql_trans_is_sorted(tr, c); c->dcount = 0; - if (bs_debug) - fprintf(stderr, "#\t\tload column %s\n", c->base.name); + DEBUG(SQL_STORE, "Load column: %s\n", c->base.name); return c; } @@ -763,14 +750,12 @@ load_table(sql_trans *tr, sql_schema *s, if (isTable(t)) { if (store_funcs.create_del(tr, t) != LOG_OK) { - if (bs_debug) -
MonetDB: Nov2019 - Added type checking on "monet5_resolve_functi...
Changeset: 7a1f3b8a96b1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a1f3b8a96b1 Modified Files: clients/Tests/MAL-signatures.stable.out.int128 monetdb5/modules/atoms/00_json_hge.mal sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_upgrades.c sql/common/sql_types.c sql/scripts/40_json.sql sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/sql_xml/Tests/funcs.sql sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 Branch: Nov2019 Log Message: Added type checking on "monet5_resolve_function". Some small bugs were fixed: - The MAL command filter(name:json, idx:hge) :json belongs to json module instead of iterator. - The SQL functions json.text(js string) : string and json.text(js int) : string, didn't have a MAL implementation, so they ere removed. - The first argument to sql.copy_from function is a 'ptr' type instead of 'str'. diffs (truncated from 317 to 300 lines): 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 @@ -15536,8 +15536,6 @@ stdout of test 'MAL-signatures` in direc [ "io","stderr", "pattern io.stderr():streams ", "io_stderr;", "return the error stream for the database console" ] [ "io","stdin","pattern io.stdin():bstream ", "io_stdin;", "return the input stream to the database client"] [ "io","stdout", "pattern io.stdout():streams ", "io_stdout;", "return the output stream for the database client" ] -[ "iterator", "filter", "command iterator.filter(name:json, idx:hge, other:str):json ", "JSONfilterArrayDefault_hge;", "" ] -[ "iterator", "filter", "command iterator.filter(name:json, idx:hge):json ","JSONfilterArray_hge;", "" ] [ "iterator", "new", "pattern iterator.new(b:bat[:any_2]) (h:oid, t:any_2) ","ITRbunIterator;", "Process the buns one by one extracted from a void table." ] [ "iterator", "new", "command iterator.new(b:bat[:any_2], size:lng) (X_0:lng, X_1:bat[:any_2]) ","ITRnewChunk;", "Create an iterator with fixed granule size.\n\t The result is a view."] [ "iterator", "next", "pattern iterator.next(b:bat[:any_2]) (h:oid, t:any_2) ", "ITRbunNext;", "Produce the next bun for processing." ] @@ -15554,10 +15552,12 @@ stdout of test 'MAL-signatures` in direc [ "json", "dump", "command json.dump(j:json):void ", "JSONdump;", "" ] [ "json", "filter", "command json.filter(name:json, pathexpr:str):json ", "JSONfilter;", "Filter all members of an object by a path expression, returning an array.\nNon-matching elements are skipped." ] [ "json", "filter", "command json.filter(name:json, idx:bte, other:str):json ", "JSONfilterArrayDefault_bte;", "" ] +[ "json", "filter", "command json.filter(name:json, idx:hge, other:str):json ", "JSONfilterArrayDefault_hge;", "" ] [ "json", "filter", "command json.filter(name:json, idx:int, other:str):json ", "JSONfilterArrayDefault_int;", "" ] [ "json", "filter", "command json.filter(name:json, idx:lng, other:str):json ", "JSONfilterArrayDefault_lng;", "Extract a single array element"] [ "json", "filter", "command json.filter(name:json, idx:sht, other:str):json ", "JSONfilterArrayDefault_sht;", "" ] [ "json", "filter", "command json.filter(name:json, idx:bte):json ","JSONfilterArray_bte;", "" ] +[ "json", "filter", "command json.filter(name:json, idx:hge):json ","JSONfilterArray_hge;", "" ] [ "json", "filter", "command json.filter(name:json, idx:int):json ","JSONfilterArray_int;", "" ] [ "json", "filter", "command json.filter(name:json, idx:lng):json ","JSONfilterArray_lng;", "" ] [ "json", "filter", "command json.filter(name:json, idx:sht):json ","JSONfilterArray_sht;", "" ] diff --git a/monetdb5/modules/atoms/00_json_hge.mal b/monetdb5/modules/atoms/00_json_hge.mal --- a/monetdb5/modules/atoms/00_json_hge.mal +++ b/monetdb5/modules/atoms/00_json_hge.mal @@ -4,6 +4,8 @@ # # Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. +module json; + command filter(name:json, idx:hge) :json address JSONfilterArray_hge; command filter(name:json, idx:hge, other:str) :json diff --git a/sql/backends/monet5/sql_gencode.c b/sql/backends/monet5/sql_gencode.c --- a/sql/backends/monet5/sql_gencode.c +++ b/sql/backends/monet5/sql_gencode.c @@ -868,17 +868,52 @@
MonetDB: Nov2019 - We don't support Visual Studio older than 2017.
Changeset: 6904fbefa2e5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6904fbefa2e5 Modified Files: NT/mkodbcwxs.py NT/mksqlwxs.py Branch: Nov2019 Log Message: We don't support Visual Studio older than 2017. diffs (54 lines): diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -55,16 +55,13 @@ def main(): print(r'') print(r'') print(r'') -if vs in ('17', '19'): -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs -d = sorted(os.listdir(msvc))[-1] -msm = '_CRT_%s.msm' % arch -for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): -if msm in f: -fn = f -print(r' ' % (msvc, d, fn)) -else: -print(r' ' % (vs, arch)) +msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs +d = sorted(os.listdir(msvc))[-1] +msm = '_CRT_%s.msm' % arch +for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): +if msm in f: +fn = f +print(r' ' % (msvc, d, fn)) print(r' ' % folder) print(r'') print(r' ') diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -114,16 +114,13 @@ def main(): print(r'') print(r'') print(r'') -if vs in ('17', '19'): -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs -d = sorted(os.listdir(msvc))[-1] -msm = '_CRT_%s.msm' % arch -for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): -if msm in f: -fn = f -print(r' ' % (msvc, d, fn)) -else: -print(r' ' % (vs, arch)) +msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs +d = sorted(os.listdir(msvc))[-1] +msm = '_CRT_%s.msm' % arch +for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): +if msm in f: +fn = f +print(r' ' % (msvc, d, fn)) print(r' ' % folder) print(r'') print(r' ') ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: sessions - Move idle state marker to SQL.execute
Changeset: 943935814f46 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=943935814f46 Modified Files: monetdb5/mal/mal_runtime.c monetdb5/mal/mal_runtime.h sql/backends/monet5/sql_execute.c Branch: sessions Log Message: Move idle state marker to SQL.execute diffs (187 lines): diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c --- a/monetdb5/mal/mal_runtime.c +++ b/monetdb5/mal/mal_runtime.c @@ -10,6 +10,7 @@ * The MAL Runtime Profiler and system queue * This little helper module is used to perform instruction based profiling. * The QRYqueue is only update at the start/finish of a query. + * It is also the place to keep track on the number of workers */ #include "monetdb_config.h" @@ -29,16 +30,6 @@ lng qtop; static lng qsize; static oid qtag= 1;// A unique query identifier -#define QRYreset(I)\ - if (QRYqueue[I].query) GDKfree(QRYqueue[I].query);\ - QRYqueue[I].cntxt = 0; \ - QRYqueue[I].tag = 0; \ - QRYqueue[I].query = 0; \ - QRYqueue[I].status =0; \ - QRYqueue[I].progress =0; \ - QRYqueue[I].stk =0; \ - QRYqueue[I].mb =0; \ - void mal_runtime_reset(void) { @@ -49,7 +40,8 @@ mal_runtime_reset(void) qtag= 1; } -static str isaSQLquery(MalBlkPtr mb){ +static str +isaSQLquery(MalBlkPtr mb){ int i; InstrPtr p; if (mb) @@ -58,7 +50,7 @@ static str isaSQLquery(MalBlkPtr mb){ if ( getModuleId(p) && idcmp(getModuleId(p), "querylog") == 0 && idcmp(getFunctionId(p),"define")==0) return getVarConstant(mb,getArg(p,1)).val.sval; } - return 0; + return NULL; } /* @@ -80,15 +72,15 @@ runtimeProfileInit(Client cntxt, MalBlkP QRYqueue = (QueryQueue) GDKrealloc( QRYqueue, sizeof (struct QRYQUEUE) * (size_t) (qsize += 256)); if ( QRYqueue == NULL){ addMalException(mb,"runtimeProfileInit" MAL_MALLOC_FAIL); - GDKfree(tmp); /* may be NULL, but doesn't harm */ + GDKfree(tmp); MT_lock_unset(_delayLock); return; } - // check for recursive call + // check for recursive call, which does not change the number of workers for( i = 0; i < qtop; i++) if ( QRYqueue[i].mb == mb && stk->up == QRYqueue[i].stk){ QRYqueue[i].stk = stk; - stk->tag = QRYqueue[i].tag; + mb->tag = stk->tag = qtag++; MT_lock_unset(_delayLock); return; } @@ -97,7 +89,6 @@ runtimeProfileInit(Client cntxt, MalBlkP if (i == qtop) { QRYqueue[i].mb = mb; QRYqueue[i].tag = qtag++; - mb->tag = QRYqueue[i].tag; QRYqueue[i].stk = stk; // for status pause 'p'/running '0'/ quiting 'q' QRYqueue[i].start = time(0); QRYqueue[i].runtime = mb->runtime; // the estimated execution time @@ -105,13 +96,16 @@ runtimeProfileInit(Client cntxt, MalBlkP QRYqueue[i].query = q? GDKstrdup(q):0; QRYqueue[i].status = "running"; QRYqueue[i].cntxt = cntxt; + QRYqueue[i].workers++; + stk->tag = mb->tag = QRYqueue[i].tag; } - stk->tag = QRYqueue[i].tag; qtop += i == qtop; MT_lock_unset(_delayLock); } -/* We should keep a short list of previously executed queries/client for inspection */ +/* We should keep a short list of previously executed queries/client for inspection. + * Returning from a recursive call does not change the number of workers. + */ void runtimeProfileFinish(Client cntxt, MalBlkPtr mb, MalStkPtr stk) @@ -129,24 +123,29 @@ runtimeProfileFinish(Client cntxt, MalBl if( stk->up){ // recursive call QRYqueue[i].stk = stk->up; + mb->tag = stk->tag; MT_lock_unset(_delayLock); return; } - QRYqueue[i].mb->calls++; - QRYqueue[i].mb->runtime += (lng) ((lng)(time(0) - QRYqueue[i].start) * 1000.0/QRYqueue[i].mb->calls); QRYqueue[i].status = "finished"; - QRYreset(i) + GDKfree(QRYqueue[i].query); + QRYqueue[i].cntxt = 0; + QRYqueue[i].tag = 0; + QRYqueue[i].query = 0; + QRYqueue[i].status =0; + QRYqueue[i].progress =0; + QRYqueue[i].stk =0; + QRYqueue[i].mb =0; } qtop = j; QRYqueue[qtop].query = NULL; /* sentinel for SYSMONqueue() */ - cntxt->idle = time(0); - cntxt->lastcmd = 0; -
MonetDB: Nov2019 - Initialize lock after creating it.
Changeset: 097c779df191 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=097c779df191 Modified Files: gdk/gdk_bbp.c Branch: Nov2019 Log Message: Initialize lock after creating it. diffs (13 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1123,6 +1123,9 @@ BBPreadEntries(FILE *fp, unsigned bbpver bn->batCount = (BUN) count; bn->batInserted = bn->batCount; bn->batCapacity = (BUN) capacity; + char name[16]; + snprintf(name, sizeof(name), "BATlock%d", bn->batCacheid); /* fits */ + MT_lock_init(>batIdxLock, name); if (base > (uint64_t) GDK_oid_max) { BATdestroy(bn); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Nov2019 - Added test for bug 6781
Changeset: 6fc5137b678d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6fc5137b678d Added Files: sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql Modified Files: sql/test/BugTracker-2019/Tests/All Branch: Nov2019 Log Message: Added test for bug 6781 diffs (19 lines): diff --git a/sql/test/BugTracker-2019/Tests/All b/sql/test/BugTracker-2019/Tests/All --- a/sql/test/BugTracker-2019/Tests/All +++ b/sql/test/BugTracker-2019/Tests/All @@ -44,3 +44,4 @@ NOT_IN-AND-OR-wrong-results.Bug-6775 outer-join-varchar.Bug-6776 msqldump-mapi-cache.Bug-6777 rank-nan.Bug-6780 +index-insert-crash.Bug-6781 diff --git a/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql b/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql @@ -0,0 +1,6 @@ +start transaction; +create table a(a int, b int, id bigserial); +create ordered index a_pk on a(id); +create index a_idx1 on a(a); +insert into a(a) values(1); +rollback; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list