Changeset: 5845f3fc7bc3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5845f3fc7bc3
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-chain/Tests/upgrade.stable.out.powerpc64.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.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: default
Log Message:

Fix upgrade: upgraded create must be equal to non-upgraded create.


diffs (truncated from 360 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
@@ -1514,10 +1514,10 @@ sql_update_default(Client c, mvc *sql)
 
        pos += snprintf(buf + pos, bufsize - pos, "set schema sys;\n");
        pos += snprintf(buf + pos, bufsize - pos,
-                       "create aggregate group_concat(str string) returns 
string external name \"aggr\".\"str_group_concat\";\n"
-                       "grant execute on aggregate group_concat(string) to 
public;\n"
-                       "create aggregate group_concat(str string, sep string) 
returns string external name \"aggr\".\"str_group_concat\";\n"
-                       "grant execute on aggregate group_concat(string, 
string) to public;\n"
+                       "create aggregate sys.group_concat(str string) returns 
string external name \"aggr\".\"str_group_concat\";\n"
+                       "grant execute on aggregate sys.group_concat(string) to 
public;\n"
+                       "create aggregate sys.group_concat(str string, sep 
string) returns string external name \"aggr\".\"str_group_concat\";\n"
+                       "grant execute on aggregate sys.group_concat(string, 
string) to public;\n"
                        "insert into sys.systemfunctions (select id from 
sys.functions where name in ('group_concat') and schema_id = (select id from 
sys.schemas where name = 'sys') and id not in (select function_id from 
sys.systemfunctions));\n");
 
        if (schema)
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
@@ -5759,10 +5759,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5754,10 +5754,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5046,10 +5046,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5046,10 +5046,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5810,10 +5810,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5046,10 +5046,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
diff --git 
a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
@@ -5810,10 +5810,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5748,10 +5748,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5035,10 +5035,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5035,10 +5035,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5799,10 +5799,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "sys";
 commit;
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
@@ -5713,10 +5713,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "testschema";
 commit;
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
@@ -4997,10 +4997,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "testschema";
 commit;
diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit 
b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
--- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
+++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
@@ -4997,10 +4997,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "testschema";
 commit;
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
@@ -5761,10 +5761,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string) to public;
+create aggregate sys.group_concat(str string, sep string) returns string 
external name "aggr"."str_group_concat";
+grant execute on aggregate sys.group_concat(string, string) to public;
 insert into sys.systemfunctions (select id from sys.functions where name in 
('group_concat') and schema_id = (select id from sys.schemas where name = 
'sys') and id not in (select function_id from sys.systemfunctions));
 set schema "testschema";
 commit;
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
@@ -5748,10 +5748,10 @@ commit;
 
 Running database upgrade commands:
 set schema sys;
-create aggregate group_concat(str string) returns string external name 
"aggr"."str_group_concat";
-grant execute on aggregate group_concat(string) to public;
-create aggregate group_concat(str string, sep string) returns string external 
name "aggr"."str_group_concat";
-grant execute on aggregate group_concat(string, string) to public;
+create aggregate sys.group_concat(str string) returns string external name 
"aggr"."str_group_concat";
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to