Changeset: e076fd62d0c7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e076fd62d0c7
Modified Files:
        sql/backends/monet5/sql_upgrades.c
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64
        sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: Mar2018
Log Message:

Update upgrade.


diffs (truncated from 588 to 300 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1468,7 +1468,7 @@ sql_update_mar2018(Client c, mvc *sql)
                        "  LEFT OUTER JOIN sys.schemas s ON f.schema_id = 
s.id\n"
                        "  LEFT OUTER JOIN sys.systemfunctions sf ON f.id = 
sf.function_id\n"
                        "UNION ALL\n"
-                       "SELECT s.name AS sname,\n"
+                       "SELECT NULL AS sname,\n"
                        "         s.name,\n"
                        "         s.name AS fullname,\n"
                        "         CAST(16 AS SMALLINT) AS ntype,\n"
diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -5724,17 +5724,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5790,7 +5782,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git 
a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64
@@ -5719,17 +5719,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5785,7 +5777,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
@@ -5011,17 +5011,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5077,7 +5069,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
@@ -5011,17 +5011,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5077,7 +5069,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -5774,17 +5774,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5840,7 +5832,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64
@@ -5774,17 +5774,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5840,7 +5832,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
@@ -5724,17 +5724,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5790,7 +5782,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
@@ -5011,17 +5011,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5077,7 +5069,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
@@ -5011,17 +5011,9 @@ CREATE TABLE sys.comments (
         remark VARCHAR(65000) NOT NULL
 );
 GRANT SELECT ON sys.comments TO PUBLIC;
-CREATE PROCEDURE sys.comment_on(obj_id INTEGER, obj_remark VARCHAR(65000))
+CREATE PROCEDURE sys.no_op()
 BEGIN
-    IF obj_id IS NOT NULL AND obj_id > 0 THEN
-        IF obj_remark IS NULL OR obj_remark = '' THEN
-                DELETE FROM sys.comments WHERE id = obj_id;
-        ELSEIF EXISTS (SELECT id FROM sys.comments WHERE id = obj_id) THEN
-                UPDATE sys.comments SET remark = obj_remark WHERE id = obj_id;
-        ELSE
-                INSERT INTO sys.comments VALUES (obj_id, obj_remark);
-        END IF;
-    END IF;
+    DECLARE dummy INTEGER;
 END;
 CREATE FUNCTION sys.function_type_keyword(ftype INT)
 RETURNS VARCHAR(20)
@@ -5077,7 +5069,7 @@ SELECT DISTINCT s.name AS sname,  -- DIS
   LEFT OUTER JOIN sys.schemas s ON f.schema_id = s.id
   LEFT OUTER JOIN sys.systemfunctions sf ON f.id = sf.function_id
 UNION ALL
-SELECT s.name AS sname,
+SELECT NULL AS sname,
          s.name,
          s.name AS fullname,
          CAST(16 AS SMALLINT) AS ntype,
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to