Changeset: 7a480ad822fa for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a480ad822fa Added Files: sql/backends/monet5/Tests/rapi14.sql sql/test/Users/Tests/changePasswordUser.SQL.py sql/test/Users/Tests/changePasswordUser.stable.err sql/test/Users/Tests/changePasswordUser.stable.out sql/test/Users/Tests/changeSchemaUser.SQL.py sql/test/Users/Tests/changeSchemaUser.stable.err sql/test/Users/Tests/changeSchemaUser.stable.out sql/test/Users/Tests/createSetUp.sql.src sql/test/Users/Tests/createSetUp.stable.err sql/test/Users/Tests/createSetUp.stable.out sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.SQL.py sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.stable.err sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.stable.out sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.SQL.py sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.stable.err sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.stable.out sql/test/Users/Tests/grantRole.Bug-3772.SQL.py sql/test/Users/Tests/grantRole.Bug-3772.stable.err sql/test/Users/Tests/grantRole.Bug-3772.stable.out sql/test/Users/Tests/renameUser.SQL.py sql/test/Users/Tests/renameUser.stable.err sql/test/Users/Tests/renameUser.stable.out sql/test/Users/Tests/role.SQL.py sql/test/Users/Tests/role.stable.err sql/test/Users/Tests/role.stable.out sql/test/Users/createSetUp.sql Modified Files: MonetDB.spec debian/control sql/server/rel_select.c sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit sql/test/Dependencies/dependency_owner_schema_3.sql sql/test/Users/Tests/All sql/test/leaks/Tests/check1.stable.out sql/test/leaks/Tests/check1.stable.out.int128 sql/test/leaks/Tests/check2.stable.out sql/test/leaks/Tests/check2.stable.out.int128 sql/test/leaks/Tests/check3.stable.out sql/test/leaks/Tests/check3.stable.out.int128 sql/test/leaks/Tests/check4.stable.out sql/test/leaks/Tests/check4.stable.out.int128 sql/test/leaks/Tests/check5.stable.out sql/test/leaks/Tests/check5.stable.out.int128 testing/process.py Branch: mosaic Log Message:
merge with default diffs (truncated from 1960 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -135,6 +135,12 @@ BuildRequires: samtools-devel BuildRequires: R-core-devel %endif +%if (0%{?fedora} >= 22) +Recommends: %{name}-SQL-server5 +Recommends: MonetDB5-server +Suggests: %{name}-client +%endif + # need to define python_sitelib on RHEL 5 and older # no need to define python3_sitelib: it's defined by python3-devel %if 0%{?rhel} && 0%{?rhel} <= 5 @@ -226,6 +232,9 @@ library. %package client Summary: MonetDB - Monet Database Management System Client Programs Group: Applications/Databases +%if (0%{?fedora} >= 22) +Recommends: %{name}-SQL-server5 +%endif %description client MonetDB is a database management system that is developed from a @@ -588,6 +597,11 @@ Group: Applications/Databases Requires(pre): shadow-utils Requires: %{name}-client%{?_isa} = %{version}-%{release} Obsoletes: MonetDB5-server-rdf +%if (0%{?fedora} >= 22) +Recommends: %{name}-SQL-server5 +Recommends: MonetDB5-server-hugeint +Suggests: %{name}-client +%endif %description -n MonetDB5-server MonetDB is a database management system that is developed from a @@ -723,6 +737,10 @@ Requires: %{_bindir}/systemd-tmpfiles %endif Obsoletes: MonetDB-SQL-devel Obsoletes: %{name}-SQL +%if (0%{?fedora} >= 22) +Recommends: %{name}-SQL-server5-hugeint +Suggests: %{name}-client +%endif %description SQL-server5 MonetDB is a database management system that is developed from a diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -95,6 +95,7 @@ Description: MonetDB client/server inter Package: monetdb-client Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: monetdb5-sql Description: MonetDB database client MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, @@ -221,6 +222,8 @@ Description: MonetDB5 SQL GIS support mo Package: monetdb5-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Recommends: monetdb5-server-hugeint, monetdb5-sql +Suggests: monetdb-client Description: MonetDB database server version 5 MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, @@ -258,6 +261,8 @@ Description: MonetDB database server ver Package: monetdb5-sql Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, monetdb5-server (= ${source:Version}) +Recommends: monetdb5-sql-hugeint +Suggests: monetdb-client Description: MonetDB SQL support for monetdb5 MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, diff --git a/sql/backends/monet5/Tests/rapi14.sql b/sql/backends/monet5/Tests/rapi14.sql new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/rapi14.sql @@ -0,0 +1,17 @@ +START TRANSACTION; + +CREATE TABLE dval(i integer); +INSERT INTO dval VALUES (1),(2),(3),(4); + +CREATE FUNCTION rapi14() returns boolean +language R +{ + rep(T,4) +}; + +SELECT rapi14() FROM dval; +DROP FUNCTION rapi14; +DROP TABLE dval; + +ROLLBACK; + diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -4150,7 +4150,7 @@ static sql_exp * rel_project_add_exp(sql, gr, e); e = exp_alias_or_copy(sql, exp_relname(e), exp_name(e), gr->l, e); } - if (!e) { + if (!e || !exp_subtype(e)) { /* we also do not expect parameters here */ set_processed(groupby); return NULL; } diff --git a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit --- a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit +++ b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit @@ -49,38 +49,34 @@ Operation successful | mal | +==================================================================================================+ | function user.s3_1{autoCommit=true}():void; | -| X_47:void := querylog.define("explain select count(*) from tables\n;","sequential_pipe",31); | +| X_43:void := querylog.define("explain select count(*) from tables\n;","sequential_pipe",27); | | X_3:bat[:oid,:wrd] := bat.new(nil:oid,nil:wrd); | | X_2 := sql.mvc(); | | X_9:bat[:oid,:sht] := sql.bind(X_2,"sys","_tables","type",0); | | X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","_tables"); | -| X_62 := algebra.subselect(X_9,X_6,2:sht,2:sht,true,true,true); | +| X_57 := algebra.subselect(X_9,X_6,2,2,true,true,true); | | (X_12,r1_12) := sql.bind(X_2,"sys","_tables","type",2); | -| X_63 := algebra.subselect(r1_12,nil:bat[:oid,:oid],2:sht,2:sht,true,true,true); | +| X_58 := algebra.subselect(r1_12,nil:bat[:oid,:oid],2,2,true,true,true); | | X_15:bat[:oid,:sht] := sql.bind(X_2,"sys","_tables","type",1); | -| X_65 := algebra.subselect(X_15,X_6,2:sht,2:sht,true,true,true); | -| X_17 := sql.subdelta(X_62,X_6,X_12,X_63,X_65); | -| X_18:bat[:oid,:int] := sql.bind(X_2,"sys","_tables","id",0); | -| (X_20,r1_25) := sql.bind(X_2,"sys","_tables","id",2); | -| X_22:bat[:oid,:int] := sql.bind(X_2,"sys","_tables","id",1); | -| X_23 := sql.projectdelta(X_17,X_18,X_20,r1_25,X_22); | -| X_24 := aggr.count(X_23); | -| X_25 := sql.single(X_24); | -| X_26 := bat.append(X_3,X_25,true); | -| X_30:bat[:oid,:sht] := sql.bind(X_2,"tmp","_tables","type",0); | -| X_31 := X_30; | +| X_60 := algebra.subselect(X_15,X_6,2,2,true,true,true); | +| X_18 := sql.subdelta(X_57,X_6,X_12,X_58,X_60); | +| X_19:bat[:oid,:int] := sql.bind(X_2,"sys","_tables","id",0); | +| (X_21,r1_24) := sql.bind(X_2,"sys","_tables","id",2); | +| X_23:bat[:oid,:int] := sql.bind(X_2,"sys","_tables","id",1); | +| X_24 := sql.projectdelta(X_18,X_19,X_21,r1_24,X_23); | +| X_25 := aggr.count(X_24); | +| X_26 := sql.single(X_25); | +| X_27 := bat.append(X_3,X_26,true); | | X_28:bat[:oid,:oid] := sql.tid(X_2,"tmp","_tables"); | -| X_32 := algebra.subselect(X_31,X_28,2:sht,2:sht,true,true,true); | -| X_33:bat[:oid,:int] := sql.bind(X_2,"tmp","_tables","id",0); | -| X_36 := X_33; | -| X_37 := algebra.leftfetchjoin(X_32,X_36); | -| X_38 := aggr.count(X_37); | -| X_39 := bat.append(X_26,X_38,true); | -| X_40:wrd := aggr.sum(X_39); | -| sql.resultSet(".L1","L1","wrd",32,0,7,X_40); | +| X_30:bat[:oid,:int] := sql.bind(X_2,"tmp","_tables","id",0); | +| X_31 := algebra.leftfetchjoin(X_28,X_30); | +| X_32 := aggr.count(X_31); | +| X_33 := bat.append(X_27,X_32,true); | +| X_35:wrd := aggr.sum(X_33); | +| sql.resultSet(".L3","L3","wrd",32,0,7,X_35); | | end user.s3_1; | +--------------------------------------------------------------------------------------------------+ -31 rows +27 rows # 19:39:11 > diff --git a/sql/test/Dependencies/dependency_owner_schema_3.sql b/sql/test/Dependencies/dependency_owner_schema_3.sql --- a/sql/test/Dependencies/dependency_owner_schema_3.sql +++ b/sql/test/Dependencies/dependency_owner_schema_3.sql @@ -15,10 +15,10 @@ SELECT a.name, s.name, 'DEP_SCHEMA' from --Table t has a dependency on view v -SELECT t.name, v.name, 'DEP_VIEW' from tables as t, tables as v, dependencies as dep where t.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type = 1; +SELECT t.name, v.name, 'DEP_VIEW' from tables as t, tables as v, dependencies as dep where t.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type in (1, 11, 21, 31); --Table t has a dependency on index i -SELECT t.name, i.name, 'DEP_INDEX' from tables as t, idxs as i where i.table_id = t.id and i.name not in (select name from keys) and t.type = 0; +SELECT t.name, i.name, 'DEP_INDEX' from tables as t, idxs as i where i.table_id = t.id and i.name not in (select name from keys) and t.type in (0, 10, 20, 30); --Table t has a dependency on trigger tri @@ -28,11 +28,11 @@ SELECT t.name, i.name, 'DEP_INDEX' from SELECT t.name, fk.name, 'DEP_FKEY' from tables as t, keys as k, keys as fk where fk.rkey = k.id and k.table_id = t.id; --Table t has a dependency on function f -SELECT t.name, f.name, 'DEP_FUNC' from functions as f, tables as t, dependencies as dep where t.id = dep.id AND f.id = dep.depend_id AND dep.depend_type = 7 AND t.type = 0 ORDER BY t.name, f.name; +SELECT t.name, f.name, 'DEP_FUNC' from functions as f, tables as t, dependencies as dep where t.id = dep.id AND f.id = dep.depend_id AND dep.depend_type = 7 AND t.type in (0, 10, 20, 30) ORDER BY t.name, f.name; --Column c has a dependency on view v -SELECT c.name, v.name, 'DEP_VIEW' from columns as c, tables as v, dependencies as dep where c.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type = 1; +SELECT c.name, v.name, 'DEP_VIEW' from columns as c, tables as v, dependencies as dep where c.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type in (1, 11, 21, 31); --Column c has a dependency on key k SELECT c.name, k.name, 'DEP_KEY' from columns as c, objects as kc, keys as k where kc."name" = c.name AND kc.id = k.id AND k.table_id = c.table_id AND k.rkey = -1; @@ -48,13 +48,13 @@ SELECT c.name, tri.name, 'DEP_TRIGGER' f --View v has a dependency on function f -SELECT v.name, f.name, 'DEP_FUNC' from functions as f, tables as v, dependencies as dep where v.id = dep.id AND f.id = dep.depend_id AND dep.depend_type = 7 AND v.type = 1 ORDER BY v.name, f.name; +SELECT v.name, f.name, 'DEP_FUNC' from functions as f, tables as v, dependencies as dep where v.id = dep.id AND f.id = dep.depend_id AND dep.depend_type = 7 AND v.type in (1, 11, 21, 31) ORDER BY v.name, f.name; --View v has a dependency on index i -SELECT v.name, i.name, 'DEP_INDEX' from tables as v, idxs as i where i.table_id = v.id and i.name not in (select name from keys) and v.type = 1; +SELECT v.name, i.name, 'DEP_INDEX' from tables as v, idxs as i where i.table_id = v.id and i.name not in (select name from keys) and v.type in (1, 11, 21, 31); --View v has a dependency on trigger tri -SELECT v.name, tri.name, 'DEP_TRIGGER' from tables as v, triggers as tri, dependencies as dep where dep.id = v.id AND dep.depend_id =tri.id AND dep.depend_type = 8 AND v.type = 1; +SELECT v.name, tri.name, 'DEP_TRIGGER' from tables as v, triggers as tri, dependencies as dep where dep.id = v.id AND dep.depend_id =tri.id AND dep.depend_type = 8 AND v.type in (1, 11, 21, 31); --Functions f1 has a dependency on function f2 diff --git a/sql/test/Users/Tests/All b/sql/test/Users/Tests/All --- a/sql/test/Users/Tests/All +++ b/sql/test/Users/Tests/All @@ -9,6 +9,14 @@ test_privs_p2 privs2 test_privs2_p1 test_privs2_p2 -dropManyUsers.Bug-3764 +createSetUp +changePasswordUser +renameUser +changeSchemaUser +role grantAndRevokeUserLogedIN.Bug-3476 grantRevokeAndGrantAgain.Bug-3765 +grantMonetdbToRegularUser.Bug-3771 +grantMonetdbToSchemaOwner.Bug-3771 +grantRole.Bug-3772 +dropManyUsers.Bug-3764 diff --git a/sql/test/Users/Tests/changePasswordUser.SQL.py b/sql/test/Users/Tests/changePasswordUser.SQL.py new file mode 100644 --- /dev/null +++ b/sql/test/Users/Tests/changePasswordUser.SQL.py @@ -0,0 +1,52 @@ +### +# Assess that the admin can change the password of a user. +# Assess that a user can change its one password. +### + +import os, sys +try: + from MonetDBtesting import process +except ImportError: + import process + +def client(user, passwd, input=None): + clt = process.client(lang='sql', user=user, passwd=passwd, + stdin = process.PIPE, + stdout = process.PIPE, + stderr = process.PIPE, + port = int(os.getenv('MAPIPORT'))) + out, err = clt.communicate(input) + sys.stdout.write(out) + sys.stderr.write(err) + +sql_client = os.getenv('SQL_CLIENT') + +client('monetdb', 'monetdb', input = """\ +ALTER USER april WITH UNENCRYPTED PASSWORD 'april2'; +""") + +# try to log in with old password +client('april', 'april', input = """\ +select 'password april'; +""") + +# try to log in with new password +client('april', 'april2', input = """\ +select 'password april2'; +ALTER USER SET UNENCRYPTED PASSWORD 'april5' USING OLD PASSWORD 'april3'; +ALTER USER SET UNENCRYPTED PASSWORD 'april' USING OLD PASSWORD 'april2'; +""") + +# try to log in with old password +client('april', 'april2', input = """\ +select 'password april2 (wrong!!!)'; +""") + + +# try to log in with the new password +client('april', 'april', input = """\ +select 'password change successfully'; +""") + + + diff --git a/sql/test/Users/Tests/changePasswordUser.stable.err b/sql/test/Users/Tests/changePasswordUser.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/Users/Tests/changePasswordUser.stable.err _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list