Changeset: f2668cb3fe61 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f2668cb3fe61
Modified Files:
        clients/mapiclient/dump.c
        sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128
        sql/test/testdb-upgrade/Tests/dump.stable.out
        sql/test/testdb/Tests/dump.stable.out
Branch: default
Log Message:

Merge with Aug2018 branch.


diffs (123 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -1069,8 +1069,8 @@ describe_table(Mapi mid, const char *sch
                                         "SELECT f.id, s.name, f.name "
                                         "FROM sys.schemas s, "
                                              "sys.functions f "
-                                        "WHERE s.id = f.schema_id AND "
-                                              "f.id IN (SELECT id FROM 
sys.dependencies WHERE depend_id = '%d')",
+                                        "WHERE s.id = f.schema_id "
+                                          "AND f.id IN (SELECT id FROM 
sys.dependencies WHERE depend_id = '%d')",
                                         table_id);
                        if ((hdl = mapi_query(mid, query)) == NULL || 
mapi_error(mid))
                                goto bailout;
@@ -2043,14 +2043,17 @@ dump_database(Mapi mid, stream *toConsol
                            "WHEN 8 THEN 'DELETE' "
                            "WHEN 16 THEN 'EXECUTE' "
                            "WHEN 32 THEN 'GRANT' END, "
-                      "g.name, p.grantable "
+                      "g.name, p.grantable, "
+                      "ft.function_type_keyword "
                "FROM sys.schemas s, sys.functions f, "
-                    "sys.auths a, sys.privileges p, sys.auths g "
-               "WHERE s.id = f.schema_id AND "
-                     "f.id = p.obj_id AND "
-                     "p.auth_id = a.id AND "
-                     "p.grantor = g.id "
-                     "AND NOT f.system "
+                    "sys.auths a, sys.privileges p, sys.auths g, "
+                    "sys.function_types ft "
+               "WHERE s.id = f.schema_id "
+                 "AND f.id = p.obj_id "
+                 "AND p.auth_id = a.id "
+                 "AND p.grantor = g.id "
+                 "AND f.type = ft.function_type_id "
+                 "AND NOT f.system "
                "ORDER BY s.name, f.name, a.name, g.name, p.grantable"
                :
                "SELECT s.name, f.name, a.name, "
diff --git a/sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128 
b/sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128
--- a/sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128
+++ b/sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128
@@ -101315,17 +101315,17 @@ CREATE TABLE "testschema"."geomtest" (
 COPY 2 RECORDS INTO "testschema"."geomtest" FROM stdin USING DELIMITERS 
'\t','\n','"';
 POINT (10.5 12.3)      LINESTRING (10 10, 20 20, 30 40)        LINESTRING (10 
10, 20 20, 30 40)        POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   
POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   MULTIPOINT (20 80, 110 160, 20 
160)     MULTILINESTRING ((0 0, 0 80, 60 80, 60 0, 0 0)) MULTILINESTRING ((0 0, 
0 80, 60 80, 60 0, 0 0)) MULTIPOLYGON (((140 110, 260 110, 170 20, 50 20, 140 
110)), ((300 270, 420 270, 340 190, 220 190, 300 270)))    MULTIPOLYGON (((140 
110, 260 110, 170 20, 50 20, 140 110)), ((300 270, 420 270, 340 190, 220 190, 
300 270)))    POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   
GEOMETRYCOLLECTION (POLYGON ((0 0, 0 100, 100 100, 100 0, 0 0)), LINESTRING (10 
10, 20 20, 30 40))      BOX (10.000000 10.000000, 20.000000 20.000000)
 NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    
NULL    NULL    NULL
-ALTER TABLE "testschema"."mt3" ADD TABLE "mt1";
-ALTER TABLE "testschema"."mt3" ADD TABLE "t4";
-ALTER TABLE "testschema"."mt2" ADD TABLE "t1";
-ALTER TABLE "testschema"."mt2" ADD TABLE "t3";
-ALTER TABLE "testschema"."mt1" ADD TABLE "t1";
-ALTER TABLE "testschema"."mt1" ADD TABLE "t2";
+ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."mt1";
+ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."t4";
+ALTER TABLE "testschema"."mt2" ADD TABLE "testschema"."t1";
+ALTER TABLE "testschema"."mt2" ADD TABLE "testschema"."t3";
+ALTER TABLE "testschema"."mt1" ADD TABLE "testschema"."t1";
+ALTER TABLE "testschema"."mt1" ADD TABLE "testschema"."t2";
 ALTER TABLE "testschema"."keytest2" ADD CONSTRAINT "keytest2_key1_key2_fkey" 
FOREIGN KEY ("key1", "key2") REFERENCES "testschema"."keytest1" ("key1", 
"key2");
 ALTER TABLE "testschema"."selfref" ADD CONSTRAINT "selfref_parentid_fkey" 
FOREIGN KEY ("parentid") REFERENCES "testschema"."selfref" ("id");
 ALTER SEQUENCE "testschema"."selfref_seq" RESTART WITH 7 NO CYCLE;
 ALTER SEQUENCE "testschema"."test_seq" RESTART WITH 8 INCREMENT BY 3 MINVALUE 
5 MAXVALUE 10 CYCLE;
-GRANT EXECUTE ON "keyjoin" TO "public";
+GRANT EXECUTE ON FUNCTION "testschema"."keyjoin" TO "public";
 SET SCHEMA "sys";
 COMMIT;
 
diff --git a/sql/test/testdb-upgrade/Tests/dump.stable.out 
b/sql/test/testdb-upgrade/Tests/dump.stable.out
--- a/sql/test/testdb-upgrade/Tests/dump.stable.out
+++ b/sql/test/testdb-upgrade/Tests/dump.stable.out
@@ -101310,17 +101310,17 @@ CREATE TABLE "testschema"."geomtest" (
 COPY 2 RECORDS INTO "testschema"."geomtest" FROM stdin USING DELIMITERS 
'\t','\n','"';
 POINT (10.5 12.3)      LINESTRING (10 10, 20 20, 30 40)        LINESTRING (10 
10, 20 20, 30 40)        POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   
POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   MULTIPOINT (20 80, 110 160, 20 
160)     MULTILINESTRING ((0 0, 0 80, 60 80, 60 0, 0 0)) MULTILINESTRING ((0 0, 
0 80, 60 80, 60 0, 0 0)) MULTIPOLYGON (((140 110, 260 110, 170 20, 50 20, 140 
110)), ((300 270, 420 270, 340 190, 220 190, 300 270)))    MULTIPOLYGON (((140 
110, 260 110, 170 20, 50 20, 140 110)), ((300 270, 420 270, 340 190, 220 190, 
300 270)))    POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   
GEOMETRYCOLLECTION (POLYGON ((0 0, 0 100, 100 100, 100 0, 0 0)), LINESTRING (10 
10, 20 20, 30 40))      BOX (10.000000 10.000000, 20.000000 20.000000)
 NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    
NULL    NULL    NULL
-ALTER TABLE "testschema"."mt3" ADD TABLE "mt1";
-ALTER TABLE "testschema"."mt3" ADD TABLE "t4";
-ALTER TABLE "testschema"."mt2" ADD TABLE "t1";
-ALTER TABLE "testschema"."mt2" ADD TABLE "t3";
-ALTER TABLE "testschema"."mt1" ADD TABLE "t1";
-ALTER TABLE "testschema"."mt1" ADD TABLE "t2";
+ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."mt1";
+ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."t4";
+ALTER TABLE "testschema"."mt2" ADD TABLE "testschema"."t1";
+ALTER TABLE "testschema"."mt2" ADD TABLE "testschema"."t3";
+ALTER TABLE "testschema"."mt1" ADD TABLE "testschema"."t1";
+ALTER TABLE "testschema"."mt1" ADD TABLE "testschema"."t2";
 ALTER TABLE "testschema"."keytest2" ADD CONSTRAINT "keytest2_key1_key2_fkey" 
FOREIGN KEY ("key1", "key2") REFERENCES "testschema"."keytest1" ("key1", 
"key2");
 ALTER TABLE "testschema"."selfref" ADD CONSTRAINT "selfref_parentid_fkey" 
FOREIGN KEY ("parentid") REFERENCES "testschema"."selfref" ("id");
 ALTER SEQUENCE "testschema"."selfref_seq" RESTART WITH 7 NO CYCLE;
 ALTER SEQUENCE "testschema"."test_seq" RESTART WITH 8 INCREMENT BY 3 MINVALUE 
5 MAXVALUE 10 CYCLE;
-GRANT EXECUTE ON "keyjoin" TO "public";
+GRANT EXECUTE ON FUNCTION "testschema"."keyjoin" TO "public";
 SET SCHEMA "sys";
 COMMIT;
 
diff --git a/sql/test/testdb/Tests/dump.stable.out 
b/sql/test/testdb/Tests/dump.stable.out
--- a/sql/test/testdb/Tests/dump.stable.out
+++ b/sql/test/testdb/Tests/dump.stable.out
@@ -101309,17 +101309,17 @@ CREATE TABLE "testschema"."geomtest" (
 COPY 2 RECORDS INTO "testschema"."geomtest" FROM stdin USING DELIMITERS 
'\t','\n','"';
 POINT (10.5 12.3)      LINESTRING (10 10, 20 20, 30 40)        LINESTRING (10 
10, 20 20, 30 40)        POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   
POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   MULTIPOINT (20 80, 110 160, 20 
160)     MULTILINESTRING ((0 0, 0 80, 60 80, 60 0, 0 0)) MULTILINESTRING ((0 0, 
0 80, 60 80, 60 0, 0 0)) MULTIPOLYGON (((140 110, 260 110, 170 20, 50 20, 140 
110)), ((300 270, 420 270, 340 190, 220 190, 300 270)))    MULTIPOLYGON (((140 
110, 260 110, 170 20, 50 20, 140 110)), ((300 270, 420 270, 340 190, 220 190, 
300 270)))    POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))   
GEOMETRYCOLLECTION (POLYGON ((0 0, 0 100, 100 100, 100 0, 0 0)), LINESTRING (10 
10, 20 20, 30 40))      BOX (10.000000 10.000000, 20.000000 20.000000)
 NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    
NULL    NULL    NULL
-ALTER TABLE "testschema"."mt3" ADD TABLE "mt1";
-ALTER TABLE "testschema"."mt3" ADD TABLE "t4";
-ALTER TABLE "testschema"."mt2" ADD TABLE "t1";
-ALTER TABLE "testschema"."mt2" ADD TABLE "t3";
-ALTER TABLE "testschema"."mt1" ADD TABLE "t1";
-ALTER TABLE "testschema"."mt1" ADD TABLE "t2";
+ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."mt1";
+ALTER TABLE "testschema"."mt3" ADD TABLE "testschema"."t4";
+ALTER TABLE "testschema"."mt2" ADD TABLE "testschema"."t1";
+ALTER TABLE "testschema"."mt2" ADD TABLE "testschema"."t3";
+ALTER TABLE "testschema"."mt1" ADD TABLE "testschema"."t1";
+ALTER TABLE "testschema"."mt1" ADD TABLE "testschema"."t2";
 ALTER TABLE "testschema"."keytest2" ADD CONSTRAINT "keytest2_key1_key2_fkey" 
FOREIGN KEY ("key1", "key2") REFERENCES "testschema"."keytest1" ("key1", 
"key2");
 ALTER TABLE "testschema"."selfref" ADD CONSTRAINT "selfref_parentid_fkey" 
FOREIGN KEY ("parentid") REFERENCES "testschema"."selfref" ("id");
 ALTER SEQUENCE "testschema"."selfref_seq" RESTART WITH 7 NO CYCLE;
 ALTER SEQUENCE "testschema"."test_seq" RESTART WITH 8 INCREMENT BY 3 MINVALUE 
5 MAXVALUE 10 CYCLE;
-GRANT EXECUTE ON "keyjoin" TO "public";
+GRANT EXECUTE ON FUNCTION "testschema"."keyjoin" TO "public";
 SET SCHEMA "sys";
 COMMIT;
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to