Changeset: 3861d0844dd3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3861d0844dd3
Modified Files:
monetdb5/modules/atoms/json.c
monetdb5/modules/atoms/uuid.c
monetdb5/optimizer/opt_remap.c
Branch: pushcands
Log Message:
Merged with default
diffs (158 lines):
diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -171,6 +171,7 @@ printStack(stream *f, MalBlkPtr mb, MalS
{
int i = 0;
+ setVariableScope(mb);
if (s) {
mnstr_printf(f, "#Stack '%s' size=%d top=%d\n",
getInstrPtr(mb, 0)->fcnname, s->stksize,
s->stktop);
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
@@ -186,7 +186,8 @@ JSONtoString(str *s, size_t *len, const
}
if (external) {
assert(*len >= strlen("nil") + 1);
- return (ssize_t) strcpy(*s, "nil");
+ strcpy(*s, "nil");
+ return 3;
}
assert(*len >= strlen(str_nil) + 1);
strcpy(*s, str_nil);
diff --git a/monetdb5/optimizer/opt_costModel.c
b/monetdb5/optimizer/opt_costModel.c
--- a/monetdb5/optimizer/opt_costModel.c
+++ b/monetdb5/optimizer/opt_costModel.c
@@ -16,9 +16,7 @@
c1 = getRowCnt(mb, getArg(p,W));\
c2 = getRowCnt(mb, getArg(p,X));\
/* just to ensure that rowcnt was/is never set to -1 */\
- assert(c1 != (BUN) -1);\
- assert(c2 != (BUN) -1);\
- if (c1 == BUN_NONE || c2 == BUN_NONE) \
+ if (c1 == (BUN) -1 || c2 == (BUN) -1 || c1 == BUN_NONE || c2 ==
BUN_NONE) \
continue;\
setRowCnt(mb, getArg(p,Z), (Y));\
}
@@ -138,8 +136,7 @@ OPTcostModelImplementation(Client cntxt,
/* copy the rows property */
c1 = getRowCnt(mb, getArg(p,1));
/* just to ensure that rowcnt was/is never set to -1 */
- assert(c1 != (BUN) -1);
- if (c1 != BUN_NONE)
+ if (c1 != (BUN) -1 && c1 != BUN_NONE)
setRowCnt(mb, getArg(p,0), c1);
}
}
diff --git a/monetdb5/optimizer/opt_mitosis.c b/monetdb5/optimizer/opt_mitosis.c
--- a/monetdb5/optimizer/opt_mitosis.c
+++ b/monetdb5/optimizer/opt_mitosis.c
@@ -151,8 +151,6 @@ OPTmitosisImplementation(Client cntxt, M
/* if data exceeds memory size,
* i.e., (rowcnt*argsize > GDK_mem_maxsize),
* i.e., (rowcnt > GDK_mem_maxsize/argsize = m) */
- assert(threads > 0);
- assert(activeClients > 0);
if (rowcnt > m && m / threads / activeClients > 0) {
/* create |pieces| > |threads| partitions such that
* |threads| partitions at a time fit in memory,
diff --git a/monetdb5/optimizer/opt_remap.c b/monetdb5/optimizer/opt_remap.c
--- a/monetdb5/optimizer/opt_remap.c
+++ b/monetdb5/optimizer/opt_remap.c
@@ -358,7 +358,6 @@ OPTremapSwitched(Client cntxt, MalBlkPtr
/* always restore the allocated function name */
getVarConstant(mb, getArg(pci, 2)).val.sval= fcn;
- assert(strlen(fcn) <= INT_MAX);
getVarConstant(mb, getArg(pci, 2)).len = strlen(fcn);
if (r) return 1;
diff --git a/monetdb5/optimizer/opt_reorder.c b/monetdb5/optimizer/opt_reorder.c
--- a/monetdb5/optimizer/opt_reorder.c
+++ b/monetdb5/optimizer/opt_reorder.c
@@ -246,9 +246,6 @@ OPTpostponeAppends(Client cntxt, MalBlkP
for( i=0; i<limit; i++){
if ( getModuleId(old[i]) == sqlRef && getFunctionId(old[i]) ==
appendRef){
// only postpone under strict conditions
- assert( isVarConstant(mb,getArg(old[i],2)));
- assert( isVarConstant(mb,getArg(old[i],3)));
- assert( isVarConstant(mb,getArg(old[i],4)));
if( actions )
pushInstruction(mb, old[i]);
else {
diff --git a/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
b/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
--- a/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
+++ b/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
@@ -1,5 +1,4 @@
import os
-import sys
from subprocess import run, PIPE, CalledProcessError
HOST=os.getenv('HOST')
@@ -20,15 +19,3 @@ if __name__ == '__main__':
p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
except CalledProcessError as e:
raise SystemExit(e.stderr)
-
-
-##!/bin/sh
-#
-#cat << EOF > .monetdb
-#user=monetdb
-#password=monetdb
-#EOF
-#
-#java org.monetdb.client.JdbcClient -h $HOST -p $MAPIPORT -d ${TSTDB} -e -f
$TSTSRCBASE/$TSTDIR/Tests/ValidateSystemCatalogTables.sql
-#
-##rm -f .monetdb
diff --git a/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.bat
b/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.bat
deleted file mode 100755
--- a/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.bat
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo off
-
-echo user=monetdb> .monetdb
-echo password=monetdb>> .monetdb
-
-prompt # $t $g
-
-call java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d %TSTDB%
-e -f "%TSTSRCBASE%\%TSTDIR%\Tests\ValidateSystemCatalogTables.sql"
-
-@del .monetdb
diff --git a/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.sh
b/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
rename from sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.sh
rename to sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
--- a/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.sh
+++ b/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
@@ -1,10 +1,21 @@
-#!/bin/sh
+import os
+from subprocess import run, PIPE, CalledProcessError
-cat << EOF > .monetdb
-user=monetdb
-password=monetdb
-EOF
+HOST=os.getenv('HOST')
+MAPIPORT=os.getenv('MAPIPORT')
+TSTDB=os.getenv('TSTDB')
+TSTSRCBASE=os.getenv('TSTSRCBASE')
+TSTDIR=os.getenv('TSTDIR')
+CLIENT='org.monetdb.client.JdbcClient'
+USER='monetdb'
+PASSWORD='monetdb'
-java nl.cwi.monetdb.client.JdbcClient -h $HOST -p $MAPIPORT -d ${TSTDB} -e -f
$TSTSRCBASE/$TSTDIR/Tests/ValidateSystemCatalogTables.sql
-rm -f .monetdb
+if __name__ == '__main__':
+ with open(os.path.join('.monetdb'), 'w') as f:
+ f.write('\n'.join(['user=monetdb', 'password=monetdb']))
+ cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f',
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/ValidateSystemCatalogTables.sql')]
+ try:
+ p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
+ except CalledProcessError as e:
+ raise SystemExit(e.stderr)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list