Changeset: 759bcf8796d8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=759bcf8796d8
Modified Files:
sql/backends/monet5/sql_upgrades.c
sql/storage/store.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.32bit
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
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/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.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
sql/test/testdb-upgrade/Tests/upgrade.stable.out.powerpc64.int128
Branch: default
Log Message:
Increase maximum length of query column in sys._tables to 1 MiB.
This fixes bug 6676.
diffs (truncated from 375 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
@@ -1870,7 +1870,7 @@ sql_update_aug2018_sp2(Client c, mvc *sq
}
static str
-sql_upgrade_2019_storagemodel(Client c, mvc *sql)
+sql_upgrade_default(Client c, mvc *sql)
{
size_t bufsize = 20000, pos = 0;
char *buf, *err;
@@ -1879,7 +1879,7 @@ sql_upgrade_2019_storagemodel(Client c,
sql_table *t;
if ((buf = GDKmalloc(bufsize)) == NULL)
- throw(SQL, "sql_upgrade_2019_storagemodel", SQLSTATE(HY001)
MAL_MALLOC_FAIL);
+ throw(SQL, "sql_upgrade_default", SQLSTATE(HY001)
MAL_MALLOC_FAIL);
schema = stack_get_string(sql, "current_schema");
@@ -2179,6 +2179,11 @@ sql_upgrade_2019_storagemodel(Client c,
"update sys.functions set system = true where schema_id =
(select id from sys.schemas where name = 'sys')"
" and name in ('columnsize', 'heapsize', 'hashsize',
'imprintsize') and type = %d;\n", F_FUNC);
+ /* update type of "query" attribute of tables sys._tables and
+ * tmp_tables from varchar(2048) to varchar(1048576) */
+ pos += snprintf(buf + pos, bufsize - pos,
+ "update sys._columns set type_digits = 1048576 where
name = 'query' and table_id in (select id from sys._tables t where t.name =
'_tables' and t.schema_id in (select id from sys.schemas s where s.name in
('sys', 'tmp')));\n");
+
if (schema)
pos += snprintf(buf + pos, bufsize - pos, "set schema
\"%s\";\n", schema);
pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
@@ -2408,7 +2413,7 @@ SQLupgrades(Client c, mvc *m)
if (sql_bind_func(m->sa, s, "storagemodel", NULL, NULL, F_UNION)
&& (t = mvc_bind_table(m, s, "tablestorage")) == NULL
&& (t = mvc_bind_table(m, s, "schemastorage")) == NULL ) {
- if ((err = sql_upgrade_2019_storagemodel(c, m)) != NULL) {
+ if ((err = sql_upgrade_default(c, m)) != NULL) {
fprintf(stderr, "!%s\n", err);
freeException(err);
}
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1850,7 +1850,7 @@ store_load(void) {
bootstrap_create_column(tr, t, "id", "int", 32);
bootstrap_create_column(tr, t, "name", "varchar", 1024);
bootstrap_create_column(tr, t, "schema_id", "int", 32);
- bootstrap_create_column(tr, t, "query", "varchar", 2048);
+ bootstrap_create_column(tr, t, "query", "varchar", 1 << 20);
bootstrap_create_column(tr, t, "type", "smallint", 16);
bootstrap_create_column(tr, t, "system", "boolean", 1);
bootstrap_create_column(tr, t, "commit_action", "smallint", 16);
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
@@ -308,6 +308,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -304,6 +304,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -304,6 +304,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -6161,6 +6161,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -6161,6 +6161,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -308,6 +308,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -308,6 +308,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -308,6 +308,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
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
@@ -6161,6 +6161,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
set schema "sys";
commit;
diff --git a/sql/test/emptydb/Tests/check.stable.out
b/sql/test/emptydb/Tests/check.stable.out
--- a/sql/test/emptydb/Tests/check.stable.out
+++ b/sql/test/emptydb/Tests/check.stable.out
@@ -848,7 +848,7 @@ CREATE TABLE "bam"."pg" ("id" CHARACTER
CREATE TABLE "bam"."rg" ("id" CHARACTER LARGE OBJECT NOT NULL, "file_id"
BIGINT NOT NULL, "cn" CHARACTER LARGE OBJECT, "ds" CHARACTER LARGE OBJECT, "dt"
TIMESTAMP, "fo" CHARACTER LARGE OBJECT, "ks" CHARACTER LARGE OBJECT, "lb"
CHARACTER LARGE OBJECT, "pg" CHARACTER LARGE OBJECT, "pi" INTEGER, "pl"
CHARACTER LARGE OBJECT, "pu" CHARACTER LARGE OBJECT, "sm" CHARACTER LARGE
OBJECT, CONSTRAINT "rg_pkey_id_file_id" PRIMARY KEY ("id", "file_id"),
CONSTRAINT "rg_fkey_file_id" FOREIGN KEY ("file_id") REFERENCES "bam"."files"
("file_id"));
CREATE TABLE "bam"."sq" ("sn" CHARACTER LARGE OBJECT NOT NULL, "file_id"
BIGINT NOT NULL, "ln" INTEGER, "as" INTEGER, "m5" CHARACTER LARGE OBJECT, "sp"
CHARACTER LARGE OBJECT, "ur" CHARACTER LARGE OBJECT, CONSTRAINT
"sq_pkey_sn_file_id" PRIMARY KEY ("sn", "file_id"), CONSTRAINT
"sq_fkey_file_id" FOREIGN KEY ("file_id") REFERENCES "bam"."files" ("file_id"));
CREATE TABLE "sys"."_columns" ("id" INTEGER, "name" VARCHAR(1024), "type"
VARCHAR(1024), "type_digits" INTEGER, "type_scale" INTEGER, "table_id" INTEGER,
"default" VARCHAR(2048), "null" BOOLEAN, "number" INTEGER, "storage"
VARCHAR(2048));
-CREATE TABLE "sys"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(2048), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
+CREATE TABLE "sys"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(1048576), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
CREATE TABLE "sys"."args" ("id" INTEGER, "func_id" INTEGER, "name"
VARCHAR(256), "type" VARCHAR(1024), "type_digits" INTEGER, "type_scale"
INTEGER, "inout" TINYINT, "number" INTEGER);
CREATE TABLE "sys"."auths" ("id" INTEGER, "name" VARCHAR(1024), "grantor"
INTEGER);
CREATE TABLE "sys"."comments" ("id" INTEGER NOT NULL, "remark" VARCHAR(65000)
NOT NULL, CONSTRAINT "comments_id_pkey" PRIMARY KEY ("id"));
@@ -884,7 +884,7 @@ CREATE TABLE "sys"."types" ("id" INTEGER
CREATE TABLE "sys"."user_role" ("login_id" INTEGER, "role_id" INTEGER);
CREATE TABLE "sys"."value_partitions" ("table_id" INTEGER, "partition_id"
INTEGER, "value" VARCHAR(2048));
CREATE TABLE "tmp"."_columns" ("id" INTEGER, "name" VARCHAR(1024), "type"
VARCHAR(1024), "type_digits" INTEGER, "type_scale" INTEGER, "table_id" INTEGER,
"default" VARCHAR(2048), "null" BOOLEAN, "number" INTEGER, "storage"
VARCHAR(2048));
-CREATE TABLE "tmp"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(2048), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
+CREATE TABLE "tmp"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(1048576), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
CREATE TABLE "tmp"."idxs" ("id" INTEGER, "table_id" INTEGER, "type" INTEGER,
"name" VARCHAR(1024));
CREATE TABLE "tmp"."keys" ("id" INTEGER, "table_id" INTEGER, "type" INTEGER,
"name" VARCHAR(1024), "rkey" INTEGER, "action" INTEGER);
CREATE TABLE "tmp"."objects" ("id" INTEGER, "name" VARCHAR(1024), "nr"
INTEGER);
@@ -1467,7 +1467,7 @@ drop function pcre_replace(string, strin
% sys.t, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c #
table_name
% name, name, type, type_digits, type_scale, default,
null, number, storage # name
% varchar, varchar, varchar, int, int, varchar,
boolean, int, varchar # type
-% 34, 26, 9, 5, 1, 5, 5, 2, 0 # length
+% 34, 26, 9, 7, 1, 5, 5, 2, 0 # length
[ "_columns", "id", "int", 32, 0, NULL, true, 0, NULL
]
[ "_columns", "id", "int", 32, 0, NULL, true, 0, NULL
]
[ "_columns", "name", "varchar", 1024, 0, NULL, true, 1,
NULL ]
@@ -1494,8 +1494,8 @@ drop function pcre_replace(string, strin
[ "_tables", "name", "varchar", 1024, 0, NULL, true, 1,
NULL ]
[ "_tables", "schema_id", "int", 32, 0, NULL, true, 2,
NULL ]
[ "_tables", "schema_id", "int", 32, 0, NULL, true, 2,
NULL ]
-[ "_tables", "query", "varchar", 2048, 0, NULL, true,
3, NULL ]
-[ "_tables", "query", "varchar", 2048, 0, NULL, true,
3, NULL ]
+[ "_tables", "query", "varchar", 1048576, 0, NULL,
true, 3, NULL ]
+[ "_tables", "query", "varchar", 1048576, 0, NULL,
true, 3, NULL ]
[ "_tables", "type", "smallint", 16, 0, NULL, true, 4,
NULL ]
[ "_tables", "type", "smallint", 16, 0, NULL, true, 4,
NULL ]
[ "_tables", "system", "boolean", 1, 0, NULL, true,
5, NULL ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.32bit
b/sql/test/emptydb/Tests/check.stable.out.32bit
--- a/sql/test/emptydb/Tests/check.stable.out.32bit
+++ b/sql/test/emptydb/Tests/check.stable.out.32bit
@@ -848,7 +848,7 @@ CREATE TABLE "bam"."pg" ("id" CHARACTER
CREATE TABLE "bam"."rg" ("id" CHARACTER LARGE OBJECT NOT NULL, "file_id"
BIGINT NOT NULL, "cn" CHARACTER LARGE OBJECT, "ds" CHARACTER LARGE OBJECT, "dt"
TIMESTAMP, "fo" CHARACTER LARGE OBJECT, "ks" CHARACTER LARGE OBJECT, "lb"
CHARACTER LARGE OBJECT, "pg" CHARACTER LARGE OBJECT, "pi" INTEGER, "pl"
CHARACTER LARGE OBJECT, "pu" CHARACTER LARGE OBJECT, "sm" CHARACTER LARGE
OBJECT, CONSTRAINT "rg_pkey_id_file_id" PRIMARY KEY ("id", "file_id"),
CONSTRAINT "rg_fkey_file_id" FOREIGN KEY ("file_id") REFERENCES "bam"."files"
("file_id"));
CREATE TABLE "bam"."sq" ("sn" CHARACTER LARGE OBJECT NOT NULL, "file_id"
BIGINT NOT NULL, "ln" INTEGER, "as" INTEGER, "m5" CHARACTER LARGE OBJECT, "sp"
CHARACTER LARGE OBJECT, "ur" CHARACTER LARGE OBJECT, CONSTRAINT
"sq_pkey_sn_file_id" PRIMARY KEY ("sn", "file_id"), CONSTRAINT
"sq_fkey_file_id" FOREIGN KEY ("file_id") REFERENCES "bam"."files" ("file_id"));
CREATE TABLE "sys"."_columns" ("id" INTEGER, "name" VARCHAR(1024), "type"
VARCHAR(1024), "type_digits" INTEGER, "type_scale" INTEGER, "table_id" INTEGER,
"default" VARCHAR(2048), "null" BOOLEAN, "number" INTEGER, "storage"
VARCHAR(2048));
-CREATE TABLE "sys"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(2048), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
+CREATE TABLE "sys"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(1048576), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
CREATE TABLE "sys"."args" ("id" INTEGER, "func_id" INTEGER, "name"
VARCHAR(256), "type" VARCHAR(1024), "type_digits" INTEGER, "type_scale"
INTEGER, "inout" TINYINT, "number" INTEGER);
CREATE TABLE "sys"."auths" ("id" INTEGER, "name" VARCHAR(1024), "grantor"
INTEGER);
CREATE TABLE "sys"."comments" ("id" INTEGER NOT NULL, "remark" VARCHAR(65000)
NOT NULL, CONSTRAINT "comments_id_pkey" PRIMARY KEY ("id"));
@@ -884,7 +884,7 @@ CREATE TABLE "sys"."types" ("id" INTEGER
CREATE TABLE "sys"."user_role" ("login_id" INTEGER, "role_id" INTEGER);
CREATE TABLE "sys"."value_partitions" ("table_id" INTEGER, "partition_id"
INTEGER, "value" VARCHAR(2048));
CREATE TABLE "tmp"."_columns" ("id" INTEGER, "name" VARCHAR(1024), "type"
VARCHAR(1024), "type_digits" INTEGER, "type_scale" INTEGER, "table_id" INTEGER,
"default" VARCHAR(2048), "null" BOOLEAN, "number" INTEGER, "storage"
VARCHAR(2048));
-CREATE TABLE "tmp"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(2048), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
+CREATE TABLE "tmp"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(1048576), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
CREATE TABLE "tmp"."idxs" ("id" INTEGER, "table_id" INTEGER, "type" INTEGER,
"name" VARCHAR(1024));
CREATE TABLE "tmp"."keys" ("id" INTEGER, "table_id" INTEGER, "type" INTEGER,
"name" VARCHAR(1024), "rkey" INTEGER, "action" INTEGER);
CREATE TABLE "tmp"."objects" ("id" INTEGER, "name" VARCHAR(1024), "nr"
INTEGER);
@@ -1467,7 +1467,7 @@ drop function pcre_replace(string, strin
% sys.t, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c #
table_name
% name, name, type, type_digits, type_scale, default,
null, number, storage # name
% varchar, varchar, varchar, int, int, varchar,
boolean, int, varchar # type
-% 34, 26, 9, 5, 1, 5, 5, 2, 0 # length
+% 34, 26, 9, 7, 1, 5, 5, 2, 0 # length
[ "_columns", "id", "int", 32, 0, NULL, true, 0, NULL
]
[ "_columns", "id", "int", 32, 0, NULL, true, 0, NULL
]
[ "_columns", "name", "varchar", 1024, 0, NULL, true, 1,
NULL ]
@@ -1494,8 +1494,8 @@ drop function pcre_replace(string, strin
[ "_tables", "name", "varchar", 1024, 0, NULL, true, 1,
NULL ]
[ "_tables", "schema_id", "int", 32, 0, NULL, true, 2,
NULL ]
[ "_tables", "schema_id", "int", 32, 0, NULL, true, 2,
NULL ]
-[ "_tables", "query", "varchar", 2048, 0, NULL, true,
3, NULL ]
-[ "_tables", "query", "varchar", 2048, 0, NULL, true,
3, NULL ]
+[ "_tables", "query", "varchar", 1048576, 0, NULL,
true, 3, NULL ]
+[ "_tables", "query", "varchar", 1048576, 0, NULL,
true, 3, NULL ]
[ "_tables", "type", "smallint", 16, 0, NULL, true, 4,
NULL ]
[ "_tables", "type", "smallint", 16, 0, NULL, true, 4,
NULL ]
[ "_tables", "system", "boolean", 1, 0, NULL, true,
5, NULL ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.int128
b/sql/test/emptydb/Tests/check.stable.out.int128
--- a/sql/test/emptydb/Tests/check.stable.out.int128
+++ b/sql/test/emptydb/Tests/check.stable.out.int128
@@ -848,7 +848,7 @@ CREATE TABLE "bam"."pg" ("id" CHARACTER
CREATE TABLE "bam"."rg" ("id" CHARACTER LARGE OBJECT NOT NULL, "file_id"
BIGINT NOT NULL, "cn" CHARACTER LARGE OBJECT, "ds" CHARACTER LARGE OBJECT, "dt"
TIMESTAMP, "fo" CHARACTER LARGE OBJECT, "ks" CHARACTER LARGE OBJECT, "lb"
CHARACTER LARGE OBJECT, "pg" CHARACTER LARGE OBJECT, "pi" INTEGER, "pl"
CHARACTER LARGE OBJECT, "pu" CHARACTER LARGE OBJECT, "sm" CHARACTER LARGE
OBJECT, CONSTRAINT "rg_pkey_id_file_id" PRIMARY KEY ("id", "file_id"),
CONSTRAINT "rg_fkey_file_id" FOREIGN KEY ("file_id") REFERENCES "bam"."files"
("file_id"));
CREATE TABLE "bam"."sq" ("sn" CHARACTER LARGE OBJECT NOT NULL, "file_id"
BIGINT NOT NULL, "ln" INTEGER, "as" INTEGER, "m5" CHARACTER LARGE OBJECT, "sp"
CHARACTER LARGE OBJECT, "ur" CHARACTER LARGE OBJECT, CONSTRAINT
"sq_pkey_sn_file_id" PRIMARY KEY ("sn", "file_id"), CONSTRAINT
"sq_fkey_file_id" FOREIGN KEY ("file_id") REFERENCES "bam"."files" ("file_id"));
CREATE TABLE "sys"."_columns" ("id" INTEGER, "name" VARCHAR(1024), "type"
VARCHAR(1024), "type_digits" INTEGER, "type_scale" INTEGER, "table_id" INTEGER,
"default" VARCHAR(2048), "null" BOOLEAN, "number" INTEGER, "storage"
VARCHAR(2048));
-CREATE TABLE "sys"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(2048), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
+CREATE TABLE "sys"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(1048576), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
CREATE TABLE "sys"."args" ("id" INTEGER, "func_id" INTEGER, "name"
VARCHAR(256), "type" VARCHAR(1024), "type_digits" INTEGER, "type_scale"
INTEGER, "inout" TINYINT, "number" INTEGER);
CREATE TABLE "sys"."auths" ("id" INTEGER, "name" VARCHAR(1024), "grantor"
INTEGER);
CREATE TABLE "sys"."comments" ("id" INTEGER NOT NULL, "remark" VARCHAR(65000)
NOT NULL, CONSTRAINT "comments_id_pkey" PRIMARY KEY ("id"));
@@ -884,7 +884,7 @@ CREATE TABLE "sys"."types" ("id" INTEGER
CREATE TABLE "sys"."user_role" ("login_id" INTEGER, "role_id" INTEGER);
CREATE TABLE "sys"."value_partitions" ("table_id" INTEGER, "partition_id"
INTEGER, "value" VARCHAR(2048));
CREATE TABLE "tmp"."_columns" ("id" INTEGER, "name" VARCHAR(1024), "type"
VARCHAR(1024), "type_digits" INTEGER, "type_scale" INTEGER, "table_id" INTEGER,
"default" VARCHAR(2048), "null" BOOLEAN, "number" INTEGER, "storage"
VARCHAR(2048));
-CREATE TABLE "tmp"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(2048), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
+CREATE TABLE "tmp"."_tables" ("id" INTEGER, "name" VARCHAR(1024), "schema_id"
INTEGER, "query" VARCHAR(1048576), "type" SMALLINT, "system" BOOLEAN,
"commit_action" SMALLINT, "access" SMALLINT);
CREATE TABLE "tmp"."idxs" ("id" INTEGER, "table_id" INTEGER, "type" INTEGER,
"name" VARCHAR(1024));
CREATE TABLE "tmp"."keys" ("id" INTEGER, "table_id" INTEGER, "type" INTEGER,
"name" VARCHAR(1024), "rkey" INTEGER, "action" INTEGER);
CREATE TABLE "tmp"."objects" ("id" INTEGER, "name" VARCHAR(1024), "nr"
INTEGER);
@@ -1477,7 +1477,7 @@ drop function pcre_replace(string, strin
% sys.t, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c #
table_name
% name, name, type, type_digits, type_scale, default,
null, number, storage # name
% varchar, varchar, varchar, int, int, varchar,
boolean, int, varchar # type
-% 34, 26, 9, 5, 1, 5, 5, 2, 0 # length
+% 34, 26, 9, 7, 1, 5, 5, 2, 0 # length
[ "_columns", "id", "int", 32, 0, NULL, true, 0, NULL
]
[ "_columns", "id", "int", 32, 0, NULL, true, 0, NULL
]
[ "_columns", "name", "varchar", 1024, 0, NULL, true, 1,
NULL ]
@@ -1504,8 +1504,8 @@ drop function pcre_replace(string, strin
[ "_tables", "name", "varchar", 1024, 0, NULL, true, 1,
NULL ]
[ "_tables", "schema_id", "int", 32, 0, NULL, true, 2,
NULL ]
[ "_tables", "schema_id", "int", 32, 0, NULL, true, 2,
NULL ]
-[ "_tables", "query", "varchar", 2048, 0, NULL, true,
3, NULL ]
-[ "_tables", "query", "varchar", 2048, 0, NULL, true,
3, NULL ]
+[ "_tables", "query", "varchar", 1048576, 0, NULL,
true, 3, NULL ]
+[ "_tables", "query", "varchar", 1048576, 0, NULL,
true, 3, NULL ]
[ "_tables", "type", "smallint", 16, 0, NULL, true, 4,
NULL ]
[ "_tables", "type", "smallint", 16, 0, NULL, true, 4,
NULL ]
[ "_tables", "system", "boolean", 1, 0, NULL, true,
5, NULL ]
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
@@ -308,6 +308,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
set schema "sys";
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
@@ -307,6 +307,7 @@ update sys._tables set system = true whe
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storage') and type = 5;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('storagemodelinit') and type = 2;
update sys.functions set system = true where schema_id = (select id from
sys.schemas where name = 'sys') and name in ('columnsize', 'heapsize',
'hashsize', 'imprintsize') and type = 1;
+update sys._columns set type_digits = 1048576 where name = 'query' and
table_id in (select id from sys._tables t where t.name = '_tables' and
t.schema_id in (select id from sys.schemas s where s.name in ('sys', 'tmp')));
set schema "sys";
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
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list