Changeset: 959ede3e0e32 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=959ede3e0e32 Removed Files: monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.test Modified Files: clients/mapiclient/mhelp.c monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out sql/backends/monet5/CMakeLists.txt sql/backends/monet5/sql.c sql/server/rel_updates.c sql/server/sql_parser.y sql/server/sql_scan.c sql/storage/store.c sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.test sql/test/Tests/All sql/test/Tests/sessioncontrol.sql sql/test/Tests/sessioncontrol.test sql/test/mapi/Tests/sql_int128.stable.out.int128 sql/test/mapi/Tests/sql_int128.test sql/test/mergetables/Tests/mergequery.stable.out sql/test/miscellaneous/Tests/groupby_prepare.SQL.py sql/test/miscellaneous/Tests/simple_plans.stable.out Branch: copybinary Log Message:
Merge branch 'default' into 'copybinary' diffs (truncated from 78094 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -672,30 +672,9 @@ program that uses MonetDB as an embeddab %{_includedir}/monetdb/monetdbe.h %{_libdir}/pkgconfig/monetdbe.pc -%package testing -Summary: MonetDB - Monet Database Management System -Group: Applications/Databases - -%description testing -MonetDB is a database management system that is developed from a -main-memory perspective with use of a fully decomposed storage model, -automatic index management, extensibility of data types and search -accelerators. It also has an SQL front end. - -This package contains the programs and files needed for testing the -MonetDB packages. You probably don't need this, unless you are a -developer. If you do want to test, install %{name}-testing-python. - -%files testing -%license COPYING -%defattr(-,root,root) -%{_bindir}/Mdiff -%{_bindir}/Mlog - %package testing-python Summary: MonetDB - Monet Database Management System Group: Applications/Databases -Requires: %{name}-testing = %{version}-%{release} Requires: %{name}-client-tests = %{version}-%{release} Requires: /usr/bin/python3 BuildArch: noarch @@ -2719,7 +2698,7 @@ sed -i 's|/var/run|/run|' \ are equal to 1.1. (The old code returned 33554432 instead of 1.1e8.) * Sun Nov 5 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171105 -- BZ#6460 - selinux doen't allow mmap +- BZ#6460: selinux doen't allow mmap * Mon Oct 23 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171023 - Rebuilt. 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 @@ -9513,7 +9513,7 @@ stdout of test 'MAL-signatures` in direc [ "sqlcatalog", "alter_seq", "pattern sqlcatalog.alter_seq(X_1:str, X_2:str, X_3:ptr, X_4:lng):void ", "SQLalter_seq;", "" ] [ "sqlcatalog", "alter_set_table", "pattern sqlcatalog.alter_set_table(X_1:str, X_2:str, X_3:int):void ", "SQLalter_set_table;", "" ] [ "sqlcatalog", "alter_table", "pattern sqlcatalog.alter_table(X_1:str, X_2:str, X_3:ptr, X_4:int):void ", "SQLalter_table;", "" ] -[ "sqlcatalog", "alter_user", "pattern sqlcatalog.alter_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str):void ", "SQLalter_user;", "" ] +[ "sqlcatalog", "alter_user", "pattern sqlcatalog.alter_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str, X_6:str):void ", "SQLalter_user;", "" ] [ "sqlcatalog", "comment_on", "pattern sqlcatalog.comment_on(X_1:int, X_2:str):void ", "SQLcomment_on;", "" ] [ "sqlcatalog", "create_function", "pattern sqlcatalog.create_function(X_1:str, X_2:str, X_3:ptr):void ", "SQLcreate_function;", "" ] [ "sqlcatalog", "create_role", "pattern sqlcatalog.create_role(X_1:str, X_2:str, X_3:int):void ", "SQLcreate_role;", "" ] @@ -9522,7 +9522,7 @@ stdout of test 'MAL-signatures` in direc [ "sqlcatalog", "create_table", "pattern sqlcatalog.create_table(X_1:str, X_2:str, X_3:ptr, X_4:int):void ", "SQLcreate_table;", "" ] [ "sqlcatalog", "create_trigger", "pattern sqlcatalog.create_trigger(X_1:str, X_2:str, X_3:str, X_4:int, X_5:int, X_6:int, X_7:str, X_8:str, X_9:str, X_10:str):void ", "SQLcreate_trigger;", "" ] [ "sqlcatalog", "create_type", "pattern sqlcatalog.create_type(X_1:str, X_2:str, X_3:str):void ", "SQLcreate_type;", "" ] -[ "sqlcatalog", "create_user", "pattern sqlcatalog.create_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str):void ", "SQLcreate_user;", "" ] +[ "sqlcatalog", "create_user", "pattern sqlcatalog.create_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str, X_6:str):void ", "SQLcreate_user;", "" ] [ "sqlcatalog", "create_view", "pattern sqlcatalog.create_view(X_1:str, X_2:str, X_3:ptr, X_4:int):void ", "SQLcreate_view;", "" ] [ "sqlcatalog", "drop_constraint", "pattern sqlcatalog.drop_constraint(X_1:str, X_2:str, X_3:int, X_4:int):void ", "SQLdrop_constraint;", "" ] [ "sqlcatalog", "drop_function", "pattern sqlcatalog.drop_function(X_1:str, X_2:str, X_3:int, X_4:int, X_5:int):void ", "SQLdrop_function;", "" ] 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 @@ -12836,7 +12836,7 @@ stdout of test 'MAL-signatures` in direc [ "sqlcatalog", "alter_seq", "pattern sqlcatalog.alter_seq(X_1:str, X_2:str, X_3:ptr, X_4:lng):void ", "SQLalter_seq;", "" ] [ "sqlcatalog", "alter_set_table", "pattern sqlcatalog.alter_set_table(X_1:str, X_2:str, X_3:int):void ", "SQLalter_set_table;", "" ] [ "sqlcatalog", "alter_table", "pattern sqlcatalog.alter_table(X_1:str, X_2:str, X_3:ptr, X_4:int):void ", "SQLalter_table;", "" ] -[ "sqlcatalog", "alter_user", "pattern sqlcatalog.alter_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str):void ", "SQLalter_user;", "" ] +[ "sqlcatalog", "alter_user", "pattern sqlcatalog.alter_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str, X_6:str):void ", "SQLalter_user;", "" ] [ "sqlcatalog", "comment_on", "pattern sqlcatalog.comment_on(X_1:int, X_2:str):void ", "SQLcomment_on;", "" ] [ "sqlcatalog", "create_function", "pattern sqlcatalog.create_function(X_1:str, X_2:str, X_3:ptr):void ", "SQLcreate_function;", "" ] [ "sqlcatalog", "create_role", "pattern sqlcatalog.create_role(X_1:str, X_2:str, X_3:int):void ", "SQLcreate_role;", "" ] @@ -12845,7 +12845,7 @@ stdout of test 'MAL-signatures` in direc [ "sqlcatalog", "create_table", "pattern sqlcatalog.create_table(X_1:str, X_2:str, X_3:ptr, X_4:int):void ", "SQLcreate_table;", "" ] [ "sqlcatalog", "create_trigger", "pattern sqlcatalog.create_trigger(X_1:str, X_2:str, X_3:str, X_4:int, X_5:int, X_6:int, X_7:str, X_8:str, X_9:str, X_10:str):void ", "SQLcreate_trigger;", "" ] [ "sqlcatalog", "create_type", "pattern sqlcatalog.create_type(X_1:str, X_2:str, X_3:str):void ", "SQLcreate_type;", "" ] -[ "sqlcatalog", "create_user", "pattern sqlcatalog.create_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str):void ", "SQLcreate_user;", "" ] +[ "sqlcatalog", "create_user", "pattern sqlcatalog.create_user(X_1:str, X_2:str, X_3:int, X_4:str, X_5:str, X_6:str):void ", "SQLcreate_user;", "" ] [ "sqlcatalog", "create_view", "pattern sqlcatalog.create_view(X_1:str, X_2:str, X_3:ptr, X_4:int):void ", "SQLcreate_view;", "" ] [ "sqlcatalog", "drop_constraint", "pattern sqlcatalog.drop_constraint(X_1:str, X_2:str, X_3:int, X_4:int):void ", "SQLdrop_constraint;", "" ] [ "sqlcatalog", "drop_function", "pattern sqlcatalog.drop_function(X_1:str, X_2:str, X_3:int, X_4:int, X_5:int):void ", "SQLdrop_function;", "" ] diff --git a/clients/Tests/mclient-uri.SQL.bat b/clients/Tests/mclient-uri.SQL.bat deleted file mode 100755 --- a/clients/Tests/mclient-uri.SQL.bat +++ /dev/null @@ -1,6 +0,0 @@ -@prompt # $t $g -@echo on - -@rem Windows doesn't do UNIX domain sockets, so only the one test here. - -mclient -d "mapi:monetdb://%HOST%:%MAPIPORT%/%TSTDB%?language=sql&user=monetdb" -f test -t none -E utf-8 -s "select 1" diff --git a/clients/Tests/mclient-uri.SQL.py b/clients/Tests/mclient-uri.SQL.py new file mode 100644 --- /dev/null +++ b/clients/Tests/mclient-uri.SQL.py @@ -0,0 +1,19 @@ +import os, sys +from MonetDBtesting import process + +with process.client('sql', dbname='mapi:monetdb://{}:{}/{}?language=sql&user=monetdb'.format(os.getenv('HOST', 'localhost'), os.getenv('MAPIPORT', 50000), os.getenv('TSTDB', 'demo')), host='', port='', format='csv', echo=False, stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) as c: + out, err = c.communicate('select 1;\n') + +if out != '1\n': + print(out) +if err: + print(err, file=sys.stderr) + +if os.name != 'nt': + with process.client('sql', dbname='mapi:monetdb://{}/.s.monetdb.{}?database={}&language=sql&user=monetdb'.format(os.getenv('MAPIHOST', '/tmp'), os.getenv('MAPIPORT', 50000), os.getenv('TSTDB', 'demo')), host='', port='', format='csv', echo=False, stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) as c: + out, err = c.communicate('select 1;\n') + + if out != '1\n': + print(out) + if err: + print(err, file=sys.stderr) diff --git a/clients/Tests/mclient-uri.SQL.sh b/clients/Tests/mclient-uri.SQL.sh deleted file mode 100755 --- a/clients/Tests/mclient-uri.SQL.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# test the URI parsing capabilities of the MAPI library - -#Mlog "mclient -d mapi:monetdb://$HOST:$MAPIPORT/$TSTDB?language=sql&user=monetdb -f test -t none -E utf-8 -s select 1" -mclient -d "mapi:monetdb://$HOST:$MAPIPORT/$TSTDB?language=sql&user=monetdb" -f csv -t none -E utf-8 -s 'select 1' | grep -v '^1$' -if [ $? -eq 2 ]; then - return 2; -fi - -#Mlog "mclient -d mapi:monetdb://$MAPIHOST/.s.monetdb.$MAPIPORT?database=$TSTDB&language=sql&user=monetdb -f test -t none -E utf-8 -s select 1" -mclient -d "mapi:monetdb://$MAPIHOST/.s.monetdb.$MAPIPORT?database=$TSTDB&language=sql&user=monetdb" -f csv -t none -E utf-8 -s 'select 1' | grep -v '^1$' -if [ $? -eq 2 ]; then - return 2; -fi diff --git a/clients/Tests/mclient-uri.stable.err b/clients/Tests/mclient-uri.stable.err deleted file mode 100644 --- a/clients/Tests/mclient-uri.stable.err +++ /dev/null @@ -1,44 +0,0 @@ -stderr of test 'mclient-uri` in directory 'clients` itself: - - -# 10:30:50 > -# 10:30:50 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=36840" "--set" "mapi_usock=/var/tmp/mtest-2769/.s.monetdb.36840" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_clients" -# 10:30:50 > - -# builtin opt gdk_dbpath = /ufs/sjoerd/@Monet-stable/var/monetdb5/dbfarm/demo -# builtin opt gdk_debug = 0 -# builtin opt gdk_vmtrim = no -# builtin opt monet_prompt = > -# builtin opt monet_daemon = no -# builtin opt mapi_port = 50000 -# builtin opt mapi_open = false -# builtin opt mapi_autosense = false -# builtin opt sql_optimizer = default_pipe -# builtin opt sql_debug = 0 -# cmdline opt gdk_nr_threads = 0 -# cmdline opt mapi_open = true -# cmdline opt mapi_port = 36840 -# cmdline opt mapi_usock = /var/tmp/mtest-2769/.s.monetdb.36840 -# cmdline opt monet_prompt = -# cmdline opt gdk_dbpath = /ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_clients -# cmdline opt gdk_debug = 536870922 - -# 10:30:51 > -# 10:30:51 > "./mclient-uri.SQL.sh" "mclient-uri" -# 10:30:51 > - - -# 10:30:51 > -# 10:30:51 > mclient -d mapi:monetdb://madrid:36840/mTests_clients?language=sql&user=monetdb -f test -E utf-8 -s select 1 -# 10:30:51 > - - -# 10:30:51 > -# 10:30:51 > mclient -d mapi:monetdb:///var/tmp/mtest-2769/.s.monetdb.36840?database=mTests_clients&language=sql&user=monetdb -f test -E utf-8 -s select 1 -# 10:30:51 > - - -# 10:30:51 > -# 10:30:51 > "Done." -# 10:30:51 > - diff --git a/clients/Tests/mclient-uri.stable.out b/clients/Tests/mclient-uri.stable.out deleted file mode 100644 --- a/clients/Tests/mclient-uri.stable.out +++ /dev/null @@ -1,50 +0,0 @@ -stdout of test 'mclient-uri` in directory 'clients` itself: - - -# 10:30:50 > -# 10:30:50 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=36840" "--set" "mapi_usock=/var/tmp/mtest-2769/.s.monetdb.36840" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_clients" -# 10:30:50 > - -# MonetDB 5 server v11.25.22 (hg id: 7b4a32dfbcc5+) -# This is an unreleased version -# Serving database 'mTests_clients', using 8 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers -# Found 15.589 GiB available main-memory. -# Copyright (c) 1993-July 2008 CWI. -# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved -# Visit http://www.monetdb.org/ for further information -# Listening for connection requests on mapi:monetdb://madrid.da.cwi.nl:36840/ -# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-2769/.s.monetdb.36840 -# MonetDB/GIS module loaded -# MonetDB/SQL module loaded - - -# 10:30:51 > -# 10:30:51 > "./mclient-uri.SQL.sh" "mclient-uri" -# 10:30:51 > - - -# 13:05:14 > -# 13:05:14 > mclient -d mapi:monetdb://xps13:35757/mTests_clients?language=sql&user=monetdb -f test -t none -E utf-8 -s select 1 -# 13:05:14 > - -% .%2 # table_name -% %2 # name -% tinyint # type -% 1 # length -[ 1 ] - -# 10:30:51 > -# 10:30:51 > mclient -d mapi:monetdb:///var/tmp/mtest-2769/.s.monetdb.36840?database=mTests_clients&language=sql&user=monetdb -f test -E utf-8 -s select 1 -# 10:30:51 > - -% .%2 # table_name -% %2 # name -% tinyint # type -% 1 # length -[ 1 ] - -# 10:30:51 > -# 10:30:51 > "Done." -# 10:30:51 > - diff --git a/clients/Tests/mclient-uri.stable.out.Windows b/clients/Tests/mclient-uri.stable.out.Windows deleted file mode 100644 --- a/clients/Tests/mclient-uri.stable.out.Windows +++ /dev/null @@ -1,36 +0,0 @@ -stdout of test 'mclient-uri` in directory 'clients` itself: - - -# 10:30:50 > -# 10:30:50 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=36840" "--set" "mapi_usock=/var/tmp/mtest-2769/.s.monetdb.36840" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_clients" -# 10:30:50 > - -# MonetDB 5 server v11.25.22 (hg id: 7b4a32dfbcc5+) -# This is an unreleased version -# Serving database 'mTests_clients', using 8 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers -# Found 15.589 GiB available main-memory. -# Copyright (c) 1993-July 2008 CWI. -# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved -# Visit http://www.monetdb.org/ for further information -# Listening for connection requests on mapi:monetdb://madrid.da.cwi.nl:36840/ -# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-2769/.s.monetdb.36840 -# MonetDB/GIS module loaded -# MonetDB/SQL module loaded - - - -# 13:05:14 > -# 13:05:14 > mclient -d mapi:monetdb://xps13:35757/mTests_clients?language=sql&user=monetdb -f test -t none -E utf-8 -s select 1 -# 13:05:14 > - -% .%2 # table_name -% %2 # name -% tinyint # type -% 1 # length -[ 1 ] - -# 10:30:51 > -# 10:30:51 > "Done." -# 10:30:51 > - diff --git a/clients/examples/python/sqlsample.py b/clients/examples/python/sqlsample.py --- a/clients/examples/python/sqlsample.py +++ b/clients/examples/python/sqlsample.py @@ -11,28 +11,33 @@ import sys dbh = pymonetdb.connect(port=int(sys.argv[1]),database=sys.argv[2],hostname=sys.argv[3],autocommit=True) -cursor = dbh.cursor(); +cursor = dbh.cursor() cursor.execute('select 1;') -print(cursor.fetchall()) +if cursor.fetchall() != [(1,)]: + sys.stderr.write("Just row (1,) expected") -cursor = dbh.cursor(); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list