MonetDB: Nov2019 - disable rel_groupby_distinct2 optimizer
Changeset: 3b8f8dee2d0a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b8f8dee2d0a Modified Files: sql/server/rel_optimizer.c sql/server/rel_select.c Branch: Nov2019 Log Message: disable rel_groupby_distinct2 optimizer diffs (40 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -5561,6 +5561,7 @@ rel_reduce_groupby_exps(int *changes, mv * ) [e,f]( aggr1 a distinct, aggr2 b distinct, aggr3_phase2 c, aggr4_phase2 d) */ +#if 0 static sql_rel * rel_groupby_distinct2(int *changes, mvc *sql, sql_rel *rel) { @@ -5645,6 +5646,7 @@ rel_groupby_distinct2(int *changes, mvc (*changes)++; return rel; } +#endif static sql_rel * rel_groupby_distinct(int *changes, mvc *sql, sql_rel *rel) @@ -5685,7 +5687,7 @@ rel_groupby_distinct(int *changes, mvc * if (nr < 1 || distinct->type != e_aggr) return rel; if ((nr > 1 || list_length(rel->r) + nr != list_length(rel->exps))) - return rel_groupby_distinct2(changes, sql, rel); + return rel;//rel_groupby_distinct2(changes, sql, rel); arg = distinct->l; if (list_length(arg) != 1 || list_length(rel->r) + nr != list_length(rel->exps)) return rel; diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -2062,7 +2062,7 @@ rel_in_value_exp(sql_query *query, sql_r sql_rel *z = NULL; r = rel_value_exp(query, , n->data.sym, f /* ie no result project */, ek); - if (l && !r && 0) { + if (l && !r && l_init) { /* reset error */ sql->session->status = 0; sql->errstr[0] = 0; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mosaic - Update TODO's.
Changeset: 557d77fd57c6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=557d77fd57c6 Modified Files: monetdb5/modules/mosaic/TODO_MOSAIC.txt Branch: mosaic Log Message: Update TODO's. diffs (11 lines): diff --git a/monetdb5/modules/mosaic/TODO_MOSAIC.txt b/monetdb5/modules/mosaic/TODO_MOSAIC.txt --- a/monetdb5/modules/mosaic/TODO_MOSAIC.txt +++ b/monetdb5/modules/mosaic/TODO_MOSAIC.txt @@ -6,6 +6,7 @@ Test null semantics mosaic.select (c,nil:any_1, nil:any_1,true,true,(true|false)) is not working correctly: should result in c == nil or c!=nil(anti). Use bit vectors more aggressively in mosaic_delta --- then resolve test mosaic_delta_timestamp --- and possibly other compression techniques as well. Somehow force mosaic to only use specified compressions even if inefficient. This poses a design problem for dictionary compression though. +Be sure alignment is correct. Use asserts for this. fix layout call. Add test for float/double delta compression: check if the hardcoded compression expression are correct. See also (2) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mosaic - Next attempt to fix compilation error: -Werror...
Changeset: c9bb5c66015e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9bb5c66015e Modified Files: gdk/gdk_mosaic.c Branch: mosaic Log Message: Next attempt to fix compilation error: -Werror=stringop-truncation diffs (12 lines): diff --git a/gdk/gdk_mosaic.c b/gdk/gdk_mosaic.c --- a/gdk/gdk_mosaic.c +++ b/gdk/gdk_mosaic.c @@ -90,7 +90,7 @@ BATmosaic(BAT *bn, BUN cap) return GDK_FAIL; } - strncpy(m->filename, fname, strlen(fname)); + strncpy(m->filename, fname, strlen(fname) + 1); GDKfree(fname); if( HEAPalloc(m, cap, Tsize(bn)) != GDK_SUCCEED){ ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mlogger - Minor fixes & disabled mutexes for now (hanging)
Changeset: 115190df88cb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=115190df88cb Modified Files: gdk/gdk_stalker.c Branch: mlogger Log Message: Minor fixes & disabled mutexes for now (hanging) diffs (142 lines): diff --git a/gdk/gdk_stalker.c b/gdk/gdk_stalker.c --- a/gdk/gdk_stalker.c +++ b/gdk/gdk_stalker.c @@ -65,14 +65,10 @@ static void _GDKstalker_create_file(void } -static int _GDKstalker_fill_stalker(gdk_stalker *sel_stalker, const char *fmt, ...) +static int _GDKstalker_fill_stalker(gdk_stalker *sel_stalker, const char *fmt, va_list va) { -va_list va; -va_start(va, fmt); // vsnprintf(char *str, size_t count, ...) -> including null terminating character int bytes_written = vsnprintf(sel_stalker->buffer + sel_stalker->allocated_size, BUFFER_SIZE - sel_stalker->allocated_size, fmt, va); -va_end(va); - _GDKstalker_log_output_error(bytes_written); // vsnprintf returned value -> does not include the null terminating character @@ -106,7 +102,7 @@ char* GDKstalker_timestamp(void) gdk_return GDKstalker_init(void) { -_GDKstalker_info(__func__, "Starting GDKstalker"); +_GDKstalker_info(__func__, "Starting GDK stalker"); _GDKstalker_create_file(); return GDK_SUCCEED; } @@ -176,7 +172,6 @@ gdk_return GDKstalker_reset_flush_level( gdk_return GDKstalker_log(LOG_LEVEL level, int event_id, const char *fmt, ...) { -printf("MPIKA\n"); _GDKstalker_file_is_open(); if(level >= CUR_LOG_LEVEL && CUR_LOG_LEVEL > M_NONE) @@ -190,8 +185,8 @@ gdk_return GDKstalker_log(LOG_LEVEL leve printf("Selected stalker -> %lu\n", fill_stalker->id); -pthread_mutex_lock(); -{ +// pthread_mutex_lock(); +// { va_list va; va_start(va, fmt); int bytes_written = _GDKstalker_fill_stalker(fill_stalker, fmt, va); @@ -201,15 +196,12 @@ gdk_return GDKstalker_log(LOG_LEVEL leve if(bytes_written < (BUFFER_SIZE - fill_stalker->allocated_size) || fill_stalker->allocated_size == 0) { -printf("CONTENT IS %s\n", fill_stalker->buffer); -printf("Filling buffer %lu\n", fill_stalker->id); - +printf("Filling stalker %lu\n", fill_stalker->id); fill_stalker->allocated_size += bytes_written; -printf("EDW -> TELOS"); } else { -printf("Flushing buffer %lu", fill_stalker->id); +printf("Flushing stalker %lu", fill_stalker->id); // Switch stalker if(ATOMIC_GET(_STALKER_ID) == stalker.id) @@ -217,7 +209,7 @@ gdk_return GDKstalker_log(LOG_LEVEL leve else fill_stalker = -printf(" and filling buffer %lu\n", fill_stalker->id); +printf(" and filling stalker %lu\n", fill_stalker->id); // Flush current stalker pthread_create(_thread, NULL, _GDKstalker_flush_buffer_helper, NULL); @@ -227,6 +219,11 @@ gdk_return GDKstalker_log(LOG_LEVEL leve bytes_written = _GDKstalker_fill_stalker(fill_stalker, fmt, va); va_end(va); +// The second buffer will always be empty at start +// So if the message does not fit we cut it off +// message might be > BUFFER_SIZE +fill_stalker->allocated_size += bytes_written; + void *GDK_th_result; pthread_join(flushing_thread, _th_result); if(GDK_th_result == GDK_FAIL) @@ -234,17 +231,17 @@ gdk_return GDKstalker_log(LOG_LEVEL leve // Set the new selected stalker ATOMIC_SET(_STALKER_ID, fill_stalker->id); -printf("NEW selected buffer is %lu\n", fill_stalker->id); +printf("Updated selected stalker to %lu\n", fill_stalker->id); } -} -pthread_mutex_lock(); +// } +// pthread_mutex_lock(); // Flush the current buffer in case the event is // important depending on the flush-level if(event_id >= (int) ATOMIC_GET(_FLUSH_LEVEL)) { -printf("Event IS IMPORTANT -> Flushing buffer %llu\n", ATOMIC_GET(_STALKER_ID)); +printf("Important EVENT_ID flushing stalker %llu\n", ATOMIC_GET(_STALKER_ID)); int GDK_result = GDKstalker_flush_buffer(); if(GDK_result == GDK_FAIL) return GDK_FAIL; @@ -257,7 +254,6 @@ gdk_return GDKstalker_log(LOG_LEVEL leve gdk_return GDKstalker_flush_buffer() { -printf("EDW EimI"); // Select a stalker gdk_stalker *fl_stalker; if(ATOMIC_GET(_STALKER_ID) == stalker.id) @@ -265,8 +261,12 @@ gdk_return GDKstalker_flush_buffer() else fl_stalker = _stalker; -pthread_mutex_lock(); -
monetdb-java: default - Settings tag v2.29.
Changeset: 98fb056e35f6 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=98fb056e35f6 Modified Files: .hgtags Branch: default Log Message: Settings tag v2.29. diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ c43c293f3d5841517cbe0d858108c4da5fb1ec0c a6a2f4ee2d42d7e192f9d8d37f79ea99178d7f2c v2.25 fe8170e2b549c22ceb2d96301022b9304f62424d v2.27 6423fb0bf9ebba64167ca1b40b79aeacbb8e7c47 v2.28 +70808ab71d2ad997d7b7fa38d675fc90f71a059c v2.29 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
monetdb-java: default - Updated release numbers in preparation f...
Changeset: 70808ab71d2a for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=70808ab71d2a Modified Files: build.properties pom.xml release.txt Branch: default Log Message: Updated release numbers in preparation for a release. diffs (45 lines): diff --git a/build.properties b/build.properties --- a/build.properties +++ b/build.properties @@ -9,7 +9,7 @@ # major release number MCL_MAJOR=1 # minor release number -MCL_MINOR=17 +MCL_MINOR=18 ## @@ -19,7 +19,7 @@ MCL_MINOR=17 # major release number JDBC_MAJOR=2 # minor release number -JDBC_MINOR=28 +JDBC_MINOR=29 # an additional identifying string JDBC_VER_SUFFIX=Liberica # the default port to connect on, if no port given when using SQL diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ monetdb monetdb-jdbc - 2.28 + 2.29 ${project.groupId}:${project.artifactId} MonetDB JDBC driver https://www.monetdb.org diff --git a/release.txt b/release.txt --- a/release.txt +++ b/release.txt @@ -1,6 +1,6 @@ RELEASE NOTES -MonetDB JDBC driver version 2.28 (Liberica/MCL-1.17) -Release date: 2018-05-24 +MonetDB JDBC driver version 2.29 (Liberica/MCL-1.18) +Release date: 2019-09-26 This JDBC driver is designed for use with MonetDB, a main-memory column-store RDBMS. For more information see https://www.monetdb.org/ ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
monetdb-java: default - Added general release notes on the new r...
Changeset: 71a79126a390 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=71a79126a390 Modified Files: ChangeLog ChangeLog-Archive Branch: default Log Message: Added general release notes on the new release in the ChangeLog diffs (58 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,24 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog -* Thu Sep 26 2019 Sjoerd Mullender +* Thu Sep 26 2019 Martin van Dinther - Compiled and released new jar files: monetdb-jdbc-2.29.jre7.jar, monetdb-mcl-1.18.jre7.jar and jdbcclient.jre7.jar +- Following issues are resolved with this new MonetDB JDBC driver release: + - JDBC: Support for Connection.prepareCall() +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6402 +We implemented the java.sql.CallableStatement interface. + - Jdbc connection hangs +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6571 + - Mix of long and short queries make JDBC-driver hang +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6693 + - Example SQLcopyinto.java does not work +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6646 + Also improvements are made in: + - reducing the number of objects created (and thereby heap memory size) + - reducing number of methods called + - robustness, more checks on invalid parameter values + - performance * Wed Sep 25 2019 Martin van Dinther - The jar files are now named according to Java version compatibility. diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -2,9 +2,24 @@ # This file contains all past monetdb-java ChangeLog entries # For every new release the ChangeLog is prepended to this file. -* Thu Sep 26 2019 Sjoerd Mullender +* Thu Sep 26 2019 Martin van Dinther - Compiled and released new jar files: monetdb-jdbc-2.29.jre7.jar, monetdb-mcl-1.18.jre7.jar and jdbcclient.jre7.jar +- Following issues are resolved with this new MonetDB JDBC driver release: + - JDBC: Support for Connection.prepareCall() +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6402 +We implemented the java.sql.CallableStatement interface. + - Jdbc connection hangs +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6571 + - Mix of long and short queries make JDBC-driver hang +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6693 + - Example SQLcopyinto.java does not work +See https://www.monetdb.org/bugzilla/show_bug.cgi?id=6646 + Also improvements are made in: + - reducing the number of objects created (and thereby heap memory size) + - reducing number of methods called + - robustness, more checks on invalid parameter values + - performance * Wed Sep 25 2019 Martin van Dinther - The jar files are now named according to Java version compatibility. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: mlogger - Modifications to use two buffers pool
Changeset: f8c905194edb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8c905194edb Modified Files: gdk/gdk_stalker.c gdk/gdk_stalker.h Branch: mlogger Log Message: Modifications to use two buffers pool diffs (255 lines): diff --git a/gdk/gdk_stalker.c b/gdk/gdk_stalker.c --- a/gdk/gdk_stalker.c +++ b/gdk/gdk_stalker.c @@ -10,9 +10,15 @@ #include "gdk.h" #include "gdk_stalker.h" +pthread_t flushing_thread; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; -gdk_stalker_buffer stalker = { .allocated_size = 0 }; +// 0 -> stalker +// 1 -> secondary_stalker +gdk_stalker stalker = { .allocated_size = 0, .id = 0 }; +gdk_stalker secondary_stalker = { .allocated_size = 0, .id = 1 }; +ATOMIC_TYPE SELECTED_STALKER_ID = 0; + bool GDK_STALKER_STOP = false; FILE *output_file; @@ -28,6 +34,7 @@ static void _GDKstalker_info(const char fprintf(stderr, "[%s] %s\n", function_name, error_msg); } + // Output error from snprintf of vsnprintf static void _GDKstalker_log_output_error(int bytes_written) { @@ -58,6 +65,28 @@ static void _GDKstalker_create_file(void } +static int _GDKstalker_fill_stalker(gdk_stalker *sel_stalker, const char *fmt, ...) +{ +va_list va; +va_start(va, fmt); +// vsnprintf(char *str, size_t count, ...) -> including null terminating character +int bytes_written = vsnprintf(sel_stalker->buffer + sel_stalker->allocated_size, BUFFER_SIZE - sel_stalker->allocated_size, fmt, va); +va_end(va); + +_GDKstalker_log_output_error(bytes_written); + +// vsnprintf returned value -> does not include the null terminating character +return bytes_written++; +} + + +static void* _GDKstalker_flush_buffer_helper() +{ +return (void*) GDKstalker_flush_buffer(); +} + + + /** * @@ -127,7 +156,7 @@ gdk_return GDKstalker_set_flush_level(LO { if(CUR_FLUSH_LEVEL == level) return GDK_SUCCEED; - + ATOMIC_SET(_FLUSH_LEVEL, level); return GDK_SUCCEED; @@ -145,75 +174,77 @@ gdk_return GDKstalker_reset_flush_level( } -// TODO -> Rewrite this gdk_return GDKstalker_log(LOG_LEVEL level, int event_id, const char *fmt, ...) { +printf("MPIKA\n"); _GDKstalker_file_is_open(); if(level >= CUR_LOG_LEVEL && CUR_LOG_LEVEL > M_NONE) { -pthread_mutex_lock(); - -va_list va; +// Select a stalker +gdk_stalker *fill_stalker; +if(ATOMIC_GET(_STALKER_ID) == stalker.id) +fill_stalker = +else +fill_stalker = _stalker; -// Calculate the remaining buffer space -int buffer_space = BUFFER_SIZE - stalker.allocated_size; -bool retry_buffer_fill = true; +printf("Selected stalker -> %lu\n", fill_stalker->id); -// snprintf(char *str, size_t count, ...) -> including null terminating character +pthread_mutex_lock(); +{ +va_list va; va_start(va, fmt); -int bytes_written = vsnprintf(stalker.buffer + stalker.allocated_size, buffer_space, fmt, va); +int bytes_written = _GDKstalker_fill_stalker(fill_stalker, fmt, va); va_end(va); -_GDKstalker_log_output_error(bytes_written); +// The message fits the buffer OR the buffer is empty (we don't care if it fits - just cut it off) +if(bytes_written < (BUFFER_SIZE - fill_stalker->allocated_size) || + fill_stalker->allocated_size == 0) +{ +printf("CONTENT IS %s\n", fill_stalker->buffer); +printf("Filling buffer %lu\n", fill_stalker->id); + +fill_stalker->allocated_size += bytes_written; +printf("EDW -> TELOS"); +} +else +{ +printf("Flushing buffer %lu", fill_stalker->id); -// snprintf returned value -> does not include the null terminating character -bytes_written++; +// Switch stalker +if(ATOMIC_GET(_STALKER_ID) == stalker.id) +fill_stalker = _stalker; +else +fill_stalker = -// Message fits the buffer -if(bytes_written < buffer_space) -{ -// Increase the current buffer size -stalker.allocated_size += bytes_written; -retry_buffer_fill = false; +printf(" and filling buffer %lu\n", fill_stalker->id); + +// Flush current stalker +pthread_create(_thread, NULL, _GDKstalker_flush_buffer_helper, NULL); + +va_list va; +va_start(va, fmt); +bytes_written = _GDKstalker_fill_stalker(fill_stalker, fmt, va); +va_end(va); + +void *GDK_th_result; +pthread_join(flushing_thread, _th_result); +
MonetDB: Nov2019 - fixes for subquery crashes
Changeset: 8a31410098f3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8a31410098f3 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 sql/backends/monet5/sql.c sql/backends/monet5/sql.h sql/backends/monet5/sql.mal sql/backends/monet5/sql_rank.mal sql/server/rel_rel.c sql/server/rel_select.c sql/storage/store.c sql/test/subquery/Tests/correlated.stable.err sql/test/subquery/Tests/correlated.stable.out sql/test/subquery/Tests/subquery2.sql Branch: Nov2019 Log Message: fixes for subquery crashes diffs (truncated from 771 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -128,6 +128,8 @@ stdout of test 'MAL-signatures` in direc [ "aggr", "min", "command aggr.min(b:bat[:any_1], g:bat[:oid], e:bat[:any_2]):bat[:any_1] ", "AGGRmin3;","" ] [ "aggr", "min", "command aggr.min(b:bat[:any_2]):any_2 ", "ALGminany;", "Return the lowest tail value or nil." ] [ "aggr", "min", "command aggr.min(b:bat[:any_2], skipnil:bit):any_2 ", "ALGminany_skipnil;", "Return the lowest tail value or nil." ] +[ "aggr", "not_exist","command aggr.not_exist(b:bat[:any_2]):bit ", "SQLnot_exist;","" ] +[ "aggr", "not_exist","pattern aggr.not_exist(v:any_2):bit ", "SQLnot_exist_val;","" ] [ "aggr", "prod", "command aggr.prod(b:bat[:bte], g:bat[:oid], e:bat[:any_1]):bat[:bte] ","AGGRprod3_bte;", "Grouped tail product on bte" ] [ "aggr", "prod", "command aggr.prod(b:bat[:dbl], g:bat[:oid], e:bat[:any_1]):bat[:dbl] ","AGGRprod3_dbl;", "Grouped tail product on dbl" ] [ "aggr", "prod", "command aggr.prod(b:bat[:flt], g:bat[:oid], e:bat[:any_1]):bat[:dbl] ","AGGRprod3_dbl;", "Grouped tail product on flt" ] @@ -318,6 +320,7 @@ stdout of test 'MAL-signatures` in direc [ "aggr", "submin", "command aggr.submin(b:bat[:any_1], g:bat[:oid], e:bat[:any_2], skip_nils:bit):bat[:any_1] ", "AGGRsubmin_val;", "Grouped minimum aggregate" ] [ "aggr", "submin", "command aggr.submin(b:bat[:any_1], g:bat[:oid], e:bat[:any_2], s:bat[:oid], skip_nils:bit):bat[:oid] ", "AGGRsubmincand;", "Grouped minimum aggregate with candidates list" ] [ "aggr", "submin", "command aggr.submin(b:bat[:any_1], g:bat[:oid], e:bat[:any_2], s:bat[:oid], skip_nils:bit):bat[:any_1] ", "AGGRsubmincand_val;", "Grouped minimum aggregate with candidates list" ] +[ "aggr", "subnot_exist", "command aggr.subnot_exist(b:bat[:any_2], g:bat[:oid], e:bat[:oid], no_nil:bit):bat[:bit] ","SQLsubnot_exist;", "" ] [ "aggr", "subprod", "command aggr.subprod(b:bat[:bte], g:bat[:oid], e:bat[:any_1], skip_nils:bit, abort_on_error:bit):bat[:bte] ", "AGGRsubprod_bte;", "Grouped product aggregate" ] [ "aggr", "subprod", "command aggr.subprod(b:bat[:dbl], g:bat[:oid], e:bat[:any_1], skip_nils:bit, abort_on_error:bit):bat[:dbl] ", "AGGRsubprod_dbl;", "Grouped product aggregate" ] [ "aggr", "subprod", "command aggr.subprod(b:bat[:flt], g:bat[:oid], e:bat[:any_1], skip_nils:bit, abort_on_error:bit):bat[:dbl] ", "AGGRsubprod_dbl;", "Grouped product aggregate" ] @@ -11754,6 +11757,7 @@ stdout of test 'MAL-signatures` in direc [ "sql", "storage", "pattern sql.storage(sname:str) (schema:bat[:str], table:bat[:str], column:bat[:str], type:bat[:str], mode:bat[:str], location:bat[:str], count:bat[:lng], atomwidth:bat[:int], columnsize:bat[:lng], heap:bat[:lng], hashes:bat[:lng], phash:bat[:bit], imprints:bat[:lng], sorted:bat[:bit], revsorted:bat[:bit], key:bat[:bit], orderidx:bat[:lng]) ", "sql_storage;", "return a table with storage information for a particular schema " ] [ "sql", "storage", "pattern sql.storage(sname:str, tname:str) (schema:bat[:str], table:bat[:str], column:bat[:str], type:bat[:str], mode:bat[:str], location:bat[:str], count:bat[:lng], atomwidth:bat[:int], columnsize:bat[:lng], heap:bat[:lng], hashes:bat[:lng], phash:bat[:bit], imprints:bat[:lng], sorted:bat[:bit], revsorted:bat[:bit], key:bat[:bit], orderidx:bat[:lng]) ","sql_storage;", "return a table with storage information for a particular table"] [ "sql", "storage", "pattern sql.storage(sname:str, tname:str, cname:str) (schema:bat[:str], table:bat[:str], column:bat[:str], type:bat[:str], mode:bat[:str], location:bat[:str], count:bat[:lng], atomwidth:bat[:int], columnsize:bat[:lng], heap:bat[:lng], hashes:bat[:lng], phash:bat[:bit], imprints:bat[:lng], sorted:bat[:bit], revsorted:bat[:bit], key:bat[:bit],
MonetDB: default - Merge with Nov2019 branch.
Changeset: cb91c634a7d4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb91c634a7d4 Modified Files: MonetDB.spec NT/mkodbcwxs.py NT/mksqlwxs.py sql/backends/monet5/sql_upgrades.c sql/common/sql_types.c sql/server/sql_scan.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 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/pg_regress/Tests/interval.stable.err sql/test/pg_regress/Tests/interval.stable.err.int128 sql/test/pg_regress/Tests/interval.stable.out sql/test/pg_regress/Tests/interval.stable.out.int128 sql/test/pg_regress/Tests/timestamp.sql sql/test/pg_regress/Tests/timestamptz.sql sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 184021 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -19,15 +19,16 @@ %global _hardened_build 1 # On RedHat Enterprise Linux and derivatives, if the Extra Packages -# for Enterprise Linux (EPEL) repository is available, you can enable -# its use by providing rpmbuild or mock with the "--with epel" option. +# for Enterprise Linux (EPEL) repository is not available, you can +# disable its use by providing rpmbuild or mock with the "--without +# epel" option. # If the EPEL repository is availabe, or if building for Fedora, most # optional sub packages can be built. We indicate that here by # setting the macro fedpkgs to 1. If the EPEL repository is not # available and we are not building for Fedora, we set fedpkgs to 0. %if %{?rhel:1}%{!?rhel:0} # RedHat Enterprise Linux (or CentOS or Scientific Linux) -%bcond_with epel +%bcond_without epel %if %{with epel} # EPEL is enabled through the command line %global fedpkgs 1 diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -55,8 +55,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +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'))): diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -114,8 +114,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +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'))): diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -21,19 +21,14 @@ #include "rel_remote.h" #include "mal_authorize.h" -#ifdef HAVE_EMBEDDED -#define printf(fmt,...) ((void) 0) -#endif - /* this function can be used to recreate the system tables (types, * functions, args) when internal types and/or functions have changed * (i.e. the ones in sql_types.c) */ static str -sql_fix_system_tables(Client c, mvc *sql)
MonetDB: Nov2019 - Merge with Apr2019 branch.
Changeset: a34463b67c84 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a34463b67c84 Modified Files: NT/mkodbcwxs.py NT/mksqlwxs.py sql/test/pg_regress/Tests/interval.stable.err sql/test/pg_regress/Tests/interval.stable.err.int128 sql/test/pg_regress/Tests/interval.stable.out sql/test/pg_regress/Tests/interval.stable.out.int128 sql/test/pg_regress/Tests/timestamp.sql sql/test/pg_regress/Tests/timestamptz.sql sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 Branch: Nov2019 Log Message: Merge with Apr2019 branch. diffs (184 lines): diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -55,8 +55,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +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'))): diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -114,8 +114,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +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'))): diff --git a/sql/test/pg_regress/Tests/interval.stable.err b/sql/test/pg_regress/Tests/interval.stable.err --- a/sql/test/pg_regress/Tests/interval.stable.err +++ b/sql/test/pg_regress/Tests/interval.stable.err @@ -145,10 +145,6 @@ QUERY = SELECT '' AS nine, INTERVAL_TBL. ERROR = !Wrong format (@ 3 seconds ago) CODE = 42000 MAPI = (monetdb) /var/tmp/mtest-3604/.s.monetdb.35433 -QUERY = select avg(f1) from interval_tbl; -ERROR = !types sec_interval(13,0) and double(53,0) are not equal for column 'f1' -CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-3604/.s.monetdb.35433 QUERY = select avg(cast(f1 as double)) from interval_tbl; ERROR = !types sec_interval(13,0) and double(53,0) are not equal for column 'f1' CODE = 42000 diff --git a/sql/test/pg_regress/Tests/interval.stable.err.int128 b/sql/test/pg_regress/Tests/interval.stable.err.int128 --- a/sql/test/pg_regress/Tests/interval.stable.err.int128 +++ b/sql/test/pg_regress/Tests/interval.stable.err.int128 @@ -145,10 +145,6 @@ QUERY = SELECT '' AS nine, INTERVAL_TBL. ERROR = !Wrong format (@ 3 seconds ago) CODE = 42000 MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 -QUERY = select avg(f1) from interval_tbl; -ERROR = !types sec_interval(13,0) and double(53,0) are not equal for column 'f1' -CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 QUERY = select avg(cast(f1 as double)) from interval_tbl; ERROR = !types sec_interval(13,0) and double(53,0) are not equal for column 'f1' CODE = 42000 diff --git a/sql/test/pg_regress/Tests/interval.stable.out b/sql/test/pg_regress/Tests/interval.stable.out --- a/sql/test/pg_regress/Tests/interval.stable.out +++ b/sql/test/pg_regress/Tests/interval.stable.out @@ -58,6 +58,12 @@ stdout of test 'interval` in directory ' % 0, 15 # length [ "", 63513504000.000 ] [ "", 1.234 ] +#select avg(f1) from interval_tbl; +% sys.L3 # table_name +% L3 # name +% double # type +% 24 # length +[ 3.1756752e+13] #select avg(cast(f1 as decimal)) from interval_tbl; % sys.L5 # table_name % L4 # name diff --git a/sql/test/pg_regress/Tests/interval.stable.out.int128 b/sql/test/pg_regress/Tests/interval.stable.out.int128 --- a/sql/test/pg_regress/Tests/interval.stable.out.int128 +++ b/sql/test/pg_regress/Tests/interval.stable.out.int128 @@ -58,6 +58,12 @@ stdout of test 'interval` in directory ' % 0, 15 # length [ "", 63513504000.000 ] [ "", 1.234 ] +#select avg(f1) from interval_tbl; +% sys.L3 # table_name +% L3 # name +% double # type +% 24 # length +[ 3.1756752e+13] #select avg(cast(f1 as decimal)) from interval_tbl; % sys.L4 # table_name % L4 # name diff --git a/sql/test/pg_regress/Tests/timestamp.sql b/sql/test/pg_regress/Tests/timestamp.sql --- a/sql/test/pg_regress/Tests/timestamp.sql +++ b/sql/test/pg_regress/Tests/timestamp.sql @@ -6,11 +6,9 @@ CREATE TABLE TIMESTAMP_TBL ( d1 timestamp(2) ); DECLARE test_now timestamp(2); -DECLARE test_current_timestamp timestamp(2); DECLARE test_current_date date; SET test_now = now; -SET test_current_timestamp = current_timestamp; SET test_current_date = current_date;
MonetDB: Nov2019 - Approve upgrades.
Changeset: 83ffef46fb9b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83ffef46fb9b Modified Files: sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 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/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: Nov2019 Log Message: Approve upgrades. diffs (truncated from 182995 to 300 lines): diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -334,5569 +334,5581 @@ insert into sys.functions values (130, ' insert into sys.args values (25412, 130, 'res_0', 'double', 53, 0, 0, 0); insert into sys.args values (25413, 130, 'arg_1', 'double', 53, 0, 1, 1); insert into sys.args values (25414, 130, 'arg_2', 'double', 53, 0, 1, 2); -insert into sys.functions values (146, 'diff', 'diff', 'sql', 0, 6, false, false, false, 2000, true); -insert into sys.args values (25415, 146, 'res_0', 'boolean', 1, 0, 0, 0); -insert into sys.args values (25416, 146, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.functions values (147, 'diff', 'diff', 'sql', 0, 6, false, false, false, 2000, true); -insert into sys.args values (25417, 147, 'res_0', 'boolean', 1, 0, 0, 0); -insert into sys.args values (25418, 147, 'arg_1', 'boolean', 1, 0, 1, 1); -insert into sys.args values (25419, 147, 'arg_2', 'any', 0, 0, 1, 2); -insert into sys.functions values (148, 'window_bound', 'window_bound', 'sql', 0, 6, false, false, false, 2000, true); -insert into sys.args values (25420, 148, 'res_0', 'bigint', 64, 0, 0, 0); -insert into sys.args values (25421, 148, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.args values (25422, 148, 'arg_2', 'int', 32, 0, 1, 2); -insert into sys.args values (25423, 148, 'arg_3', 'int', 32, 0, 1, 3); -insert into sys.args values (25424, 148, 'arg_4', 'int', 32, 0, 1, 4); -insert into sys.args values (25425, 148, 'arg_5', 'tinyint', 8, 0, 1, 5); -insert into sys.functions values (149, 'window_bound', 'window_bound', 'sql', 0, 6, false, false, false, 2000, true); -insert into sys.args values (25426, 149, 'res_0', 'bigint', 64, 0, 0, 0); -insert into sys.args values (25427, 149, 'arg_1', 'boolean', 1, 0, 1, 1); -insert into sys.args values (25428, 149, 'arg_2', 'any', 0, 0, 1, 2); -insert into sys.args values (25429, 149, 'arg_3', 'int', 32, 0, 1, 3); -insert into sys.args values (25430, 149, 'arg_4', 'int', 32, 0, 1, 4); -insert into sys.args values (25431, 149, 'arg_5', 'int', 32, 0, 1, 5); -insert into sys.args values (25432, 149, 'arg_6', 'tinyint', 8, 0, 1, 6); +insert into sys.functions values (148, 'diff', 'diff', 'sql', 0, 6, false, false, false, 2000, true); +insert into sys.args values (25415, 148, 'res_0', 'boolean', 1, 0, 0, 0); +insert into sys.args values (25416, 148, 'arg_1', 'any', 0, 0, 1, 1); +insert into sys.functions values (149, 'diff', 'diff', 'sql', 0, 6, false, false, false, 2000, true); +insert into sys.args values (25417, 149, 'res_0', 'boolean', 1, 0, 0, 0); +insert into sys.args values (25418, 149, 'arg_1', 'boolean', 1, 0, 1, 1); +insert into sys.args values (25419, 149, 'arg_2', 'any', 0, 0, 1, 2); insert into sys.functions values (150, 'window_bound', 'window_bound', 'sql', 0, 6, false, false, false, 2000, true); -insert into sys.args values (25433, 150, 'res_0', 'bigint', 64, 0, 0, 0); -insert into sys.args values (25434, 150, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.args values (25435, 150, 'arg_2', 'int', 32, 0, 1, 2); -insert into sys.args values (25436, 150, 'arg_3',
MonetDB: Apr2019 - Use the same declared variable in the sql ins...
Changeset: e994c3289040 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e994c3289040 Modified Files: sql/test/pg_regress/Tests/timestamp.sql sql/test/pg_regress/Tests/timestamptz.sql Branch: Apr2019 Log Message: Use the same declared variable in the sql insert, so the test becomes deterministic diffs (46 lines): diff --git a/sql/test/pg_regress/Tests/timestamp.sql b/sql/test/pg_regress/Tests/timestamp.sql --- a/sql/test/pg_regress/Tests/timestamp.sql +++ b/sql/test/pg_regress/Tests/timestamp.sql @@ -6,11 +6,9 @@ CREATE TABLE TIMESTAMP_TBL ( d1 timestamp(2) ); DECLARE test_now timestamp(2); -DECLARE test_current_timestamp timestamp(2); DECLARE test_current_date date; SET test_now = now; -SET test_current_timestamp = current_timestamp; SET test_current_date = current_date; -- Shorthand values @@ -22,7 +20,7 @@ SET test_current_date = current_date; --INSERT INTO TIMESTAMP_TBL VALUES ('now'); INSERT INTO TIMESTAMP_TBL VALUES (test_now); --INSERT INTO TIMESTAMP_TBL VALUES ('current'); -INSERT INTO TIMESTAMP_TBL VALUES (cast(test_current_timestamp as timestamp)); +INSERT INTO TIMESTAMP_TBL VALUES (cast(test_now as timestamp)); --INSERT INTO TIMESTAMP_TBL VALUES ('today'); INSERT INTO TIMESTAMP_TBL VALUES (cast(test_current_date as timestamp)); --INSERT INTO TIMESTAMP_TBL VALUES ('yesterday'); diff --git a/sql/test/pg_regress/Tests/timestamptz.sql b/sql/test/pg_regress/Tests/timestamptz.sql --- a/sql/test/pg_regress/Tests/timestamptz.sql +++ b/sql/test/pg_regress/Tests/timestamptz.sql @@ -6,17 +6,15 @@ CREATE TABLE TIMESTAMPTZ_TBL ( d1 timestamp(2) with time zone); DECLARE test_now timestamp(2) with time zone; -DECLARE test_current_timestamp timestamp(2) with time zone; DECLARE test_current_date date; SET test_now = now; -SET test_current_timestamp = current_timestamp; SET test_current_date = current_date; --INSERT INTO TIMESTAMPTZ_TBL VALUES ('now'); INSERT INTO TIMESTAMPTZ_TBL VALUES (test_now); --INSERT INTO TIMESTAMPTZ_TBL VALUES ('current'); -INSERT INTO TIMESTAMPTZ_TBL VALUES (test_current_timestamp); +INSERT INTO TIMESTAMPTZ_TBL VALUES (test_now); --INSERT INTO TIMESTAMPTZ_TBL VALUES ('today'); INSERT INTO TIMESTAMPTZ_TBL VALUES (cast(test_current_date as timestamptz)); --INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday'); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Nov2019 - Cleaned sql upgrades. Save the session's sche...
Changeset: a9df91e8526b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9df91e8526b Modified Files: sql/backends/monet5/sql_upgrades.c Branch: Nov2019 Log Message: Cleaned sql upgrades. Save the session's schema before all upgrades, because a SQLstatementIntern call might reallocate the mvc's variable stack. Hopefully this fixes the breaking upgrade tests. diffs (truncated from 796 to 300 lines): diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -21,19 +21,14 @@ #include "rel_remote.h" #include "mal_authorize.h" -#ifdef HAVE_EMBEDDED -#define printf(fmt,...) ((void) 0) -#endif - /* this function can be used to recreate the system tables (types, * functions, args) when internal types and/or functions have changed * (i.e. the ones in sql_types.c) */ static str -sql_fix_system_tables(Client c, mvc *sql) +sql_fix_system_tables(Client c, mvc *sql, const char *prev_schema) { size_t bufsize = 100, pos = 0; char *buf = GDKmalloc(bufsize), *err = NULL; - char *schema = stack_get_string(sql, "current_schema"); node *n; sql_schema *s; @@ -174,8 +169,7 @@ sql_fix_system_tables(Client c, mvc *sql } } - if (schema) - pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", schema); + pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", prev_schema); assert(pos < bufsize); printf("Running database upgrade commands:\n%s\n", buf); @@ -186,20 +180,17 @@ sql_fix_system_tables(Client c, mvc *sql #ifdef HAVE_HGE static str -sql_update_hugeint(Client c, mvc *sql) +sql_update_hugeint(Client c, mvc *sql, const char *prev_schema) { size_t bufsize = 8192, pos = 0; char *buf, *err; - char *schema; - if ((err = sql_fix_system_tables(c, sql)) != NULL) + if ((err = sql_fix_system_tables(c, sql, prev_schema)) != NULL) return err; if ((buf = GDKmalloc(bufsize)) == NULL) throw(SQL, "sql_update_hugeint", SQLSTATE(HY001) MAL_MALLOC_FAIL); - schema = stack_get_string(sql, "current_schema"); - pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n"); /* 80_udf_hge.sql */ @@ -250,8 +241,7 @@ sql_update_hugeint(Client c, mvc *sql) "update sys.functions set system = true where name in ('fuse', 'generate_series', 'stddev_samp', 'stddev_pop', 'var_samp', 'var_pop', 'median', 'quantile', 'corr') and schema_id = (select id from sys.schemas where name = 'sys');\n" "update sys.functions set system = true where name = 'filter' and schema_id = (select id from sys.schemas where name = 'json');\n"); - if (schema) - pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", schema); + pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", prev_schema); pos += snprintf(buf + pos, bufsize - pos, "commit;\n"); assert(pos < bufsize); @@ -263,12 +253,10 @@ sql_update_hugeint(Client c, mvc *sql) #endif static str -sql_update_geom(Client c, mvc *sql, int olddb) +sql_update_geom(Client c, mvc *sql, int olddb, const char *prev_schema) { size_t bufsize, pos = 0; - char *buf, *err = NULL; - char *geomupgrade; - char *schema = stack_get_string(sql, "current_schema"); + char *buf, *err = NULL, *geomupgrade; geomsqlfix_fptr fixfunc; node *n; sql_schema *s = mvc_bind_schema(sql, "sys"); @@ -302,8 +290,7 @@ sql_update_geom(Client c, mvc *sql, int t->s ? t->s->base.id : s->base.id); } - if (schema) - pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", schema); + pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", prev_schema); pos += snprintf(buf + pos, bufsize - pos, "commit;\n"); assert(pos < bufsize); @@ -314,11 +301,10 @@ sql_update_geom(Client c, mvc *sql, int } static str -sql_update_jul2017(Client c, mvc *sql) +sql_update_jul2017(Client c, const char *prev_schema) { size_t bufsize = 1, pos = 0; char *buf = GDKmalloc(bufsize), *err = NULL; - char *schema = stack_get_string(sql, "current_schema"); char *q1 = "select id from sys.functions where name = 'shpload' and schema_id = (select id from sys.schemas where name = 'sys');\n"; res_table *output; BAT *b; @@ -418,8 +404,7 @@ sql_update_jul2017(Client c, mvc *sql) } res_tables_destroy(output); - if (schema) - pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", schema); + pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", prev_schema); pos +=
MonetDB: Nov2019 - Make building with EPEL for RHEL the default.
Changeset: 25d122b0b6f2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=25d122b0b6f2 Modified Files: MonetDB.spec Branch: Nov2019 Log Message: Make building with EPEL for RHEL the default. diffs (23 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -19,15 +19,16 @@ %global _hardened_build 1 # On RedHat Enterprise Linux and derivatives, if the Extra Packages -# for Enterprise Linux (EPEL) repository is available, you can enable -# its use by providing rpmbuild or mock with the "--with epel" option. +# for Enterprise Linux (EPEL) repository is not available, you can +# disable its use by providing rpmbuild or mock with the "--without +# epel" option. # If the EPEL repository is availabe, or if building for Fedora, most # optional sub packages can be built. We indicate that here by # setting the macro fedpkgs to 1. If the EPEL repository is not # available and we are not building for Fedora, we set fedpkgs to 0. %if %{?rhel:1}%{!?rhel:0} # RedHat Enterprise Linux (or CentOS or Scientific Linux) -%bcond_with epel +%bcond_without epel %if %{with epel} # EPEL is enabled through the command line %global fedpkgs 1 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Apr2019 - Added support for building on VS 2019.
Changeset: eeadf1368af3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eeadf1368af3 Modified Files: NT/mkodbcwxs.py NT/mksqlwxs.py Branch: Apr2019 Log Message: Added support for building on VS 2019. diffs (28 lines): diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -55,8 +55,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +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'))): diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -114,8 +114,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +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'))): ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Apr2019 - Approved output
Changeset: 7538201b0b50 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7538201b0b50 Modified Files: sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions.stable.out.int128 sql/test/pg_regress/Tests/interval.stable.err sql/test/pg_regress/Tests/interval.stable.err.int128 sql/test/pg_regress/Tests/interval.stable.out sql/test/pg_regress/Tests/interval.stable.out.int128 Branch: Apr2019 Log Message: Approved output diffs (128 lines): diff --git a/sql/test/Tests/systemfunctions.stable.out b/sql/test/Tests/systemfunctions.stable.out --- a/sql/test/Tests/systemfunctions.stable.out +++ b/sql/test/Tests/systemfunctions.stable.out @@ -25,7 +25,7 @@ Ready. # 16:20:25 > #select s.name as "schema", f.name as "function", a.number as "argno", a.type as "argtype", case a.number when 0 then f.func else '' end as "definition" from sys.functions f, sys.schemas s, sys.args a where s.id = f.schema_id and f.id = a.func_id and f.system order by s.name, f.name, f.id, a.number; -% sys.L17, sys.L21,sys.L23,sys.L25,sys.L27 # table_name +% sys.L2, sys.L4, sys.L6, sys.L10,sys.L12 # table_name % schema, function, argno, argtype,definition # name % varchar, varchar,int,varchar,varchar # type % 8, 24, 2, 14, 705 # length @@ -210,6 +210,10 @@ Ready. [ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "real", "" ] [ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "month_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "sec_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "double", "" ] [ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "tinyint", "" ] @@ -220,6 +224,10 @@ Ready. [ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "bigint", "" ] [ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "month_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "sec_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "real", "" ] [ "sys", "bbp", 0, "int", "create function sys.bbp ()\n returns table (id int, name string,\n ttype string, count bigint, refcnt int, lrefcnt int,\n location string, heat int, dirty string,\n status string, kind string)\n external name bbp.get;" ] [ "sys", "bbp", 1, "clob", "" ] diff --git a/sql/test/Tests/systemfunctions.stable.out.int128 b/sql/test/Tests/systemfunctions.stable.out.int128 --- a/sql/test/Tests/systemfunctions.stable.out.int128 +++ b/sql/test/Tests/systemfunctions.stable.out.int128 @@ -25,7 +25,7 @@ Ready. # 16:20:25 > #select s.name as "schema", f.name as "function", a.number as "argno", a.type as "argtype", case a.number when 0 then f.func else '' end as "definition" from sys.functions f, sys.schemas s, sys.args a where s.id = f.schema_id and f.id = a.func_id and f.system order by s.name, f.name, f.id, a.number; -% sys.L17, sys.L21,sys.L23,sys.L25,sys.L27 # table_name +% sys.L2, sys.L4, sys.L6, sys.L10,sys.L12 # table_name % schema, function, argno, argtype,definition # name % varchar, varchar,int,varchar,varchar # type % 8, 24, 2, 14, 705 # length @@ -219,6 +219,10 @@ Ready. [ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "real", "" ] [ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "month_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "sec_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "double", "" ] [ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "tinyint", "" ] @@ -231,6 +235,10 @@ Ready. [ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "hugeint", "" ] [ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "month_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] +[ "sys", "avg", 1, "sec_interval", "" ] +[ "sys", "avg", 0, "double", "avg" ] [ "sys", "avg", 1, "real", "" ] [ "sys", "bbp", 0, "int", "create function sys.bbp ()\n returns table (id int, name string,\n ttype string, count bigint, refcnt
MonetDB: Nov2019 - Merge with Apr2019 branch.
Changeset: 4f773a582e89 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f773a582e89 Modified Files: sql/common/sql_types.c sql/server/sql_scan.c Branch: Nov2019 Log Message: Merge with Apr2019 branch. diffs (23 lines): 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 @@ -1663,6 +1663,9 @@ sqltypeinit( sql_allocator *sa) #endif sql_create_aggr(sa, "avg", "aggr", "avg", FLT, DBL); + sql_create_aggr(sa, "avg", "aggr", "avg", MONINT, DBL); + sql_create_aggr(sa, "avg", "aggr", "avg", SECINT, DBL); + sql_create_aggr(sa, "count_no_nil", "aggr", "count_no_nil", NULL, LNG); sql_create_aggr(sa, "count", "aggr", "count", NULL, LNG); @@ -1850,6 +1853,9 @@ sqltypeinit( sql_allocator *sa) sql_create_analytic(sa, "avg", "sql", "avg", HGE, DBL, SCALE_NONE); #endif + sql_create_analytic(sa, "avg", "sql", "avg", MONINT, DBL, SCALE_NONE); + sql_create_analytic(sa, "avg", "sql", "avg", SECINT, DBL, SCALE_NONE); + #if 0 t = decimals; // BTE sql_create_analytic(sa, "avg", "sql", "avg", *(t), DBL, SCALE_NONE); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Apr2019 - A few more size_t's.
Changeset: dfe75b3445b7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dfe75b3445b7 Modified Files: sql/server/sql_scan.c Branch: Apr2019 Log Message: A few more size_t's. diffs (21 lines): diff --git a/sql/server/sql_scan.c b/sql/server/sql_scan.c --- a/sql/server/sql_scan.c +++ b/sql/server/sql_scan.c @@ -806,7 +806,7 @@ keyword_or_ident(mvc * c, int cur) { struct scanner *lc = >scanner; keyword *k = NULL; - int s; + size_t s; lc->started = 1; utf8_putchar(lc, cur); @@ -1352,7 +1352,7 @@ sqllex(YYSTYPE * yylval, void *parm) } else if (token == SCOLON) { /* ignore semi-colon(s) following a semi-colon */ if (lc->yylast == SCOLON) { - int prev = lc->yycur; + size_t prev = lc->yycur; while ((token = sql_get_next_token(yylval, parm)) == SCOLON) prev = lc->yycur; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list