Changeset: bbc110e2e56a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/bbc110e2e56a
Modified Files:
        sql/backends/monet5/sql_upgrades.c
        sql/scripts/22_clients.sql
        
sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128
        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-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-previous-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: Aug2024
Log Message:

Add column 'session_attr' to sys.clientinfo_properties

So clients can figure out the relationship between the JDBC-style
ClientInfo property names used in the MAPI protocol and the
corresponding columns of the sessions table.


diffs (truncated from 598 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
@@ -7101,13 +7101,13 @@ sql_update_aug2024(Client c, mvc *sql, s
                                                "create procedure 
sys.setclientinfo(property string, value string)\n"
                                                " external name 
clients.setinfo;\n"
                                                "grant execute on procedure 
sys.setclientinfo(string, string) to public;\n"
-                                               "create table 
sys.clientinfo_properties(prop string);\n"
+                                               "create table 
sys.clientinfo_properties(prop string, session_attr string);\n"
                                                "insert into 
sys.clientinfo_properties values\n"
-                                               " ('ClientHostname'),\n"
-                                               " ('ApplicationName'),\n"
-                                               " ('ClientLibrary'),\n"
-                                               " ('ClientRemark'),\n"
-                                               " ('ClientPid');\n"
+                                               " ('ClientHostname', 
'hostname'),\n"
+                                               " ('ApplicationName', 
'application'),\n"
+                                               " ('ClientLibrary', 
'client'),\n"
+                                               " ('ClientRemark', 'remark'),\n"
+                                               " ('ClientPid', 'clientpid');\n"
                                                "update sys.functions set 
system = true where schema_id = 2000 and name in ('setclientinfo', 
'sessions');\n"
                                                "update sys._tables set system 
= true where schema_id = 2000 and name in ('clientinfo_properties', 
'sessions');\n";
 
diff --git a/sql/scripts/22_clients.sql b/sql/scripts/22_clients.sql
--- a/sql/scripts/22_clients.sql
+++ b/sql/scripts/22_clients.sql
@@ -44,13 +44,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
        external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
-       ('ClientHostname'),
-       ('ApplicationName'),
-       ('ClientLibrary'),
-       ('ClientRemark'),
-       ('ClientPid');
+       ('ClientHostname', 'hostname'),
+       ('ApplicationName', 'application'),
+       ('ClientLibrary', 'client'),
+       ('ClientRemark', 'remark'),
+       ('ClientPid', 'clientpid');
 
 -- routines to bring the system down quickly
 create procedure sys.shutdown(delay tinyint)
diff --git 
a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- 
a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ 
b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -1032,13 +1032,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
diff --git a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
@@ -1020,13 +1020,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
diff --git 
a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -1101,13 +1101,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
diff --git 
a/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
@@ -1032,13 +1032,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
diff --git a/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out 
b/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
--- a/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
@@ -1020,13 +1020,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
diff --git a/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128
@@ -1101,13 +1101,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
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
@@ -422,13 +422,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
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
@@ -410,13 +410,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
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
@@ -491,13 +491,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
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
@@ -422,13 +422,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
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
@@ -410,13 +410,13 @@ create view sys.sessions as select * fro
 create procedure sys.setclientinfo(property string, value string)
  external name clients.setinfo;
 grant execute on procedure sys.setclientinfo(string, string) to public;
-create table sys.clientinfo_properties(prop string);
+create table sys.clientinfo_properties(prop string, session_attr string);
 insert into sys.clientinfo_properties values
- ('ClientHostname'),
- ('ApplicationName'),
- ('ClientLibrary'),
- ('ClientRemark'),
- ('ClientPid');
+ ('ClientHostname', 'hostname'),
+ ('ApplicationName', 'application'),
+ ('ClientLibrary', 'client'),
+ ('ClientRemark', 'remark'),
+ ('ClientPid', 'clientpid');
 update sys.functions set system = true where schema_id = 2000 and name in 
('setclientinfo', 'sessions');
 update sys._tables set system = true where schema_id = 2000 and name in 
('clientinfo_properties', 'sessions');
 
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to