Changeset: 0f2c76f98217 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0f2c76f98217
Modified Files:
sql/backends/monet5/sql_upgrades.c
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: cleanup_types
Log Message:
Move upgrade code to a better place.
diffs (truncated from 575 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
@@ -168,24 +168,6 @@ check_sys_tables(Client c, mvc *m, sql_s
};
char *err;
- /* cleanup_types: change introduced post Dec2023 */
- err = SQLstatementIntern(c,
- "update sys._columns
set type_digits = 7 where type = 'tinyint' and type_digits <> 7;\n"
- "update sys._columns
set type_digits = 15 where type = 'smallint' and type_digits <> 15;\n"
- "update sys._columns
set type_digits = 31 where type = 'int' and type_digits <> 31;\n"
- "update sys._columns
set type_digits = 63 where type = 'bigint' and type_digits <> 63;\n"
- "update sys._columns
set type_digits = 127 where type = 'hugeint' and type_digits <> 127;\n"
- "update sys._columns
set type = 'varchar' where type in ('clob', 'char') and table_id in (select id
from sys._tables where system and name <> 'netcdf_files');\n"
- "update sys.args set
type_digits = 7 where type = 'tinyint' and type_digits <> 7;\n"
- "update sys.args set
type_digits = 15 where type = 'smallint' and type_digits <> 15;\n"
- "update sys.args set
type_digits = 31 where type = 'int' and type_digits <> 31;\n"
- "update sys.args set
type_digits = 63 where type = 'bigint' and type_digits <> 63;\n"
- "update sys.args set
type_digits = 127 where type = 'hugeint' and type_digits <> 127;\n"
- "update sys.args set
type = 'varchar' where type in ('clob', 'char');\n",
- "update", true, false,
NULL);
- if (err)
- return err;
-
/* if any of the tested function's internal ID does not match the ID
* in the sys.functions table, we recreate the internal part of the
* system tables */
@@ -6631,6 +6613,18 @@ sql_update_default(Client c, mvc *sql, s
/* do update */
sql_table *t;
const char *query =
+ "update sys._columns set type_digits = 7 where
type = 'tinyint' and type_digits <> 7;\n"
+ "update sys._columns set type_digits = 15 where
type = 'smallint' and type_digits <> 15;\n"
+ "update sys._columns set type_digits = 31 where
type = 'int' and type_digits <> 31;\n"
+ "update sys._columns set type_digits = 63 where
type = 'bigint' and type_digits <> 63;\n"
+ "update sys._columns set type_digits = 127
where type = 'hugeint' and type_digits <> 127;\n"
+ "update sys._columns set type = 'varchar' where
type in ('clob', 'char') and table_id in (select id from sys._tables where
system and name <> 'netcdf_files');\n"
+ "update sys.args set type_digits = 7 where type
= 'tinyint' and type_digits <> 7;\n"
+ "update sys.args set type_digits = 15 where
type = 'smallint' and type_digits <> 15;\n"
+ "update sys.args set type_digits = 31 where
type = 'int' and type_digits <> 31;\n"
+ "update sys.args set type_digits = 63 where
type = 'bigint' and type_digits <> 63;\n"
+ "update sys.args set type_digits = 127 where
type = 'hugeint' and type_digits <> 127;\n"
+ "update sys.args set type = 'varchar' where
type in ('clob', 'char');\n"
"drop function if exists sys.time_to_str(time
with time zone, string) cascade;\n"
"drop function if exists
sys.timestamp_to_str(timestamp with time zone, string) cascade;\n"
"create function time_to_str(d time, format
string) returns string\n"
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
@@ -611,6 +611,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -611,6 +611,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -680,6 +680,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -611,6 +611,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -611,6 +611,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -680,6 +680,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -8,6 +8,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -8,6 +8,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -77,6 +77,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -8,6 +8,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -8,6 +8,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
+update sys._columns set type_digits = 127 where type = 'hugeint' and
type_digits <> 127;
+update sys._columns set type = 'varchar' where type in ('clob', 'char') and
table_id in (select id from sys._tables where system and name <>
'netcdf_files');
+update sys.args set type_digits = 7 where type = 'tinyint' and type_digits <>
7;
+update sys.args set type_digits = 15 where type = 'smallint' and type_digits
<> 15;
+update sys.args set type_digits = 31 where type = 'int' and type_digits <> 31;
+update sys.args set type_digits = 63 where type = 'bigint' and type_digits <>
63;
+update sys.args set type_digits = 127 where type = 'hugeint' and type_digits
<> 127;
+update sys.args set type = 'varchar' where type in ('clob', 'char');
drop function if exists sys.time_to_str(time with time zone, string) cascade;
drop function if exists sys.timestamp_to_str(timestamp with time zone, string)
cascade;
create function time_to_str(d time, format string) returns string
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
@@ -77,6 +77,18 @@ GRANT EXECUTE ON FUNCTION json.isvalid(j
update sys.functions set system = true where system <> true and name =
'isvalid' and schema_id = (select id from sys.schemas where name = 'json');
Running database upgrade commands:
+update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits
<> 7;
+update sys._columns set type_digits = 15 where type = 'smallint' and
type_digits <> 15;
+update sys._columns set type_digits = 31 where type = 'int' and type_digits <>
31;
+update sys._columns set type_digits = 63 where type = 'bigint' and type_digits
<> 63;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]