Changeset: 0d7ce69fea33 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0d7ce69fea33
Branch: octbugs
Log Message:
Merge with Oct2020 branch.
diffs (222 lines):
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -1237,12 +1237,21 @@ GDKanalytical_str_group_concat(BAT *r, B
}
if (empty) {
- if ((single_str = GDKstrdup(str_nil)) == NULL)
- goto allocation_error;
+ if (single_str == NULL) { /* reuse the same buffer,
resize it when needed */
+ max_group_length = 1;
+ if ((single_str = GDKmalloc(max_group_length +
1)) == NULL)
+ goto allocation_error;
+ } else if (1 > max_group_length) {
+ max_group_length = 1;
+ if ((next_single_str = GDKrealloc(single_str,
max_group_length + 1)) == NULL)
+ goto allocation_error;
+ single_str = next_single_str;
+ }
+ strcpy(single_str, str_nil);
hasnil = true;
} else {
empty = true;
- if (!single_str) { /* reuse the same buffer, resize it
when needed */
+ if (single_str == NULL) { /* reuse the same buffer,
resize it when needed */
max_group_length = next_group_length;
if ((single_str = GDKmalloc(max_group_length +
1)) == NULL)
goto allocation_error;
diff --git a/geom/monetdb5/geom_upgrade.c b/geom/monetdb5/geom_upgrade.c
--- a/geom/monetdb5/geom_upgrade.c
+++ b/geom/monetdb5/geom_upgrade.c
@@ -4546,7 +4546,7 @@ geom_sql_upgrade(int olddb)
"'st_ymax', 'st_ymax', 'st_ymin', 'st_ymin', 'st_z') "
"and schema_id = (select id from sys.schemas where name
= 'sys');\n");
pos += snprintf(buf + pos, bufsize - pos,
- "update _tables set system = true where name in
('geometry_columns', 'spatial_ref_sys') and schema_id = (select id from schemas
where name = 'sys');\n");
+ "update sys._tables set system = true where name in
('geometry_columns', 'spatial_ref_sys') and schema_id = (select id from
sys.schemas where name = 'sys');\n");
return buf;
}
diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c
--- a/monetdb5/modules/atoms/json.c
+++ b/monetdb5/modules/atoms/json.c
@@ -561,8 +561,10 @@ JSONglue(str res, str r, char sep)
size_t len, l;
str n;
- if (r == 0 || *r == 0)
+ if (r == 0 || *r == 0) {
+ GDKfree(r);
return res;
+ }
len = strlen(r);
if (res == 0)
return r;
@@ -1617,14 +1619,14 @@ JSONkeyArray(json *ret, json *js)
CHECK_JSON(jt);
if (jt->elm[0].kind == JSON_OBJECT) {
for (i = jt->elm[0].next; i; i = jt->elm[i].next) {
- r = GDKzalloc(jt->elm[i].valuelen + 3);
- if (r == NULL) {
- JSONfree(jt);
- goto memfail;
- }
- if (jt->elm[i].valuelen)
+ if (jt->elm[i].valuelen) {
+ r = GDKzalloc(jt->elm[i].valuelen + 3);
+ if (r == NULL) {
+ JSONfree(jt);
+ goto memfail;
+ }
strncpy(r, jt->elm[i].value - 1,
jt->elm[i].valuelen + 2);
- else {
+ } else {
r = GDKstrdup("\"\"");
if(r == NULL) {
JSONfree(jt);
diff --git a/sql/test/BugTracker-2009/Tests/All
b/sql/test/BugTracker-2009/Tests/All
--- a/sql/test/BugTracker-2009/Tests/All
+++ b/sql/test/BugTracker-2009/Tests/All
@@ -25,7 +25,7 @@ bool-str-bug
rollback_bug
update-crash
correlated-selection-bug
-HAVE_MAL_DEBUGGER&NOT_WIN32?segfault_when_quitting_debugger.SF-2538837
+NOT_WIN32?segfault_when_quitting_debugger.SF-2538837
row_number_bug.SF-2546109
#set_history_and_drop_table.SF-2607045 not relevant anymore
TypeException_having_count_distinct.SF-2494227
diff --git
a/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
b/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
---
a/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
+++
b/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
@@ -17,7 +17,7 @@ stdout of test 'segfault_when_quitting_d
#set optimizer = 'sequential_pipe'; -- to get predictable errors
#debug select * from tables;
-mdb>#X_1=0@0:void := querylog.define("debug select * from tables;",
"sequential_pipe", 136:int);
+mdb>#X_1=0@0:void := querylog.define("debug select * from tables;",
"sequential_pipe", 154:int);
# 22:21:12 >
# 22:21:12 > "Done."
diff --git a/sql/test/BugTracker/Tests/All b/sql/test/BugTracker/Tests/All
--- a/sql/test/BugTracker/Tests/All
+++ b/sql/test/BugTracker/Tests/All
@@ -79,7 +79,7 @@ HAVE_JDBCCLIENT_JAR?explain.SF-1739353
limit_timestampz.SF-1774217
convert_dec2varchar.SF-1774312
convert_dec2varchar_crash.SF-1775550
-HAVE_JDBCCLIENT_JAR&HAVE_MAL_DEBUGGER?jdbc_no_debug.SF-1739356
+HAVE_JDBCCLIENT_JAR?jdbc_no_debug.SF-1739356
cascade_operations_in_different_sessions.SF-1823387_create
cascade_operations_in_different_sessions.SF-1823387_drop
number_null_first_row.SF-1833286
diff --git a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
--- a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
+++ b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
@@ -55,8 +55,8 @@ Operation successful
+--------------------------------------------------------------------------------------------------------------------+
| mal
|
+====================================================================================================================+
-| function user.s4_0():void;
|
-| X_1:void := querylog.define("explain select count(*) from
tables\n;":str, "sequential_pipe":str, 33:int); |
+| function user.main():void;
|
+| X_1:void := querylog.define("explain select count(*) from
tables\n;":str, "sequential_pipe":str, 32:int); |
| X_42:bat[:lng] := bat.new(nil:lng);
|
| X_4:int := sql.mvc();
|
| X_22:bat[:sht] := sql.bind(X_4:int, "sys":str, "_tables":str,
"type":str, 0:int); |
@@ -68,40 +68,40 @@ Operation successful
| C_94:bat[:oid] := algebra.thetaselect(X_24:bat[:sht], C_5:bat[:oid],
2:sht, "!=":str); |
| C_30:bat[:oid] := sql.subdelta(C_91:bat[:oid], C_5:bat[:oid],
X_25:bat[:oid], C_92:bat[:oid], C_94:bat[:oid]); |
| X_34:lng := aggr.count(C_30:bat[:oid]);
|
-| X_41:bat[:lng] := sql.single(X_34:lng);
|
+| X_41:bat[:lng] := bat.single(X_34:lng);
|
| C_35:bat[:oid] := sql.tid(X_4:int, "tmp":str, "_tables":str);
|
| X_40:lng := aggr.count(C_35:bat[:oid]);
|
| X_44:bat[:lng] := bat.append(X_42:bat[:lng], X_41:bat[:lng], true:bit);
|
| X_46:bat[:lng] := bat.append(X_44:bat[:lng], X_40:lng, true:bit);
|
| X_47:lng := aggr.sum(X_46:bat[:lng]);
|
| sql.resultSet(".%10":str, "%10":str, "bigint":str, 64:int, 0:int, 7:int,
X_47:lng); |
-| end user.s4_0;
|
-| #inline actions= 0 time=1 usec
|
+| end user.main;
|
+| #inline actions= 0 time=0 usec
|
| #remap actions= 0 time=1 usec
|
-| #costmodel actions= 1 time=2 usec
|
-| #coercion actions= 1 time=6 usec
|
-| #aliases actions= 1 time=7 usec
|
-| #evaluate actions= 0 time=7 usec
|
+| #costmodel actions= 1 time=1 usec
|
+| #coercion actions= 0 time=1 usec
|
+| #aliases actions= 1 time=4 usec
|
+| #evaluate actions= 0 time=4 usec
|
| #emptybind actions= 0 time=1 usec
|
-| #pushselect actions= 2 time=25 usec
|
+| #pushselect actions= 2 time=16 usec
|
| #aliases actions= 0 time=0 usec
|
-| #mergetable actions= 0 time=40 usec
|
-| #deadcode actions=14 time=16 usec
|
+| #mergetable actions= 0 time=27 usec
|
+| #deadcode actions=14 time=7 usec
|
| #aliases actions= 0 time=1 usec
|
-| #constants actions= 1 time=8 usec
|
-| #commonTerms actions= 0 time=7 usec
|
-| #projectionpath actions= 0 time=3 usec
|
-| #deadcode actions= 0 time=8 usec
|
-| #reorder actions= 1 time=23 usec
|
+| #constants actions= 1 time=3 usec
|
+| #commonTerms actions= 0 time=4 usec
|
+| #projectionpath actions= 0 time=2 usec
|
+| #deadcode actions= 0 time=4 usec
|
+| #reorder actions= 1 time=12 usec
|
| #matpack actions= 0 time=0 usec
|
| #multiplex actions= 0 time=1 usec
|
| #profiler actions= 1 time=1 usec
|
-| #candidates actions= 1 time=1 usec
|
-| #deadcode actions= 0 time=7 usec
|
-| #postfix actions= 0 time=6 usec
|
+| #candidates actions= 1 time=0 usec
|
+| #deadcode actions= 0 time=4 usec
|
+| #postfix actions= 0 time=3 usec
|
| #wlc actions= 0 time=0 usec
|
-| #garbagecollector actions= 1 time=40 usec
|
-| #total actions=27 time=306 usec
|
+| #garbagecollector actions= 1 time=23 usec
|
+| #total actions=27 time=175 usec
|
+--------------------------------------------------------------------------------------------------------------------+
47 rows
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -372,9 +372,6 @@ CONDITIONALS = {
# from configure.ag:
# These should cover all AM_CONDITIONALS defined in configure.ag, i.e.,
# `grep AM_CONDITIONAL configure.ag | sed
's|^AM_CONDITIONAL(\([^,]*\),.*$|\1|' | sort -u`
- 'BITS32' : "@BITS32_FALSE@",
- 'BITS64' : "@BITS64_FALSE@",
- 'CROSS_COMPILING' : "@CROSS_COMPILING_FALSE@",
'HAVE_CURL' : "@HAVE_CURL_FALSE@",
'HAVE_FITS' : "@HAVE_FITS_FALSE@",
'HAVE_GEOM' : "@HAVE_GEOM_FALSE@",
@@ -387,7 +384,6 @@ CONDITIONALS = {
'HAVE_LIBR' : "@HAVE_LIBR_FALSE@",
'HAVE_LIBXML' : "@HAVE_LIBXML_FALSE@",
'HAVE_LIBZ' : "@HAVE_LIBZ_FALSE@",
- 'HAVE_MAL_DEBUGGER' : "@HAVE_MAL_DEBUGGER_FALSE@",
'HAVE_NETCDF' : "@HAVE_NETCDF_FALSE@",
'HAVE_ODBC' : "@HAVE_ODBC_FALSE@",
'HAVE_PROJ' : "@HAVE_PROJ_FALSE@",
@@ -3571,12 +3567,6 @@ else:
if "A" <= MAJOR and MAJOR <= "Z":
RELEASE = RELEASE.split(".", 1)[1]
-# this is for the wine/mingw setup
-if sys.platform == 'linux2' and CONDITIONALS['CROSS_COMPILING']:
- SYST = 'Windows'
- HOST = "WINE"
- RELEASE = "5.2"
-
# see if we can use UNIX sockets
try:
server = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list