Changeset: 90a19d87a129 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=90a19d87a129
Modified Files:
        sql/backends/monet5/sql_upgrades.c
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        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.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.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.int128
Branch: default
Log Message:

Fix definition of sys.malfunctions.
This was broken in the Dec2016 branch.


diffs (172 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
@@ -1258,6 +1258,12 @@ sql_update_default(Client c, mvc *sql)
                        "delete from sys._columns where table_id = (select id 
from sys._tables where name = 'connections' and schema_id = (select id from 
sys.schemas where name = 'sys'));\n"
                        "delete from sys._tables where name = 'connections' and 
schema_id = (select id from sys.schemas where name = 'sys');\n");
 
+       /* 25_debug.sql */
+       pos += snprintf(buf + pos, bufsize - pos,
+                       "drop function sys.malfunctions;\n"
+                       "create function sys.malfunctions() returns 
table(\"module\" string, \"function\" string, \"signature\" string, \"address\" 
string, \"comment\" string) external name \"manual\".\"functions\";\n"
+                       "insert into sys.systemfunctions (select id from 
sys.functions where name = 'malfunctions' and schema_id = (select id from 
sys.schemas where name = 'sys') and id not in (select function_id from 
sys.systemfunctions));\n");
+
        /* 46_profiler.sql */
        pos += snprintf(buf + pos, bufsize - pos,
                        "create function profiler.getlimit() returns integer 
external name profiler.getlimit;\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
@@ -28,6 +28,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
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
@@ -28,6 +28,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
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
@@ -72,6 +72,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
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
@@ -28,6 +28,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
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
@@ -28,6 +28,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
@@ -72,6 +72,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -26,6 +26,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
@@ -23,6 +23,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -67,6 +67,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 
b/sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
@@ -28,6 +28,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/testdb-upgrade/Tests/upgrade.stable.out 
b/sql/test/testdb-upgrade/Tests/upgrade.stable.out
--- a/sql/test/testdb-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/testdb-upgrade/Tests/upgrade.stable.out
@@ -23,6 +23,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
diff --git a/sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 
b/sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
--- a/sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
+++ b/sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
@@ -64,6 +64,9 @@ Running database upgrade commands:
 set schema "sys";
 delete from sys._columns where table_id = (select id from sys._tables where 
name = 'connections' and schema_id = (select id from sys.schemas where name = 
'sys'));
 delete from sys._tables where name = 'connections' and schema_id = (select id 
from sys.schemas where name = 'sys');
+drop function sys.malfunctions;
+create function sys.malfunctions() returns table("module" string, "function" 
string, "signature" string, "address" string, "comment" string) external name 
"manual"."functions";
+insert into sys.systemfunctions (select id from sys.functions where name = 
'malfunctions' and schema_id = (select id from sys.schemas where name = 'sys') 
and id not in (select function_id from sys.systemfunctions));
 create function profiler.getlimit() returns integer external name 
profiler.getlimit;
 create procedure profiler.setlimit(lim integer) external name 
profiler.setlimit;
 drop procedure profiler.setpoolsize;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to