Changeset: 665b2d53bba4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=665b2d53bba4
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
common/stream/stream.c
geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
monetdb5/modules/kernel/status.c
monetdb5/modules/kernel/status.mal
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
sql/test/Skyserver/Skyserver_import.sql
Branch: default
Log Message:
Merge with Apr2019 branch
diffs (truncated from 1585 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
@@ -11890,9 +11890,9 @@ Ready.
[ "sqlcatalog", "revoke_function", "pattern
sqlcatalog.revoke_function(sname:str, fcnid:int, grantee:str, privs:int,
grant:int, grantor:int):void ", "SQLrevoke_function;", "Catalog
operation revoke_function" ]
[ "sqlcatalog", "revoke_roles", "pattern
sqlcatalog.revoke_roles(sname:str, auth:str, grantor:int, admin:int):void ",
"SQLrevoke_roles;", "Catalog operation revoke_roles" ]
[ "status", "batStatistics", "command status.batStatistics()
(X_0:bat[:str], X_1:bat[:str]) ", "SYSgdkEnv;", "Show distribution of
bats by kind" ]
-[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:int]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
+[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
[ "status", "getThreads", "command status.getThreads() (X_0:bat[:int],
X_1:bat[:str]) ", "SYSgdkThread;", "Produce overview of active threads"
]
-[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:int]) ", "SYSioStatistics;", "Global IO activity
information" ]
+[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:lng]) ", "SYSioStatistics;", "Global IO activity
information" ]
[ "status", "memStatistics", "command status.memStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmemStatistics;", "Global memory
usage information" ]
[ "status", "memUsage", "command status.memUsage(minsize:lng)
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmem_usage;", "Get a split-up of
how much memory blocks are in use" ]
[ "status", "mem_cursize", "command status.mem_cursize():lng ",
"SYSgetmem_cursize;", "The amount of physical swapspace in KB that is
currently in use" ]
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
@@ -16317,9 +16317,9 @@ Ready.
[ "sqlcatalog", "revoke_function", "pattern
sqlcatalog.revoke_function(sname:str, fcnid:int, grantee:str, privs:int,
grant:int, grantor:int):void ", "SQLrevoke_function;", "Catalog
operation revoke_function" ]
[ "sqlcatalog", "revoke_roles", "pattern
sqlcatalog.revoke_roles(sname:str, auth:str, grantor:int, admin:int):void ",
"SQLrevoke_roles;", "Catalog operation revoke_roles" ]
[ "status", "batStatistics", "command status.batStatistics()
(X_0:bat[:str], X_1:bat[:str]) ", "SYSgdkEnv;", "Show distribution of
bats by kind" ]
-[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:int]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
+[ "status", "cpuStatistics", "command status.cpuStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYScpuStatistics;", "Global cpu
usage information" ]
[ "status", "getThreads", "command status.getThreads() (X_0:bat[:int],
X_1:bat[:str]) ", "SYSgdkThread;", "Produce overview of active threads"
]
-[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:int]) ", "SYSioStatistics;", "Global IO activity
information" ]
+[ "status", "ioStatistics", "command status.ioStatistics() (X_0:bat[:str],
X_1:bat[:lng]) ", "SYSioStatistics;", "Global IO activity
information" ]
[ "status", "memStatistics", "command status.memStatistics()
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmemStatistics;", "Global memory
usage information" ]
[ "status", "memUsage", "command status.memUsage(minsize:lng)
(X_0:bat[:str], X_1:bat[:lng]) ", "SYSmem_usage;", "Get a split-up of
how much memory blocks are in use" ]
[ "status", "mem_cursize", "command status.mem_cursize():lng ",
"SYSgetmem_cursize;", "The amount of physical swapspace in KB that is
currently in use" ]
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -968,9 +968,7 @@ stream_gzread(stream *restrict s, void *
return 0;
size = gzfread(buf, elmsize, cnt, fp);
-#ifdef WIN32
- /* on Windows when in text mode, convert \r\n line
- * endings to \n */
+ /* when in text mode, convert \r\n line endings to \n */
if (!s->binary) {
char *p1, *p2, *pe;
@@ -987,7 +985,6 @@ stream_gzread(stream *restrict s, void *
p1++;
}
}
-#endif
return size == 0 ? -1 : (ssize_t) size;
}
@@ -1190,9 +1187,7 @@ stream_bzread(stream *restrict s, void *
s->errnr = MNSTR_READ_ERROR;
return -1;
}
-#ifdef WIN32
- /* on Windows when in text mode, convert \r\n line endings to
- * \n */
+ /* when in text mode, convert \r\n line endings to \n */
if (!s->binary) {
char *p1, *p2, *pe;
@@ -1209,7 +1204,6 @@ stream_bzread(stream *restrict s, void *
p1++;
}
}
-#endif
return (ssize_t) (size / elmsize);
}
@@ -1432,9 +1426,8 @@ stream_xzread(stream *restrict s, void *
}
}
if (ressize) {
-#ifdef WIN32
- /* on Windows when in text mode, convert \r\n line
- * endings to \n */
+ /* when in text mode, convert \r\n line endings to
+ * \n */
if (!s->binary) {
char *p1, *p2, *pe;
@@ -1451,7 +1444,6 @@ stream_xzread(stream *restrict s, void *
p1++;
}
}
-#endif
return (ssize_t) (ressize / elmsize);
}
return 0;
@@ -1719,8 +1711,7 @@ stream_lz4read(stream *restrict s, void
total_read += remaining_to_decompress;
}
-#ifdef WIN32
- /* on Windows when in text mode, convert \r\n line endings to \n */
+ /* when in text mode, convert \r\n line endings to \n */
if (!s->binary) {
char *p1, *p2, *pe;
@@ -1737,7 +1728,6 @@ stream_lz4read(stream *restrict s, void
p1++;
}
}
-#endif
return (ssize_t) (total_read / elmsize);
}
diff --git a/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
b/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
--- a/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
+++ b/geom/sql/pg_regression/Tests/removeTmpFiles.SQL.py
@@ -2,9 +2,9 @@ import os
filename=os.path.join(os.getenv("TSTSRCDIR"), "tmpfile_1")
if os.path.isfile(filename):
- os.remove(filename);
+ os.remove(filename);
filename=os.path.join(os.getenv("TSTSRCDIR"), "tmpfile_2")
if os.path.isfile(filename):
- os.remove(filename);
+ os.remove(filename);
diff --git a/monetdb5/modules/kernel/status.c b/monetdb5/modules/kernel/status.c
--- a/monetdb5/modules/kernel/status.c
+++ b/monetdb5/modules/kernel/status.c
@@ -121,12 +121,12 @@ static struct tms state;
str
SYScpuStatistics(bat *ret, bat *ret2)
{
- int i;
+ lng i;
BAT *b, *bn;
#ifdef HAVE_TIMES
struct tms newst;
# ifndef HZ
- static int HZ;
+ static int HZ = 0;
if (HZ == 0) {
# if defined(HAVE_SYSCONF) && defined(_SC_CLK_TCK)
@@ -139,7 +139,7 @@ SYScpuStatistics(bat *ret, bat *ret2)
#endif
bn = COLnew(0, TYPE_str, 32, TRANSIENT);
- b = COLnew(0, TYPE_int, 32, TRANSIENT);
+ b = COLnew(0, TYPE_lng, 32, TRANSIENT);
if (b == 0 || bn == 0){
if ( b) BBPunfix(b->batCacheid);
if ( bn) BBPunfix(bn->batCacheid);
@@ -152,7 +152,7 @@ SYScpuStatistics(bat *ret, bat *ret2)
}
times(&newst);
/* store counters, ignore errors */
- i = (int) (time(0) - clk);
+ i = (lng) (time(0) - clk);
if (BUNappend(bn, "elapsed", false) != GDK_SUCCEED ||
BUNappend(b, &i, false) != GDK_SUCCEED)
goto bailout;
@@ -175,7 +175,7 @@ SYScpuStatistics(bat *ret, bat *ret2)
state = newst;
#else
- i = int_nil;
+ i = lng_nil;
if (BUNappend(bn, "elapsed", false) != GDK_SUCCEED ||
BUNappend(b, &i, false) != GDK_SUCCEED ||
BUNappend(bn, "user", false) != GDK_SUCCEED ||
@@ -484,24 +484,24 @@ SYSvm_usage(bat *ret, bat *ret2, const l
str
SYSioStatistics(bat *ret, bat *ret2)
{
-#ifndef NATIVE_WIN32
+#ifdef HAVE_SYS_RESOURCE_H
struct rusage ru;
#endif
- int i;
+ lng i;
BAT *b, *bn;
-#ifndef NATIVE_WIN32
+#ifdef HAVE_SYS_RESOURCE_H
getrusage(RUSAGE_SELF, &ru);
#endif
bn = COLnew(0, TYPE_str, 32, TRANSIENT);
- b = COLnew(0, TYPE_int, 32, TRANSIENT);
+ b = COLnew(0, TYPE_lng, 32, TRANSIENT);
if (b == 0 || bn == 0) {
if ( b) BBPunfix(b->batCacheid);
if ( bn) BBPunfix(bn->batCacheid);
throw(MAL, "status.ioStatistics", SQLSTATE(HY001)
MAL_MALLOC_FAIL);
}
-#ifndef NATIVE_WIN32
+#ifdef HAVE_SYS_RESOURCE_H
/* store counters, ignore errors */
i = ru.ru_maxrss;
if (BUNappend(bn, "maxrss", false) != GDK_SUCCEED ||
@@ -536,7 +536,7 @@ SYSioStatistics(bat *ret, bat *ret2)
BUNappend(b, &i, false) != GDK_SUCCEED)
goto bailout;
#else
- i = int_nil;
+ i = lng_nil;
if (BUNappend(bn, "maxrss", false) != GDK_SUCCEED ||
BUNappend(b, &i, false) != GDK_SUCCEED ||
BUNappend(bn, "minflt", false) != GDK_SUCCEED ||
diff --git a/monetdb5/modules/kernel/status.mal
b/monetdb5/modules/kernel/status.mal
--- a/monetdb5/modules/kernel/status.mal
+++ b/monetdb5/modules/kernel/status.mal
@@ -6,13 +6,13 @@
module status;
-command cpuStatistics()(:bat[:str],:bat[:int] )
+command cpuStatistics()(:bat[:str],:bat[:lng] )
address SYScpuStatistics
comment "Global cpu usage information";
command memStatistics() (:bat[:str],:bat[:lng] )
address SYSmemStatistics
comment "Global memory usage information";
-command ioStatistics()(:bat[:str],:bat[:int] )
+command ioStatistics()(:bat[:str],:bat[:lng] )
address SYSioStatistics
comment "Global IO activity information";
command vmStatistics(minsize:lng)(:bat[:str],:bat[:lng] )
diff --git
a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
--- a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
+++ b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
@@ -268,12 +268,12 @@ Ready.
% v # name
% blob # type
% 0 # length
+[ NULL ]
[ ]
[ 00 ]
+[ 0123456789 ]
[ 11 ]
-[ 0123456789 ]
[ A0B2C3D4F5 ]
-[ NULL ]
#SELECT v, convert(v, varchar(16)) from T_blob;
% sys.t_blob, sys.L3 # table_name
% v, L3 # name
@@ -5862,8 +5862,8 @@ Ready.
[ "", "" ]
[ NULL, NULL ]
#SELECT v, cast(v as Blob) from T_char where v in ('0123456789');
-% sys.t_char, sys.L4 # table_name
-% v, L4 # name
+% sys.t_char, sys.L3 # table_name
+% v, L3 # name
% char, blob # type
% 33, 0 # length
[ "0123456789", 0123456789 ]
@@ -6202,8 +6202,8 @@ Ready.
[ "", "" ]
[ NULL, NULL ]
#SELECT v, cast(v as Blob) from T_varchar where v in ('0123456789');
-% sys.t_varchar, sys.L4 # table_name
-% v, L4 # name
+% sys.t_varchar, sys.L3 # table_name
+% v, L3 # name
% varchar, blob # type
% 10, 0 # length
[ "0123456789", 0123456789 ]
@@ -6542,8 +6542,8 @@ Ready.
[ "", "" ]
[ NULL, NULL ]
#SELECT v, cast(v as Blob) from T_clob where v in ('0123456789');
-% sys.t_clob, sys.L4 # table_name
-% v, L4 # name
+% sys.t_clob, sys.L3 # table_name
+% v, L3 # name
% clob, blob # type
% 10, 0 # length
[ "0123456789", 0123456789 ]
diff --git
a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
---
a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
+++
b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
@@ -292,12 +292,12 @@ Ready.
% v # name
% blob # type
% 0 # length
+[ NULL ]
[ ]
[ 00 ]
+[ 0123456789 ]
[ 11 ]
-[ 0123456789 ]
[ A0B2C3D4F5 ]
-[ NULL ]
#SELECT v, convert(v, varchar(16)) from T_blob;
% sys.t_blob, sys.L3 # table_name
% v, L3 # name
@@ -5844,127 +5844,127 @@ Ready.
[ "AaZz" ]
[ "~!@#$%^&*(')_/-+=:;\"<.,.>?" ]
#SELECT v, convert(v, boolean) from T_char where v in ('0', '1');
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list