Changeset: d3a40c829f76 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3a40c829f76 Modified Files: gdk/gdk_utils.c sql/backends/monet5/rel_bin.c sql/test/subquery/Tests/subquery6.sql sql/test/subquery/Tests/subquery6.stable.out Branch: default Log Message:
Merged with Jun2020 carefully diffs (168 lines): diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -413,7 +413,7 @@ MT_init(void) cgr = cgr2; else continue; - /* buf point at mount ID */ + /* buf points at mount ID */ p = strchr(buf, ' '); if (p == NULL) break; @@ -469,13 +469,14 @@ MT_init(void) bool success = false; /* true if we can open any file */ FILE *f; uint64_t mem; - size_t l; p = strchr(buf, '\n'); if (p == NULL) break; *p = 0; if (strncmp(buf, "0::", 3) == 0) { + size_t l; + /* cgroup v2 entry */ l = strconcat_len(pth, sizeof(pth), cgr2, buf + 3, "/", NULL); @@ -525,11 +526,19 @@ MT_init(void) *p++ = 0; if (strstr(q, "memory") == NULL) continue; - l = strconcat_len(pth, sizeof(pth), - cgr1, p, "/", NULL); /* limit of memory usage */ - strcpy(pth + l, "memory.limit_in_bytes"); + strconcat_len(pth, sizeof(pth), + cgr1, p, + "/memory.limit_in_bytes", + NULL); f = fopen(pth, "r"); + if (f == NULL) { + strconcat_len(pth, sizeof(pth), + cgr1, + "/memory.limit_in_bytes", + NULL); + f = fopen(pth, "r"); + } if (f != NULL) { if (fscanf(f, "%" SCNu64, &mem) == 1 && mem < (uint64_t) _MT_pagesize * _MT_npages) { @@ -539,8 +548,18 @@ MT_init(void) fclose(f); } /* soft limit of memory usage */ - strcpy(pth + l, "memory.soft_limit_in_bytes"); + strconcat_len(pth, sizeof(pth), + cgr1, p, + "/memory.soft_limit_in_bytes", + NULL); f = fopen(pth, "r"); + if (f == NULL) { + strconcat_len(pth, sizeof(pth), + cgr1, + "/memory.soft_limit_in_bytes", + NULL); + f = fopen(pth, "r"); + } if (f != NULL) { if (fscanf(f, "%" SCNu64, &mem) == 1 && mem < (uint64_t) _MT_pagesize * _MT_npages) { @@ -551,8 +570,18 @@ MT_init(void) } /* limit of memory+swap usage * we use this as maximum virtual memory size */ - strcpy(pth + l, "memory.memsw.limit_in_bytes"); + strconcat_len(pth, sizeof(pth), + cgr1, p, + "/memory.memsw.limit_in_bytes", + NULL); f = fopen(pth, "r"); + if (f == NULL) { + strconcat_len(pth, sizeof(pth), + cgr1, + "/memory.memsw.limit_in_bytes", + NULL); + f = fopen(pth, "r"); + } if (f != NULL) { if (fscanf(f, "%" SCNu64, &mem) == 1 && mem < (uint64_t) GDK_vm_maxsize) { diff --git a/sql/test/subquery/Tests/subquery6.sql b/sql/test/subquery/Tests/subquery6.sql --- a/sql/test/subquery/Tests/subquery6.sql +++ b/sql/test/subquery/Tests/subquery6.sql @@ -87,6 +87,10 @@ SELECT (SELECT 1 FROM another_t t1 WHERE -- NULL -- NULL +SELECT t1.colid FROM tbl_productsales t1 INNER JOIN tbl_productsales t2 ON t1.product_category NOT LIKE t2.product_category ORDER BY t1.colid; + +SELECT t1.colid FROM tbl_productsales t1 INNER JOIN tbl_productsales t2 ON t1.product_category NOT LIKE t2.product_name ORDER BY t1.colid; + DROP TABLE tbl_ProductSales; DROP TABLE another_T; DROP TABLE integers; diff --git a/sql/test/subquery/Tests/subquery6.stable.out b/sql/test/subquery/Tests/subquery6.stable.out --- a/sql/test/subquery/Tests/subquery6.stable.out +++ b/sql/test/subquery/Tests/subquery6.stable.out @@ -33,14 +33,14 @@ stdout of test 'subquery6` in directory % tinyint # type % 1 # length #SELECT (SELECT (SELECT SUM(col1)) IN (MAX(col2))) FROM another_t; -% sys.%6 # table_name -% %6 # name +% sys.%5 # table_name +% %5 # name % boolean # type % 5 # length [ false ] #SELECT (SELECT (SELECT SUM(col1)) IN (MAX(col2), '12')) FROM another_t; -% sys.%7 # table_name -% %7 # name +% sys.%6 # table_name +% %6 # name % boolean # type % 5 # length [ false ] @@ -107,6 +107,40 @@ stdout of test 'subquery6` in directory [ NULL ] [ NULL ] [ NULL ] +#SELECT t1.colid FROM tbl_productsales t1 INNER JOIN tbl_productsales t2 ON t1.product_category NOT LIKE t2.product_category ORDER BY t1.colid; +% sys.t1 # table_name +% colid # name +% int # type +% 1 # length +[ 1 ] +[ 1 ] +[ 2 ] +[ 2 ] +[ 3 ] +[ 3 ] +[ 4 ] +[ 4 ] +#SELECT t1.colid FROM tbl_productsales t1 INNER JOIN tbl_productsales t2 ON t1.product_category NOT LIKE t2.product_name ORDER BY t1.colid; +% sys.t1 # table_name +% colid # name +% int # type +% 1 # length +[ 1 ] +[ 1 ] +[ 1 ] +[ 1 ] +[ 2 ] +[ 2 ] +[ 2 ] +[ 2 ] +[ 3 ] +[ 3 ] +[ 3 ] +[ 3 ] +[ 4 ] +[ 4 ] +[ 4 ] +[ 4 ] #DROP TABLE tbl_ProductSales; #DROP TABLE another_T; #DROP TABLE integers; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list