Changeset: a6b2f527311a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6b2f527311a
Added Files:
        monetdb5/mal/Tests/tst180.malC
        monetdb5/mal/Tests/tst180.stable.err
        monetdb5/mal/Tests/tst180.stable.out
        monetdb5/mal/Tests/tst914.malC
        monetdb5/mal/Tests/tst914.stable.err
        monetdb5/mal/Tests/tst914.stable.out
        sql/test/BugTracker-2020/Tests/All
        sql/test/BugTracker-2020/Tests/median_avg-nulls.Bug-6807.sql
        sql/test/BugTracker-2020/Tests/median_avg-nulls.Bug-6807.stable.err
        sql/test/BugTracker-2020/Tests/median_avg-nulls.Bug-6807.stable.out
Modified Files:
        MonetDB.spec
        NT/mksqlwxs.py
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        clients/Tests/exports.stable.out
        clients/mapiclient/dump.c
        clients/mapiclient/mclient.1
        clients/mapiclient/mclient.c
        clients/mapilib/mapi.c
        clients/odbc/driver/SQLPrepare.c
        common/stream/stream.c
        common/utils/msabaoth.c
        common/utils/msabaoth.h
        common/utils/mutils.c
        common/utils/mutils.h
        configure.ag
        debian/monetdb5-server.install
        debian/rules
        gdk/gdk.h
        gdk/gdk_aggr.c
        gdk/gdk_atoms.c
        gdk/gdk_atoms.h
        gdk/gdk_bat.c
        gdk/gdk_batop.c
        gdk/gdk_bbp.c
        gdk/gdk_calc.c
        gdk/gdk_group.c
        gdk/gdk_hash.c
        gdk/gdk_hash.h
        gdk/gdk_heap.c
        gdk/gdk_imprints.c
        gdk/gdk_join.c
        gdk/gdk_logger.c
        gdk/gdk_orderidx.c
        gdk/gdk_posix.c
        gdk/gdk_private.h
        gdk/gdk_project.c
        gdk/gdk_select.c
        gdk/gdk_storage.c
        gdk/gdk_string.c
        gdk/gdk_unique.c
        gdk/gdk_utils.c
        gdk/gdk_value.c
        monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
        
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows
        monetdb5/extras/mal_optimizer_template/opt_sql_append.c
        monetdb5/extras/rapi/converters.c.h
        monetdb5/mal/Tests/All
        monetdb5/mal/Tests/tst008.stable.err
        monetdb5/mal/Tests/tst054.stable.err
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_builder.c
        monetdb5/mal/mal_exception.c
        monetdb5/mal/mal_factory.c
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_linker.c
        monetdb5/mal/mal_parser.c
        monetdb5/mal/mal_resource.h
        monetdb5/mal/mal_session.c
        monetdb5/mal/mal_stack.c
        monetdb5/mal/mal_stack.h
        monetdb5/modules/atoms/uuid.c
        monetdb5/modules/kernel/algebra.mal
        monetdb5/modules/kernel/bat5.c
        monetdb5/modules/kernel/status.c
        monetdb5/modules/mal/mal_mapi.c
        monetdb5/modules/mal/tokenizer.c
        monetdb5/modules/mal/wlc.c
        monetdb5/optimizer/opt_commonTerms.c
        monetdb5/optimizer/opt_emptybind.c
        monetdb5/optimizer/opt_evaluate.c
        monetdb5/optimizer/opt_macro.c
        monetdb5/scheduler/run_adder.c
        sql/backends/monet5/UDF/pyapi/pyheader.h
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_rank.c
        sql/backends/monet5/sql_rank.mal
        sql/backends/monet5/sql_rank.mal.sh
        sql/backends/monet5/wlr.c
        sql/server/rel_select.c
        sql/server/sql_parser.y
        sql/storage/bat/bat_storage.c
        sql/storage/store.c
        sql/test/BugDay_2005-10-06_2.9.3/Tests/having.SF-922614.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.out
        sql/test/analytics/Tests/analytics10.sql
        sql/test/analytics/Tests/analytics10.stable.err
        sql/test/analytics/Tests/analytics10.stable.out
        sql/test/miscellaneous/Tests/groupby_expressions.sql
        sql/test/miscellaneous/Tests/groupby_expressions.stable.err
        sql/test/miscellaneous/Tests/groupby_expressions.stable.out
        testing/Mfilter.py
        testing/difflib.c
        tools/merovingian/client/monetdb.c
        tools/merovingian/daemon/argvcmds.c
        tools/merovingian/daemon/client.c
        tools/merovingian/daemon/connections.c
        tools/merovingian/daemon/controlrunner.c
        tools/merovingian/daemon/discoveryrunner.c
        tools/merovingian/daemon/forkmserver.c
        tools/merovingian/daemon/handlers.c
        tools/merovingian/daemon/merovingian.c
        tools/merovingian/daemon/multiplex-funnel.c
        tools/merovingian/daemon/proxy.c
        tools/merovingian/utils/control.c
        tools/merovingian/utils/glob.c
        tools/merovingian/utils/utils.c
        tools/mserver/Makefile.ag
Branch: compactprofiler
Log Message:

Merge with default


diffs (truncated from 8365 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -680,7 +680,6 @@ exit 0
 %endif
 %{_libdir}/monetdb5/lib_capi.so
 %{_libdir}/monetdb5/lib_generator.so
-%{_libdir}/monetdb5/lib_opt_sql_append.so
 %{_libdir}/monetdb5/lib_udf.so
 %doc %{_mandir}/man1/mserver5.1.gz
 %dir %{_datadir}/doc/MonetDB
@@ -967,6 +966,7 @@ export CFLAGS
        --enable-mapi=yes \
        --enable-netcdf=no \
        --enable-odbc=yes \
+       --enable-profiler=no \
        
--enable-py2integration=%{?with_py2integration:yes}%{!?with_py2integration:no} \
        
--enable-py3integration=%{?with_py3integration:yes}%{!?with_py3integration:no} \
        
--enable-rintegration=%{?with_rintegration:yes}%{!?with_rintegration:no} \
@@ -1040,6 +1040,9 @@ install -d -m 0775 %{buildroot}%{_locals
 # .la files
 rm -f %{buildroot}%{_libdir}/*.la
 rm -f %{buildroot}%{_libdir}/monetdb5/*.la
+rm -f %{buildroot}%{_libdir}/monetdb5/opt_sql_append.mal
+rm -f %{buildroot}%{_libdir}/monetdb5/lib_opt_sql_append.so
+rm -f %{buildroot}%{_libdir}/monetdb5/autoload/??_opt_sql_append.mal
 
 %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 for selinuxvariant in %{selinux_variants}
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -178,7 +178,7 @@ def main():
     print(r'              <Directory Id="monetdb5" Name="monetdb5">')
     print(r'                <Directory Id="autoload" Name="autoload">')
     id = comp(features, id, 18,
-              [r'lib\monetdb5\autoload\{}'.format(x) for x in 
sorted(filter(lambda x: x.endswith('.mal') and ('geom' not in x) and ('pyapi' 
not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5', 
'autoload'))))])
+              [r'lib\monetdb5\autoload\{}'.format(x) for x in 
sorted(filter(lambda x: x.endswith('.mal') and ('geom' not in x) and ('pyapi' 
not in x) and ('opt_sql_append' not in x), os.listdir(os.path.join(sys.argv[3], 
'lib', 'monetdb5', 'autoload'))))])
     id = comp(geom, id, 18,
               [r'lib\monetdb5\autoload\{}'.format(x) for x in 
sorted(filter(lambda x: x.endswith('.mal') and ('geom' in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5', 'autoload'))))])
     id = comp(pyapi2, id, 18,
@@ -193,11 +193,11 @@ def main():
               [r'lib\monetdb5\createdb\{}'.format(x) for x in 
sorted(filter(lambda x: x.endswith('.sql') and ('geom' in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5', 'createdb'))))])
     print(r'                </Directory>')
     id = comp(features, id, 16,
-              [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.endswith('.mal') and ('geom' not in x) and ('pyapi' not in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5'))))])
+              [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.endswith('.mal') and ('geom' not in x) and ('pyapi' not in x) and 
('opt_sql_append' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
'monetdb5'))))])
     id = comp(features, id, 16,
-              [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.startswith('lib_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' 
not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5'))))])
+              [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.startswith('lib_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' 
not in x) and ('opt_sql_append' not in x), os.listdir(os.path.join(sys.argv[3], 
'lib', 'monetdb5'))))])
     id = comp(debug, id, 16,
-              [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.startswith('lib_') and x.endswith('.pdb') and ('geom' not in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5'))))])
+              [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.startswith('lib_') and x.endswith('.pdb') and ('geom' not in x) and 
('opt_sql_append' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
'monetdb5'))))])
     id = comp(geom, id, 16,
               [r'lib\monetdb5\{}'.format(x) for x in sorted(filter(lambda x: 
x.endswith('.mal') and ('geom' in x), os.listdir(os.path.join(sys.argv[3], 
'lib', 'monetdb5'))))])
     id = comp(geom, id, 16,
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
@@ -589,15 +589,15 @@ stdout of test 'MAL-signatures` in direc
 [ "algebra",   "slice",        "command algebra.slice(b:bat[:any_1], x:int, 
y:int):bat[:any_1] ",      "ALGslice_int;",        "Return the slice with the 
BUNs at position x till y."  ]
 [ "algebra",   "slice",        "command algebra.slice(b:bat[:any_1], x:lng, 
y:lng):bat[:any_1] ",      "ALGslice_lng;",        "Return the slice with the 
BUNs at position x till y."  ]
 [ "algebra",   "slice",        "command algebra.slice(b:bat[:any_1], x:oid, 
y:oid):bat[:any_1] ",      "ALGslice_oid;",        "Return the slice based on 
head oid x till y (exclusive)."      ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit):bat[:any_1] ",      "ALGsort11;",   "Returns a copy 
of the BAT sorted on tail values.\n         The input and output are (must be) 
dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."        ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ", "ALGsort12;",   
"Returns a copy of the BAT sorted on tail values and a BAT that\n         
specifies how the input was reordered.\n         The input and output are (must 
be) dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set." ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], X_2:bat[:oid]) ",  
"ALGsort13;",   "Returns a copy of the BAT sorted on tail values, a BAT that 
specifies\n         how the input was reordered, and a BAT with group 
information.\n         The input and output are (must be) dense headed.\n       
  The order is descending if the reverse bit is set.\n\t\t This is a stable 
sort if the stable bit is set."  ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ", "ALGsort21;",   "Returns 
a copy of the BAT sorted on tail values.\n         The input and output are 
(must be) dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."        ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ",    
"ALGsort22;",   "Returns a copy of the BAT sorted on tail values and a BAT 
that\n         specifies how the input was reordered.\n         The input and 
output are (must be) dense headed.\n         The order is descending if the 
reverse bit is set.\n\t\t This is a stable sort if the stable bit is set." ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], 
X_2:bat[:oid]) ",     "ALGsort23;",   "Returns a copy of the BAT sorted on tail 
values, a BAT that specifies\n         how the input was reordered, and a BAT 
with group information.\n         The input and output are (must be) dense 
headed.\n         The order is descending if the reverse bit is set.\n\t\t This 
is a stable sort if the stable bit is set."  ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ",    
"ALGsort31;",   "Returns a copy of the BAT sorted on tail values.\n         The 
input and output are (must be) dense headed.\n         The order is descending 
if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is 
set."        ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid]) ",       "ALGsort32;",   "Returns a copy of the BAT sorted on 
tail values and a BAT that\n         specifies how the input was reordered.\n   
      The input and output are (must be) dense headed.\n         The order is 
descending if the reverse bit is set.\n\t\t This is a stable sort if the stable 
bit is set." ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid], X_2:bat[:oid]) ",        "ALGsort33;",   "Returns a copy of the 
BAT sorted on tail values, a BAT that specifies\n         how the input was 
reordered, and a BAT with group information.\n         The input and output are 
(must be) dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."  ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit):bat[:any_1] ",      "ALGsort11;",   "Returns a copy 
of the BAT sorted on tail values.\n         The order is descending if the 
reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."   ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ", "ALGsort12;",   
"Returns a copy of the BAT sorted on tail values and a BAT that\n         
specifies how the input was reordered.\n         The order is descending if the 
reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."    ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], X_2:bat[:oid]) ",  
"ALGsort13;",   "Returns a copy of the BAT sorted on tail values, a BAT that 
specifies\n         how the input was reordered, and a BAT with group 
information.\n         The order is descending if the reverse bit is set.\n\t\t 
This is a stable sort if the stable bit is set."     ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ", "ALGsort21;",   "Returns 
a copy of the BAT sorted on tail values.\n         The order is descending if 
the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."  
 ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ",    
"ALGsort22;",   "Returns a copy of the BAT sorted on tail values and a BAT 
that\n         specifies how the input was reordered.\n         The order is 
descending if the reverse bit is set.\n\t\t This is a stable sort if the stable 
bit is set."    ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], 
X_2:bat[:oid]) ",     "ALGsort23;",   "Returns a copy of the BAT sorted on tail 
values, a BAT that specifies\n         how the input was reordered, and a BAT 
with group information.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."     ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ",    
"ALGsort31;",   "Returns a copy of the BAT sorted on tail values.\n         The 
order is descending if the reverse bit is set.\n\t\t This is a stable sort if 
the stable bit is set."   ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid]) ",       "ALGsort32;",   "Returns a copy of the BAT sorted on 
tail values and a BAT that\n         specifies how the input was reordered.\n   
      The order is descending if the reverse bit is set.\n\t\t This is a stable 
sort if the stable bit is set."    ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid], X_2:bat[:oid]) ",        "ALGsort33;",   "Returns a copy of the 
BAT sorted on tail values, a BAT that specifies\n         how the input was 
reordered, and a BAT with group information.\n         The order is descending 
if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is 
set."     ]
 [ "algebra",   "subslice",     "command algebra.subslice(b:bat[:any_1], x:lng, 
y:lng):bat[:oid] ",     "ALGsubslice_lng;",     "Return the oids of the slice 
with the BUNs at position x till y."      ]
 [ "algebra",   "thetajoin",    "command algebra.thetajoin(l:bat[:any_1], 
r:bat[:any_1], sl:bat[:oid], sr:bat[:oid], op:int, nil_matches:bit, 
estimate:lng) (X_0:bat[:oid], X_1:bat[:oid]) ",   "ALGthetajoin;",        
"Theta join with candidate lists"       ]
 [ "algebra",   "thetaselect",  "command algebra.thetaselect(b:bat[:any_1], 
val:any_1, op:str):bat[:oid] ",     "ALGthetaselect1;",     "Select all head 
values for which the tail value obeys the relation\n\tvalue OP VAL.\n\tInput is 
a dense-headed BAT, output is a dense-headed BAT with in\n\tthe tail the head 
value of the input BAT for which the\n\trelationship holds.  The output BAT is 
sorted on the tail value."        ]
@@ -8977,7 +8977,9 @@ stdout of test 'MAL-signatures` in direc
 [ "batsql",    "dec_round",    "command batsql.dec_round(v:bat[:sht], 
r:sht):bat[:sht] ",      "sht_bat_dec_round_wrap;",      "round off the value v 
to nearests multiple of r"       ]
 [ "batsql",    "dense_rank",   "pattern batsql.dense_rank(b:bat[:any_1], 
p:any_2, o:any_3):bat[:int] ",        "SQLdense_rank;",       "return the 
densely ranked groups"      ]
 [ "batsql",    "diff", "pattern batsql.diff(b:bat[:any_1]):bat[:bit] ",        
"SQLdiff;",     "return true if cur != prev row"        ]
+[ "batsql",    "diff", "pattern batsql.diff(p:bat[:bit], b:any_1):bat[:bit] ", 
"SQLdiff;",     "return true if cur != prev row"        ]
 [ "batsql",    "diff", "pattern batsql.diff(p:bat[:bit], 
b:bat[:any_1]):bat[:bit] ",   "SQLdiff;",     "return true if cur != prev row"  
      ]
+[ "batsql",    "diff", "pattern batsql.diff(p:bit, b:bat[:any_1]):bat[:bit] ", 
"SQLdiff;",     "return true if cur != prev row"        ]
 [ "batsql",    "first_value",  "pattern batsql.first_value(b:bat[:any_1], 
s:bat[:lng], e:bat[:lng]):bat[:any_1] ",     "SQLfirst_value;",      "return 
the first value of groups"      ]
 [ "batsql",    "get_value",    "pattern batsql.get_value(sname:bat[:str], 
sequence:bat[:str]):bat[:lng] ",     "mvc_bat_get_value;",   "return the 
current value of sequences" ]
 [ "batsql",    "get_value",    "pattern batsql.get_value(sname:bat[:str], 
sequence:str):bat[:lng] ",   "mvc_bat_get_value;",   "return the current value 
of the sequence"      ]
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
@@ -693,15 +693,15 @@ stdout of test 'MAL-signatures` in direc
 [ "algebra",   "slice",        "command algebra.slice(b:bat[:any_1], x:int, 
y:int):bat[:any_1] ",      "ALGslice_int;",        "Return the slice with the 
BUNs at position x till y."  ]
 [ "algebra",   "slice",        "command algebra.slice(b:bat[:any_1], x:lng, 
y:lng):bat[:any_1] ",      "ALGslice_lng;",        "Return the slice with the 
BUNs at position x till y."  ]
 [ "algebra",   "slice",        "command algebra.slice(b:bat[:any_1], x:oid, 
y:oid):bat[:any_1] ",      "ALGslice_oid;",        "Return the slice based on 
head oid x till y (exclusive)."      ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit):bat[:any_1] ",      "ALGsort11;",   "Returns a copy 
of the BAT sorted on tail values.\n         The input and output are (must be) 
dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."        ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ", "ALGsort12;",   
"Returns a copy of the BAT sorted on tail values and a BAT that\n         
specifies how the input was reordered.\n         The input and output are (must 
be) dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set." ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], X_2:bat[:oid]) ",  
"ALGsort13;",   "Returns a copy of the BAT sorted on tail values, a BAT that 
specifies\n         how the input was reordered, and a BAT with group 
information.\n         The input and output are (must be) dense headed.\n       
  The order is descending if the reverse bit is set.\n\t\t This is a stable 
sort if the stable bit is set."  ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ", "ALGsort21;",   "Returns 
a copy of the BAT sorted on tail values.\n         The input and output are 
(must be) dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."        ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ",    
"ALGsort22;",   "Returns a copy of the BAT sorted on tail values and a BAT 
that\n         specifies how the input was reordered.\n         The input and 
output are (must be) dense headed.\n         The order is descending if the 
reverse bit is set.\n\t\t This is a stable sort if the stable bit is set." ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], 
X_2:bat[:oid]) ",     "ALGsort23;",   "Returns a copy of the BAT sorted on tail 
values, a BAT that specifies\n         how the input was reordered, and a BAT 
with group information.\n         The input and output are (must be) dense 
headed.\n         The order is descending if the reverse bit is set.\n\t\t This 
is a stable sort if the stable bit is set."  ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ",    
"ALGsort31;",   "Returns a copy of the BAT sorted on tail values.\n         The 
input and output are (must be) dense headed.\n         The order is descending 
if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is 
set."        ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid]) ",       "ALGsort32;",   "Returns a copy of the BAT sorted on 
tail values and a BAT that\n         specifies how the input was reordered.\n   
      The input and output are (must be) dense headed.\n         The order is 
descending if the reverse bit is set.\n\t\t This is a stable sort if the stable 
bit is set." ]
-[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid], X_2:bat[:oid]) ",        "ALGsort33;",   "Returns a copy of the 
BAT sorted on tail values, a BAT that specifies\n         how the input was 
reordered, and a BAT with group information.\n         The input and output are 
(must be) dense headed.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."  ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit):bat[:any_1] ",      "ALGsort11;",   "Returns a copy 
of the BAT sorted on tail values.\n         The order is descending if the 
reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."   ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ", "ALGsort12;",   
"Returns a copy of the BAT sorted on tail values and a BAT that\n         
specifies how the input was reordered.\n         The order is descending if the 
reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."    ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, 
nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], X_2:bat[:oid]) ",  
"ALGsort13;",   "Returns a copy of the BAT sorted on tail values, a BAT that 
specifies\n         how the input was reordered, and a BAT with group 
information.\n         The order is descending if the reverse bit is set.\n\t\t 
This is a stable sort if the stable bit is set."     ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ", "ALGsort21;",   "Returns 
a copy of the BAT sorted on tail values.\n         The order is descending if 
the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."  
 ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ",    
"ALGsort22;",   "Returns a copy of the BAT sorted on tail values and a BAT 
that\n         specifies how the input was reordered.\n         The order is 
descending if the reverse bit is set.\n\t\t This is a stable sort if the stable 
bit is set."    ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], 
X_2:bat[:oid]) ",     "ALGsort23;",   "Returns a copy of the BAT sorted on tail 
values, a BAT that specifies\n         how the input was reordered, and a BAT 
with group information.\n         The order is descending if the reverse bit is 
set.\n\t\t This is a stable sort if the stable bit is set."     ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ",    
"ALGsort31;",   "Returns a copy of the BAT sorted on tail values.\n         The 
order is descending if the reverse bit is set.\n\t\t This is a stable sort if 
the stable bit is set."   ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid]) ",       "ALGsort32;",   "Returns a copy of the BAT sorted on 
tail values and a BAT that\n         specifies how the input was reordered.\n   
      The order is descending if the reverse bit is set.\n\t\t This is a stable 
sort if the stable bit is set."    ]
+[ "algebra",   "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], 
g:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], 
X_1:bat[:oid], X_2:bat[:oid]) ",        "ALGsort33;",   "Returns a copy of the 
BAT sorted on tail values, a BAT that specifies\n         how the input was 
reordered, and a BAT with group information.\n         The order is descending 
if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is 
set."     ]
 [ "algebra",   "subslice",     "command algebra.subslice(b:bat[:any_1], x:lng, 
y:lng):bat[:oid] ",     "ALGsubslice_lng;",     "Return the oids of the slice 
with the BUNs at position x till y."      ]
 [ "algebra",   "thetajoin",    "command algebra.thetajoin(l:bat[:any_1], 
r:bat[:any_1], sl:bat[:oid], sr:bat[:oid], op:int, nil_matches:bit, 
estimate:lng) (X_0:bat[:oid], X_1:bat[:oid]) ",   "ALGthetajoin;",        
"Theta join with candidate lists"       ]
 [ "algebra",   "thetaselect",  "command algebra.thetaselect(b:bat[:any_1], 
val:any_1, op:str):bat[:oid] ",     "ALGthetaselect1;",     "Select all head 
values for which the tail value obeys the relation\n\tvalue OP VAL.\n\tInput is 
a dense-headed BAT, output is a dense-headed BAT with in\n\tthe tail the head 
value of the input BAT for which the\n\trelationship holds.  The output BAT is 
sorted on the tail value."        ]
@@ -12699,7 +12699,9 @@ stdout of test 'MAL-signatures` in direc
 [ "batsql",    "dec_round",    "command batsql.dec_round(v:bat[:sht], 
r:sht):bat[:sht] ",      "sht_bat_dec_round_wrap;",      "round off the value v 
to nearests multiple of r"       ]
 [ "batsql",    "dense_rank",   "pattern batsql.dense_rank(b:bat[:any_1], 
p:any_2, o:any_3):bat[:int] ",        "SQLdense_rank;",       "return the 
densely ranked groups"      ]
 [ "batsql",    "diff", "pattern batsql.diff(b:bat[:any_1]):bat[:bit] ",        
"SQLdiff;",     "return true if cur != prev row"        ]
+[ "batsql",    "diff", "pattern batsql.diff(p:bat[:bit], b:any_1):bat[:bit] ", 
"SQLdiff;",     "return true if cur != prev row"        ]
 [ "batsql",    "diff", "pattern batsql.diff(p:bat[:bit], 
b:bat[:any_1]):bat[:bit] ",   "SQLdiff;",     "return true if cur != prev row"  
      ]
+[ "batsql",    "diff", "pattern batsql.diff(p:bit, b:bat[:any_1]):bat[:bit] ", 
"SQLdiff;",     "return true if cur != prev row"        ]
 [ "batsql",    "first_value",  "pattern batsql.first_value(b:bat[:any_1], 
s:bat[:lng], e:bat[:lng]):bat[:any_1] ",     "SQLfirst_value;",      "return 
the first value of groups"      ]
 [ "batsql",    "get_value",    "pattern batsql.get_value(sname:bat[:str], 
sequence:bat[:str]):bat[:lng] ",     "mvc_bat_get_value;",   "return the 
current value of sequences" ]
 [ "batsql",    "get_value",    "pattern batsql.get_value(sname:bat[:str], 
sequence:str):bat[:lng] ",   "mvc_bat_get_value;",   "return the current value 
of the sequence"      ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -294,6 +294,7 @@ const char *GDKversion(void);
 size_t GDKvm_cursize(void);
 void *GDKzalloc(size_t size) __attribute__((__malloc__)) 
__attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__));
 void HASHdestroy(BAT *b);
+gdk_return HASHgrowbucket(BAT *b);
 BUN HASHlist(Hash *h, BUN i);
 BUN HASHprobe(const Hash *h, const void *v);
 void HEAP_free(Heap *heap, var_t block);
@@ -311,7 +312,7 @@ MT_Id MT_getpid(void);
 size_t MT_getrss(void);
 void MT_init(void);
 int MT_join_thread(MT_Id t);
-int MT_lockf(char *filename, int mode, off_t off, off_t len);
+int MT_lockf(char *filename, int mode);
 void *MT_mmap(const char *path, int mode, size_t len);
 int MT_munmap(void *p, size_t len);
 bool MT_path_absolute(const char *path);
@@ -1909,17 +1910,20 @@ str URLnew4(url *u, str *protocol, str *
 str URLnoop(url *u, url *val);
 ssize_t URLtoString(str *s, size_t *len, const char *src, bool external);
 int UUIDcompare(const uuid *l, const uuid *r);
-str UUIDequal(bit *retval, uuid **l, uuid **r);
 ssize_t UUIDfromString(const char *svalue, size_t *len, uuid **retval, bool 
external);
 str UUIDgenerateUuid(uuid **retval);
+str UUIDgenerateUuid(uuid *retval);
 str UUIDgenerateUuidInt(uuid **retval, int *d);
+str UUIDgenerateUuidInt(uuid *retval, int *d);
 BUN UUIDhash(const void *u);
 str UUIDisaUUID(bit *retval, str *u);
 const uuid *UUIDnull(void);
 str UUIDprelude(void *ret);
 uuid *UUIDread(uuid *u, stream *s, size_t cnt);
 str UUIDstr2uuid(uuid **retval, str *s);
+str UUIDstr2uuid(uuid *retval, str *s);
 ssize_t UUIDtoString(str *retval, size_t *len, const uuid *value, bool 
external);
+str UUIDuuid2str(str *retval, const uuid *u);
 str UUIDuuid2str(str *retval, uuid **u);
 gdk_return UUIDwrite(const uuid *u, stream *s, size_t cnt);
 str WLCaction(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -2049,7 +2053,6 @@ int chkInstruction(Module s, MalBlkPtr m
 str chkProgram(Module s, MalBlkPtr mb);
 str chkTypes(Module s, MalBlkPtr mb, int silent);
 str cleanupTraces(Client cntxt);
-void clearStack(MalStkPtr s);
 void clearTrace(Client cntxt);
 void clearVariable(MalBlkPtr mb, int varid);
 str clear_tableRef;
@@ -2392,6 +2395,7 @@ char monet_characteristics[4096];
 char monet_cwd[FILENAME_MAX];
 void moveInstruction(MalBlkPtr mb, int pc, int target);
 void msab_dbfarminit(const char *dbfarm);
+void msab_dbnameinit(const char *dbname);
 void msab_dbpathinit(const char *dbpath);
 char *msab_deserialise(sabdb **ret, char *sabdb);
 void msab_freeStatus(sabdb **ret);
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -434,8 +434,15 @@ dump_foreign_keys(Mapi mid, const char *
                char *t = sescape(tname);
                maxquerylen = 1024 + strlen(t) + strlen(s);
                query = malloc(maxquerylen);
-               if (query == NULL)
+               if (s == NULL || t == NULL || query == NULL) {
+                       if (s)
+                               free(s);
+                       if (t)
+                               free(t);
+                       if (query)
+                               free(query);
                        goto bailout;
+               }
                snprintf(query, maxquerylen,
                         "SELECT ps.name, "             /* 0 */
                                "pkt.name, "            /* 1 */
@@ -890,8 +897,13 @@ dump_column_definition(Mapi mid, stream 
        t = tname ? sescape(tname) : NULL;
        s = schema ? sescape(schema) : NULL;
        if (tid == NULL) {
-               if (tname == NULL || schema == NULL)
+               if (tname == NULL || schema == NULL) {
+                       if (t != NULL)
+                               free(t);
+                       if (s != NULL)
+                               free(s);
                        return 1;
+               }
                maxquerylen += 2 * strlen(tname) + 2 * strlen(schema);
        }
        else
@@ -1921,12 +1933,17 @@ dump_function(Mapi mid, stream *toConsol
                fname = strdup(fname);
                ftkey = strdup(ftkey);
 
-               if (!remark || !sname || !fname || !ftkey) {
-                       free(remark);
-                       free(sname);
-                       free(fname);
-                       free(ftkey);
-                       free(query);
+               if (remark == NULL || sname == NULL || fname == NULL || ftkey 
== NULL) {
+                       if (remark)
+                               free(remark);
+                       if (sname)
+                               free(sname);
+                       if (fname)
+                               free(fname);
+                       if (ftkey)
+                               free(ftkey);
+                       if (query)
+                               free(query);
                        goto bailout;
                }
        }
@@ -1953,8 +1970,7 @@ dump_function(Mapi mid, stream *toConsol
        }
        /* strdup these two because they are needed after another query */
        if (flkey) {
-               char* nflkey = flkey ? strdup(flkey) : NULL;
-               if (!nflkey) {
+               if ((flkey = strdup(flkey)) == NULL) {
                        if (remark) {
                                free(remark);
                                free(sname);
@@ -1962,8 +1978,7 @@ dump_function(Mapi mid, stream *toConsol
                                free(ftkey);
                        }
                        goto bailout;
-               } else
-                       flkey = nflkey;
+               }
        }
        ffunc = strdup(ffunc);
        query_len = snprintf(query, query_size,
@@ -2702,8 +2717,8 @@ dump_database(Mapi mid, stream *toConsol
        } else {
                mnstr_printf(toConsole, "SET SCHEMA ");
                dquoted_print(toConsole, sname, ";\n");
-               curschema = sname ? strdup(sname) : NULL;
-               if (sname && !curschema)
+               curschema = strdup(sname);
+               if (curschema == NULL)
                        goto bailout;
        }
 
diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1
--- a/clients/mapiclient/mclient.1
+++ b/clients/mapiclient/mclient.1
@@ -451,7 +451,7 @@ is the name of the table,
 .I $db
 is the name of the database.
 .PP
-mclient \-d $db \-s \(dqCOPY INTO $table FROM '$file' USING DELIMITERS 
',','\e\en','\e\(dq'\(dq
+mclient \-d $db \-s \(dqCOPY INTO $table FROM '$file' USING DELIMITERS 
',',E'\e\en','\e\(dq'\(dq
 .PP
 Efficiently import data from a CSV file into a table when the file is
 to be read by mclient (e.g. the server has no access to the file).
@@ -462,7 +462,7 @@ is the name of the table,
 .I $db
 is the name of the database.
 .PP
-mclient \-d $db \-s \(dqCOPY INTO $table FROM STDIN USING DELIMITERS 
',','\e\en','\e\(dq'\(dq \- < $file
+mclient \-d $db \-s \(dqCOPY INTO $table FROM STDIN USING DELIMITERS 
',',E'\e\en','\e\(dq'\(dq \- < $file
 .PP
 Note that in this latter case, if a count of records is supplied, it
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to