Changeset: 8f4c0ccf10ac for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f4c0ccf10ac
Modified Files:
        sql/backends/monet5/sql_scenario.c
Branch: Oct2014
Log Message:

Also maintain "system" status of functions and views for direct
upgrade from Jan2014 release.


diffs (14 lines):

diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1111,6 +1111,10 @@ sql_update_oct2014(Client c)
        /* recreate views depending on union funcs */
        pos += snprintf(buf + pos, bufsize - pos, "create function 
create_view_upgrade_oct2014( sname string, f string ) returns int external name 
sql.create_view_upgrade_oct2014;\n");
        pos += snprintf(buf + pos, bufsize - pos, "insert into 
upgradeOct2014_changes select create_view_upgrade_oct2014(name, query) from 
upgradeOct2014_views;\n");
+       pos += snprintf(buf + pos, bufsize - pos, "\
+       update _tables set system = true where name in ('tables', 'columns', 
'users', 'querylog_catalog', 'querylog_calls', 'querylog_history', 'tracelog', 
'sessions', 'optimizers', 'environment', 'queue', 'storage', 'storagemodel', 
'tablestoragemodel') and schema_id = (select id from schemas where name = 
'sys');\n\
+       insert into systemfunctions (select id from functions where name in 
('bbp', 'db_users', 'dependencies_columns_on_functions', 
'dependencies_columns_on_indexes', 'dependencies_columns_on_keys', 
'dependencies_columns_on_triggers', 'dependencies_columns_on_views', 
'dependencies_functions_on_functions', 'dependencies_functions_os_triggers', 
'dependencies_keys_on_foreignkeys', 'dependencies_owners_on_schemas', 
'dependencies_schemas_on_users', 'dependencies_tables_on_foreignkeys', 
'dependencies_tables_on_functions', 'dependencies_tables_on_indexes', 
'dependencies_tables_on_triggers', 'dependencies_tables_on_views', 
'dependencies_views_on_functions', 'dependencies_views_on_triggers', 'env', 
'environment', 'generate_series', 'optimizers', 'optimizer_stats', 
'querycache', 'querylog_calls', 'querylog_catalog', 'queue', 'sessions', 
'storage', 'storagemodel', 'tojsonarray', 'tracelog', 'var') and schema_id = 
(select id from schemas where name = 'sys') and id not in (select function_id 
from syst
 emfunctions));\n\
+       delete from systemfunctions where function_id not in (select id from 
functions);\n");
        pos += snprintf(buf + pos, bufsize - pos, "drop function 
create_view_upgrade_oct2014;\n");
 
        pos += snprintf(buf + pos, bufsize - pos, "drop table 
upgradeOct2014_views;\n");
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to