MonetDB: default - merged with aug2024
Changeset: acc24cd4639d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/acc24cd4639d Modified Files: MonetDB.spec clients/odbc/winsetup/setup.rc sql/backends/monet5/sql.c Branch: default Log Message: merged with aug2024 diffs (truncated from 2480 to 300 lines): diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -44,6 +44,7 @@ GPATH GRTAGS TAGS tags +cscope.* *.pyo *.rej *.orig diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,8 +118,14 @@ if(WIN32) ${CMAKE_CURRENT_BINARY_DIR}/unistd.h) endif() -add_library(monetdb_config_header - INTERFACE) +add_library(monetdb_config_header INTERFACE) + +if (CTAGS_PATH) + add_dependencies(monetdb_config_header tags) +endif() +if (CSCOPE_PATH) + add_dependencies(monetdb_config_header cscope) +endif() target_include_directories(monetdb_config_header INTERFACE diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -417,6 +417,7 @@ developer. %{_bindir}/arraytest %{_bindir}/bincopydata %{_bindir}/murltest +%{_bindir}/odbcconnect %{_bindir}/odbcsample1 %{_bindir}/sample0 %{_bindir}/sample1 diff --git a/clients/odbc/winsetup/resource.h b/clients/odbc/winsetup/resource.h --- a/clients/odbc/winsetup/resource.h +++ b/clients/odbc/winsetup/resource.h @@ -24,21 +24,21 @@ #define IDC_EDIT_PORT 2006 #define IDC_EDIT_DATABASE 2007 -// Advanced settings (new from Jun2024) -#define IDC_EDIT_SCHEMA 2011 -#define IDC_EDIT_LOGINTIMEOUT 2012 -#define IDC_EDIT_REPLYTIMEOUT 2013 -#define IDC_EDIT_REPLYSIZE 2014 -#define IDC_EDIT_AUTOCOMMIT 2015 -#define IDC_EDIT_TIMEZONE 2016 -#define IDC_EDIT_LOGFILE2017 +// Secure connections using TLS +#define IDC_EDIT_USETLS 2011 +#define IDC_EDIT_SERVERCERT 2012 +#define IDC_EDIT_SERVERCERTHASH 2013 +#define IDC_EDIT_CLIENTKEY 2014 +#define IDC_EDIT_CLIENTCERT 2015 -// Secure connections using TLS -#define IDC_EDIT_USETLS 2021 -#define IDC_EDIT_SERVERCERT 2022 -#define IDC_EDIT_SERVERCERTHASH 2023 -#define IDC_EDIT_CLIENTKEY 2024 -#define IDC_EDIT_CLIENTCERT 2025 +// Advanced settings +#define IDC_EDIT_SCHEMA 2021 +#define IDC_EDIT_LOGINTIMEOUT 2022 +#define IDC_EDIT_REPLYTIMEOUT 2023 +#define IDC_EDIT_REPLYSIZE 2024 +#define IDC_EDIT_AUTOCOMMIT 2025 +#define IDC_EDIT_TIMEZONE 2026 +#define IDC_EDIT_LOGFILE2027 #define IDC_BUTTON_TEST 2031 #define IDC_BUTTON_HELP 2032 diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c --- a/clients/odbc/winsetup/setup.c +++ b/clients/odbc/winsetup/setup.c @@ -154,6 +154,13 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_HOST, datap->host ? datap->host : ""); SetDlgItemText(hwndDlg, IDC_EDIT_PORT, datap->port ? datap->port : ""); SetDlgItemText(hwndDlg, IDC_EDIT_DATABASE, datap->database ? datap->database : ""); + // Secure connections using TLS + SetDlgItemText(hwndDlg, IDC_EDIT_USETLS, datap->use_tls ? datap->use_tls : "off"); + SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, datap->servercert ? datap->servercert : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERTHASH, datap->servercerthash ? datap->servercerthash : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTKEY, datap->clientkey ? datap->clientkey : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTCERT, datap->clientcert ? datap->clientcert : ""); + // Advanced settings SetDlgItemText(hwndDlg, IDC_EDIT_SCHEMA, datap->schema ? datap->schema : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGINTIMEOUT, datap->logintimeout ? datap->logintimeout : ""); SetDlgItemText(hwndDlg, IDC_EDIT_REPLYTIMEOUT, datap->replytimeout ? datap->replytimeout : ""); @@ -161,11 +168,6 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_AUTOCOMMIT, datap->autocommit ? datap->autocommit : "on"); SetDlgItemText(hwndDlg, IDC_EDIT_TIMEZONE, datap->timezone ? datap->timezone : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGFILE, datap->logfile ? datap->logfile : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_USETLS, datap->use_tls ? datap->use_tls : "off"); - SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, datap->servercert ? datap->servercert : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERTHASH, datap->servercerthash ? datap->servercerthash : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTKEY, datap->clientkey ?
MonetDB: Aug2024 - fixing the push_up_munion, ie on anti join co...
Changeset: 96ad3101c398 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/96ad3101c398 Modified Files: sql/server/rel_unnest.c Branch: Aug2024 Log Message: fixing the push_up_munion, ie on anti join convert into inter (binary chained) diffs (26 lines): diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c --- a/sql/server/rel_unnest.c +++ b/sql/server/rel_unnest.c @@ -1647,10 +1647,19 @@ push_up_munion(mvc *sql, sql_rel *rel, l sql_rel *sf = rlist->h->data; ns->exps = rel_projections(sql, sf, NULL, 1, 1); } - if (rel->op == op_anti && s->op == op_munion) { - assert(0); /* needs to convert list in left/right again ! */ + if (rel->op == op_anti && s->op == op_munion) { + /* chain the munion list of relations into a pair-wise op_inter chain */ + sql_rel *cl = rlist->h->data, *cr = rlist->h->next->data; ns->op = op_inter; - } + if (list_length(rlist) > 2) { + for (node *n = rlist->h->next->next; n; n = n->next) { + cr = rel_setop(sql->sa, cr, n->data, op_inter); + cr->exps = exps_copy(sql, ns->exps); + } + } + ns->l = cl; + ns->r = cr; + } rel_destroy(rel); return ns; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Extending integrity checks for check_constrai...
Changeset: ad3d61b9f227 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ad3d61b9f227 Modified Files: sql/test/information-schema/Tests/check_constraints.test sql/test/information-schema/Tests/table_constraints.test Branch: Aug2024 Log Message: Extending integrity checks for check_constraints and table_constraints view data. diffs (275 lines): diff --git a/sql/test/information-schema/Tests/check_constraints.test b/sql/test/information-schema/Tests/check_constraints.test --- a/sql/test/information-schema/Tests/check_constraints.test +++ b/sql/test/information-schema/Tests/check_constraints.test @@ -8,6 +8,31 @@ FROM INFORMATION_SCHEMA.CHECK_CONSTRAINT WHERE CONSTRAINT_SCHEMA = '' OR CONSTRAINT_NAME = '' +query IITI rowsort +SELECT + CONSTRAINT_CATALOG, + CONSTRAINT_SCHEMA, + CONSTRAINT_NAME, + CHECK_CLAUSE, + schema_id, + table_id, + table_name, + key_id +FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS +WHERE CONSTRAINT_SCHEMA IS NULL + OR CONSTRAINT_SCHEMA = '' + OR CONSTRAINT_NAME IS NULL + OR CONSTRAINT_NAME = '' + OR CHECK_CLAUSE IS NULL + OR CHECK_CLAUSE = '' + OR schema_id IS NULL + OR table_id IS NULL + OR table_name IS NULL + OR table_name = '' + OR key_id IS NULL + + +-- entity integrity checks query ITTT rowsort SELECT COUNT(*) AS duplicates, CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS @@ -15,3 +40,72 @@ SELECT COUNT(*) AS duplicates, CONSTRAIN HAVING COUNT(*) > 1 +-- as CONSTRAINT_CATALOG is always NULL the CONSTRAINT_SCHEMA, CONSTRAINT_NAME combo should be unique also +query ITT rowsort +SELECT COUNT(*) AS duplicates, CONSTRAINT_SCHEMA, CONSTRAINT_NAME + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + GROUP BY CONSTRAINT_SCHEMA, CONSTRAINT_NAME + HAVING COUNT(*) > 1 + + +-- it should also be unique when using schema_id instead of CONSTRAINT_SCHEMA +query IIT rowsort +SELECT COUNT(*) AS duplicates, schema_id, CONSTRAINT_NAME + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + GROUP BY schema_id, CONSTRAINT_NAME + HAVING COUNT(*) > 1 + + +-- key_id alone should be unique also +query II rowsort +SELECT COUNT(*) AS duplicates, key_id + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + GROUP BY key_id + HAVING COUNT(*) > 1 + + +-- referential integrity checks +query TTT rowsort +SELECT CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + WHERE (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA) + NOT IN (SELECT CATALOG_NAME, SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA) + + +-- as CONSTRAINT_CATALOG is always NULL leave it out of the check +query TT rowsort +SELECT CONSTRAINT_SCHEMA, CONSTRAINT_NAME + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + WHERE (CONSTRAINT_SCHEMA) + NOT IN (SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA) + + +-- it should also be correct when using schema_id instead of CONSTRAINT_SCHEMA +query ITT rowsort +SELECT schema_id, CONSTRAINT_SCHEMA, CONSTRAINT_NAME + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + WHERE (schema_id) + NOT IN (SELECT schema_id FROM INFORMATION_SCHEMA.SCHEMATA) + + +-- check schema_id reference +query TTI rowsort +SELECT CONSTRAINT_SCHEMA, CONSTRAINT_NAME, schema_id + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + WHERE (schema_id) NOT IN (SELECT id FROM sys.schemas) + + +-- check table_id reference +query TTI rowsort +SELECT CONSTRAINT_SCHEMA, CONSTRAINT_NAME, table_id + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + WHERE (table_id) NOT IN (SELECT id FROM sys.tables) + + +-- check key_id reference +query TTI rowsort +SELECT CONSTRAINT_SCHEMA, CONSTRAINT_NAME, key_id + FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS + WHERE (key_id) NOT IN (SELECT id FROM sys.keys UNION ALL SELECT id FROM tmp.keys) + + diff --git a/sql/test/information-schema/Tests/table_constraints.test b/sql/test/information-schema/Tests/table_constraints.test --- a/sql/test/information-schema/Tests/table_constraints.test +++ b/sql/test/information-schema/Tests/table_constraints.test @@ -32,9 +32,24 @@ SELECT key_type, is_system FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS -WHERE CONSTRAINT_SCHEMA = '' OR CONSTRAINT_NAME = '' +WHERE CONSTRAINT_SCHEMA IS NULL + OR CONSTRAINT_SCHEMA = '' + OR CONSTRAINT_NAME IS NULL + OR CONSTRAINT_NAME = '' + OR TABLE_SCHEMA IS NULL + OR TABLE_SCHEMA = '' + OR TABLE_NAME IS NULL + OR TABLE_NAME = '' + OR CONSTRAINT_TYPE IS NULL + OR CONSTRAINT_TYPE = '' + OR schema_id IS NULL + OR table_id IS NULL + OR key_id IS NULL + OR key_type IS NULL + OR is_system IS NULL +-- entity integrity checks query ITTT rowsort SELECT COUNT(*) AS duplicates, CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS @@ -42,3 +57,137 @@ SELECT COUNT(*) AS duplicates, CONSTRAIN HAVING COUNT(*) > 1 +-- as CONSTRAINT_CATALOG is always NULL the CONSTRAINT_SCHEMA, CONSTRAINT_NAME combo should be unique als
MonetDB: Aug2024 - default TAGS option to off
Changeset: 98d8567c3987 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/98d8567c3987 Modified Files: cmake/monetdb-options.cmake Branch: Aug2024 Log Message: default TAGS option to off diffs (12 lines): diff --git a/cmake/monetdb-options.cmake b/cmake/monetdb-options.cmake --- a/cmake/monetdb-options.cmake +++ b/cmake/monetdb-options.cmake @@ -95,7 +95,7 @@ option(STRICT option(TAGS "Enable tags usage (ctags and/or cscope) )" - "${DEVELOPMENT}") + OFF) option(ASSERT "Enable asserts (default=ON for development sources, OFF for tarball installation)" ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Added cast() for the check_clause output column.
Changeset: ab0bb5129b29 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ab0bb5129b29 Modified Files: sql/backends/monet5/sql_upgrades.c sql/scripts/91_information_schema.sql sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 Branch: Aug2024 Log Message: Added cast() for the check_clause output column. diffs (87 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 @@ -7150,7 +7150,7 @@ sql_update_aug2024(Client c, mvc *sql, s " cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG,\n" " s.\"name\" AS CONSTRAINT_SCHEMA,\n" " k.\"name\" AS CONSTRAINT_NAME,\n" - " sys.check_constraint(s.\"name\", k.\"name\") AS CHECK_CLAUSE,\n" + " cast(sys.check_constraint(s.\"name\", k.\"name\") AS varchar(2048)) AS CHECK_CLAUSE,\n" " t.\"schema_id\" AS schema_id,\n" " t.\"id\" AS table_id,\n" " t.\"name\" AS table_name,\n" diff --git a/sql/scripts/91_information_schema.sql b/sql/scripts/91_information_schema.sql --- a/sql/scripts/91_information_schema.sql +++ b/sql/scripts/91_information_schema.sql @@ -197,7 +197,7 @@ CREATE VIEW INFORMATION_SCHEMA.CHECK_CON cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG, s."name" AS CONSTRAINT_SCHEMA, k."name" AS CONSTRAINT_NAME, - sys.check_constraint(s."name", k."name") AS CHECK_CLAUSE, + cast(sys.check_constraint(s."name", k."name") AS varchar(2048)) AS CHECK_CLAUSE, -- MonetDB column extensions t."schema_id" AS schema_id, t."id" AS table_id, 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 @@ -446,7 +446,7 @@ select 'null in fkeys.delete_action', de % varchar, varchar,varchar,varchar,varchar, boolean,varchar,varchar,varchar # type % 11, 18, 34, 6812, 5, 5, 8, 8, 0 # length [ "sys._tables", "information_schema", "character_sets", "create view information_schema.character_sets as select cast(null as varchar(1)) as character_set_catalog, cast(null as varchar(1)) as character_set_schema, cast('UTF-8' as varchar(16)) as character_set_name, cast('ISO/IEC 10646:2021' as varchar(20)) as character_repertoire, cast('UTF-8' as varchar(16)) as form_of_use, cast(null as varchar(1)) as default_collate_catalog, cast(null as varchar(1)) as default_collate_schema, cast(null as varchar(1)) as default_collate_name;", "VIEW", true, "COMMIT", "WRITABLE", NULL ] -[ "sys._tables", "information_schema", "check_constraints","create view information_schema.check_constraints as select cast(null as varchar(1)) as constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as constraint_name, sys.check_constraint(s.\"name\", k.\"name\") as check_clause, t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"name\" as table_name, k.\"id\" as key_id from (select sk.\"id\", sk.\"table_id\", sk.\"name\" from sys.\"keys\" sk where sk.\"type\" = 4 union all select tk.\"id\", tk.\"table_id\", tk.\"name\" from tmp.\"keys\" tk where tk.\"type\" = 4) k inner join (select st.\"id\", st.\"schema_id\", st.\"name\" from sys.\"_tables\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\" from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\", t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE", NULL] +[ "sys._tables", "information_schema", "check_constraints","create view information_schema.check_constraints as select cast(null as varchar(1)) as constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as constraint_name, cast(sys.check_constraint(s.\"name\", k.\"name\") as varchar(2048)) as check_clause, t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"name\" as table_name, k.\"id\" as key_id from (select sk.\"id\", sk.\"table_id\", sk.\"name\" from sys.\"keys\" sk where sk.\"type\" = 4 union all select tk.\"id\", tk.\"table_id\", tk.\"name\" from tmp.\"keys\" tk where tk.\"type\" = 4) k inner join (select st.\"id\", st.\"schema_id\", st.
MonetDB: Aug2024 - Approve emptydb check outputs
Changeset: 3a023e63648c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3a023e63648c Modified Files: sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 Branch: Aug2024 Log Message: Approve emptydb check outputs diffs (264 lines): 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 @@ -446,14 +446,14 @@ select 'null in fkeys.delete_action', de % varchar, varchar,varchar,varchar,varchar, boolean,varchar,varchar,varchar # type % 11, 18, 34, 6812, 5, 5, 8, 8, 0 # length [ "sys._tables", "information_schema", "character_sets", "create view information_schema.character_sets as select cast(null as varchar(1)) as character_set_catalog, cast(null as varchar(1)) as character_set_schema, cast('UTF-8' as varchar(16)) as character_set_name, cast('ISO/IEC 10646:2021' as varchar(20)) as character_repertoire, cast('UTF-8' as varchar(16)) as form_of_use, cast(null as varchar(1)) as default_collate_catalog, cast(null as varchar(1)) as default_collate_schema, cast(null as varchar(1)) as default_collate_name;", "VIEW", true, "COMMIT", "WRITABLE", NULL ] -[ "sys._tables", "information_schema", "check_constraints","create view information_schema.check_constraints as select cast(null as varchar(1)) as constraint_catalog, cast(null as varchar(1024)) as constraint_schema, cast(null as varchar(1024)) as constraint_name, cast(null as varchar(1024)) as check_clause where 1=0;", "VIEW", true, "COMMIT", "WRITABLE", NULL ] +[ "sys._tables", "information_schema", "check_constraints","create view information_schema.check_constraints as select cast(null as varchar(1)) as constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as constraint_name, sys.check_constraint(s.\"name\", k.\"name\") as check_clause, t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"name\" as table_name, k.\"id\" as key_id from (select sk.\"id\", sk.\"table_id\", sk.\"name\" from sys.\"keys\" sk where sk.\"type\" = 4 union all select tk.\"id\", tk.\"table_id\", tk.\"name\" from tmp.\"keys\" tk where tk.\"type\" = 4) k inner join (select st.\"id\", st.\"schema_id\", st.\"name\" from sys.\"_tables\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\" from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\", t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE", NULL] [ "sys._tables", "information_schema", "columns", "create view information_schema.columns as select cast(null as varchar(1)) as table_catalog, s.\"name\" as table_schema, t.\"name\" as table_name, c.\"name\" as column_name, cast(1 + c.\"number\" as int) as ordinal_position, c.\"default\" as column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3)) as is_nullable, cast(sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\", c.\"type_scale\", true, true) as varchar(1024)) as data_type, cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml') and c.\"type_digits\" > 0, c.\"type_digits\", null) as int) as character_maximum_length, cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml') and c.\"type_digits\" > 0, 4 * cast(c.\"type_digits\" as bigint), null) as bigint) as character_octet_length, cast(sys.ifthenelse(c.\"type\" in ('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'), c.\" type_digits\", null) as int) as numeric_precision, cast(sys.ifthenelse(c.\"type\" in ('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'), 2, sys.ifthenelse(c.\"type\" in ('decimal','numeric'), 10, null)) as int) as numeric_precision_radix, cast(sys.ifthenelse(c.\"type\" in ('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'), c.\"type_scale\", null) as int) as numeric_scale, cast(sys.ifthenelse(c.\"type\" in ('date','timestamp','timestamptz','time','timetz'), sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\" -1, 0), null) as int) as datetime_precision, cast(sys.ifthenelse(c.\"type\" in ('day_interval','month_interval','sec_interval'), sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\", c.\"type_scale\", true, true), null) as varchar(40)) as interval_type, cast(case c.\"type\" when 'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then (sys.ifthenelse(c.\"type_digits\" in (7, 10, 12, 13), sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\", 3), 0)) else null end as int) as interval_precision, cast(null as varchar(1)) as ch
MonetDB: Aug2024 - merged
Changeset: 6883b823359a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6883b823359a Branch: Aug2024 Log Message: merged diffs (truncated from 486 to 300 lines): diff --git a/clients/odbc/winsetup/resource.h b/clients/odbc/winsetup/resource.h --- a/clients/odbc/winsetup/resource.h +++ b/clients/odbc/winsetup/resource.h @@ -24,21 +24,21 @@ #define IDC_EDIT_PORT 2006 #define IDC_EDIT_DATABASE 2007 -// Advanced settings (new from Jun2024) -#define IDC_EDIT_SCHEMA 2011 -#define IDC_EDIT_LOGINTIMEOUT 2012 -#define IDC_EDIT_REPLYTIMEOUT 2013 -#define IDC_EDIT_REPLYSIZE 2014 -#define IDC_EDIT_AUTOCOMMIT 2015 -#define IDC_EDIT_TIMEZONE 2016 -#define IDC_EDIT_LOGFILE2017 +// Secure connections using TLS +#define IDC_EDIT_USETLS 2011 +#define IDC_EDIT_SERVERCERT 2012 +#define IDC_EDIT_SERVERCERTHASH 2013 +#define IDC_EDIT_CLIENTKEY 2014 +#define IDC_EDIT_CLIENTCERT 2015 -// Secure connections using TLS -#define IDC_EDIT_USETLS 2021 -#define IDC_EDIT_SERVERCERT 2022 -#define IDC_EDIT_SERVERCERTHASH 2023 -#define IDC_EDIT_CLIENTKEY 2024 -#define IDC_EDIT_CLIENTCERT 2025 +// Advanced settings +#define IDC_EDIT_SCHEMA 2021 +#define IDC_EDIT_LOGINTIMEOUT 2022 +#define IDC_EDIT_REPLYTIMEOUT 2023 +#define IDC_EDIT_REPLYSIZE 2024 +#define IDC_EDIT_AUTOCOMMIT 2025 +#define IDC_EDIT_TIMEZONE 2026 +#define IDC_EDIT_LOGFILE2027 #define IDC_BUTTON_TEST 2031 #define IDC_BUTTON_HELP 2032 diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c --- a/clients/odbc/winsetup/setup.c +++ b/clients/odbc/winsetup/setup.c @@ -154,6 +154,13 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_HOST, datap->host ? datap->host : ""); SetDlgItemText(hwndDlg, IDC_EDIT_PORT, datap->port ? datap->port : ""); SetDlgItemText(hwndDlg, IDC_EDIT_DATABASE, datap->database ? datap->database : ""); + // Secure connections using TLS + SetDlgItemText(hwndDlg, IDC_EDIT_USETLS, datap->use_tls ? datap->use_tls : "off"); + SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, datap->servercert ? datap->servercert : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERTHASH, datap->servercerthash ? datap->servercerthash : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTKEY, datap->clientkey ? datap->clientkey : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTCERT, datap->clientcert ? datap->clientcert : ""); + // Advanced settings SetDlgItemText(hwndDlg, IDC_EDIT_SCHEMA, datap->schema ? datap->schema : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGINTIMEOUT, datap->logintimeout ? datap->logintimeout : ""); SetDlgItemText(hwndDlg, IDC_EDIT_REPLYTIMEOUT, datap->replytimeout ? datap->replytimeout : ""); @@ -161,11 +168,6 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_AUTOCOMMIT, datap->autocommit ? datap->autocommit : "on"); SetDlgItemText(hwndDlg, IDC_EDIT_TIMEZONE, datap->timezone ? datap->timezone : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGFILE, datap->logfile ? datap->logfile : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_USETLS, datap->use_tls ? datap->use_tls : "off"); - SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, datap->servercert ? datap->servercert : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERTHASH, datap->servercerthash ? datap->servercerthash : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTKEY, datap->clientkey ? datap->clientkey : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTCERT, datap->clientcert ? datap->clientcert : ""); if (datap->request == ODBC_ADD_DSN && datap->dsn && *datap->dsn) EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_DSN), FALSE); return TRUE; @@ -220,6 +222,28 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR if (datap->database) free(datap->database); datap->database = strdup(buf); + // Secure connections using TLS + GetDlgItemText(hwndDlg, IDC_EDIT_USETLS, buf, sizeof(buf)); + if (datap->use_tls) + free(datap->use_tls); + datap->use_tls = strdup(buf); + GetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, buf, sizeof(buf)); + if (datap->servercert) + free(datap->serve
MonetDB: Aug2024 - instead of using -DSTRICT=On use -DTAGS=ON fo...
Changeset: 6de6b89f6ae1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6de6b89f6ae1 Modified Files: cmake/monetdb-findpackages.cmake cmake/monetdb-options.cmake Branch: Aug2024 Log Message: instead of using -DSTRICT=On use -DTAGS=ON for enabling ctags/cscope diffs (33 lines): diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake --- a/cmake/monetdb-findpackages.cmake +++ b/cmake/monetdb-findpackages.cmake @@ -138,7 +138,7 @@ find_package(Semodule) find_package(Awk) find_package(Candle) -if(STRICT) +if(TAGS) find_program(CTAGS_PATH ctags) if(CTAGS_PATH) message(STATUS "Found ctags: ${CTAGS_PATH}") @@ -147,5 +147,5 @@ if(STRICT) if(CSCOPE_PATH) message(STATUS "Found cscope: ${CSCOPE_PATH}") endif(CSCOPE_PATH) -endif(STRICT) +endif(TAGS) diff --git a/cmake/monetdb-options.cmake b/cmake/monetdb-options.cmake --- a/cmake/monetdb-options.cmake +++ b/cmake/monetdb-options.cmake @@ -93,6 +93,10 @@ option(STRICT "Enable strict compiler flags (default=ON for development sources, OFF for tarball installation)" "${DEVELOPMENT}") +option(TAGS + "Enable tags usage (ctags and/or cscope) )" + "${DEVELOPMENT}") + option(ASSERT "Enable asserts (default=ON for development sources, OFF for tarball installation)" "${DEVELOPMENT}") ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - In the ODBC setup dialog swap presentation of...
Changeset: 6b358bb8caae for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6b358bb8caae Modified Files: clients/odbc/winsetup/resource.h clients/odbc/winsetup/setup.c clients/odbc/winsetup/setup.rc Branch: Aug2024 Log Message: In the ODBC setup dialog swap presentation of TLS parameters and Advanced settings group box diffs (truncated from 330 to 300 lines): diff --git a/clients/odbc/winsetup/resource.h b/clients/odbc/winsetup/resource.h --- a/clients/odbc/winsetup/resource.h +++ b/clients/odbc/winsetup/resource.h @@ -24,21 +24,21 @@ #define IDC_EDIT_PORT 2006 #define IDC_EDIT_DATABASE 2007 -// Advanced settings (new from Jun2024) -#define IDC_EDIT_SCHEMA 2011 -#define IDC_EDIT_LOGINTIMEOUT 2012 -#define IDC_EDIT_REPLYTIMEOUT 2013 -#define IDC_EDIT_REPLYSIZE 2014 -#define IDC_EDIT_AUTOCOMMIT 2015 -#define IDC_EDIT_TIMEZONE 2016 -#define IDC_EDIT_LOGFILE2017 +// Secure connections using TLS +#define IDC_EDIT_USETLS 2011 +#define IDC_EDIT_SERVERCERT 2012 +#define IDC_EDIT_SERVERCERTHASH 2013 +#define IDC_EDIT_CLIENTKEY 2014 +#define IDC_EDIT_CLIENTCERT 2015 -// Secure connections using TLS -#define IDC_EDIT_USETLS 2021 -#define IDC_EDIT_SERVERCERT 2022 -#define IDC_EDIT_SERVERCERTHASH 2023 -#define IDC_EDIT_CLIENTKEY 2024 -#define IDC_EDIT_CLIENTCERT 2025 +// Advanced settings +#define IDC_EDIT_SCHEMA 2021 +#define IDC_EDIT_LOGINTIMEOUT 2022 +#define IDC_EDIT_REPLYTIMEOUT 2023 +#define IDC_EDIT_REPLYSIZE 2024 +#define IDC_EDIT_AUTOCOMMIT 2025 +#define IDC_EDIT_TIMEZONE 2026 +#define IDC_EDIT_LOGFILE2027 #define IDC_BUTTON_TEST 2031 #define IDC_BUTTON_HELP 2032 diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c --- a/clients/odbc/winsetup/setup.c +++ b/clients/odbc/winsetup/setup.c @@ -154,6 +154,13 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_HOST, datap->host ? datap->host : ""); SetDlgItemText(hwndDlg, IDC_EDIT_PORT, datap->port ? datap->port : ""); SetDlgItemText(hwndDlg, IDC_EDIT_DATABASE, datap->database ? datap->database : ""); + // Secure connections using TLS + SetDlgItemText(hwndDlg, IDC_EDIT_USETLS, datap->use_tls ? datap->use_tls : "off"); + SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, datap->servercert ? datap->servercert : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERTHASH, datap->servercerthash ? datap->servercerthash : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTKEY, datap->clientkey ? datap->clientkey : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTCERT, datap->clientcert ? datap->clientcert : ""); + // Advanced settings SetDlgItemText(hwndDlg, IDC_EDIT_SCHEMA, datap->schema ? datap->schema : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGINTIMEOUT, datap->logintimeout ? datap->logintimeout : ""); SetDlgItemText(hwndDlg, IDC_EDIT_REPLYTIMEOUT, datap->replytimeout ? datap->replytimeout : ""); @@ -161,11 +168,6 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_AUTOCOMMIT, datap->autocommit ? datap->autocommit : "on"); SetDlgItemText(hwndDlg, IDC_EDIT_TIMEZONE, datap->timezone ? datap->timezone : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGFILE, datap->logfile ? datap->logfile : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_USETLS, datap->use_tls ? datap->use_tls : "off"); - SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERT, datap->servercert ? datap->servercert : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_SERVERCERTHASH, datap->servercerthash ? datap->servercerthash : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTKEY, datap->clientkey ? datap->clientkey : ""); - SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTCERT, datap->clientcert ? datap->clientcert : ""); if (datap->request == ODBC_ADD_DSN && datap->dsn && *datap->dsn) EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_DSN), FALSE); return TRUE; @@ -220,6 +222,28 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR if (datap->database) free(datap->database); datap->database = strdup(buf); + // Secure connections using TLS + GetDlgItemText(hwndDlg, IDC_EDIT_USETLS, buf, sizeof(buf)); + if (datap->use_tls) + free(datap->use_tls); +
MonetDB: Aug2024 - Extending upgrade with code to redefine views...
Changeset: a83e42d2b93b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a83e42d2b93b Modified Files: sql/backends/monet5/sql_upgrades.c Branch: Aug2024 Log Message: Extending upgrade with code to redefine views: information_schema.check_constraints and information_schema.table_constraints diffs (63 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 @@ -7142,6 +7142,59 @@ sql_update_aug2024(Client c, mvc *sql, s printf("Running database upgrade commands:\n%s\n", query5); fflush(stdout); err = SQLstatementIntern(c, query5, "update", true, false, NULL); + if (err == MAL_SUCCEED) { + const char query6[] = + "DROP VIEW information_schema.check_constraints CASCADE;\n" + "DROP VIEW information_schema.table_constraints CASCADE;\n" + "CREATE VIEW INFORMATION_SCHEMA.CHECK_CONSTRAINTS AS SELECT\n" + " cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG,\n" + " s.\"name\" AS CONSTRAINT_SCHEMA,\n" + " k.\"name\" AS CONSTRAINT_NAME,\n" + " sys.check_constraint(s.\"name\", k.\"name\") AS CHECK_CLAUSE,\n" + " t.\"schema_id\" AS schema_id,\n" + " t.\"id\" AS table_id,\n" + " t.\"name\" AS table_name,\n" + " k.\"id\" AS key_id\n" + " FROM (SELECT sk.\"id\", sk.\"table_id\", sk.\"name\" FROM sys.\"keys\" sk WHERE sk.\"type\" = 4 UNION ALL SELECT tk.\"id\", tk.\"table_id\", tk.\"name\" FROM tmp.\"keys\" tk WHERE tk.\"type\" = 4) k\n" + " INNER JOIN (SELECT st.\"id\", st.\"schema_id\", st.\"name\" FROM sys.\"_tables\" st UNION ALL SELECT tt.\"id\", tt.\"schema_id\", tt.\"name\" FROM tmp.\"_tables\" tt) t ON k.\"table_id\" = t.\"id\"\n" + " INNER JOIN sys.\"schemas\" s ON t.\"schema_id\" = s.\"id\"\n" + " ORDER BY s.\"name\", t.\"name\", k.\"name\";\n" + "GRANT SELECT ON TABLE INFORMATION_SCHEMA.CHECK_CONSTRAINTS TO PUBLIC WITH GRANT OPTION;\n" + + "CREATE VIEW INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS SELECT\n" + " cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG,\n" + " s.\"name\" AS CONSTRAINT_SCHEMA,\n" + " k.\"name\" AS CONSTRAINT_NAME,\n" + " cast(NULL AS varchar(1)) AS TABLE_CATALOG,\n" + " s.\"name\" AS TABLE_SCHEMA,\n" + " t.\"name\" AS TABLE_NAME,\n" + " cast(CASE k.\"type\" WHEN 0 THEN 'PRIMARY KEY' WHEN 1 THEN 'UNIQUE' WHEN 2 THEN 'FOREIGN KEY' WHEN 3 THEN 'UNIQUE NULLS NOT DISTINCT' WHEN 4 THEN 'CHECK' ELSE NULL END AS varchar(26)) AS CONSTRAINT_TYPE,\n" + " cast('NO' AS varchar(3)) AS IS_DEFERRABLE,\n" + " cast('NO' AS varchar(3)) AS INITIALLY_DEFERRED,\n" + " cast('YES' AS varchar(3)) AS ENFORCED,\n" + " t.\"schema_id\" AS schema_id,\n" + " t.\"id\" A
MonetDB: Aug2024 - Approve dependencies output (for information_...
Changeset: 685d2b11055f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/685d2b11055f Modified Files: sql/test/Dependencies/Tests/dependency_owner_schema_3.test Branch: Aug2024 Log Message: Approve dependencies output (for information_schema.check_constraints) diffs (42 lines): diff --git a/sql/test/Dependencies/Tests/dependency_owner_schema_3.test b/sql/test/Dependencies/Tests/dependency_owner_schema_3.test --- a/sql/test/Dependencies/Tests/dependency_owner_schema_3.test +++ b/sql/test/Dependencies/Tests/dependency_owner_schema_3.test @@ -60,6 +60,9 @@ DEP_VIEW ids DEP_VIEW _tables +check_constraints +DEP_VIEW +_tables describe_comments DEP_VIEW _tables @@ -429,6 +432,9 @@ idxs ids DEP_VIEW keys +check_constraints +DEP_VIEW +keys dependency_columns_on_indexes DEP_VIEW keys @@ -519,6 +525,9 @@ roles describe_accessible_tables DEP_VIEW schemas +check_constraints +DEP_VIEW +schemas columns DEP_VIEW schemas @@ -877,7 +886,7 @@ DEP_FUNC query TTT rowsort SELECT distinct c.name, v.name, 'DEP_VIEW' from sys.columns as c, sys.tables as v, sys.dependencies as dep where c.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type in (1, 11, 21, 31) order by c.name, v.name -1821 values hashing to 4841f015a85929eed99bb2099a4e17b8 +1845 values hashing to f9a2dad1816ec201e57ce394ef9b0abd query TTT rowsort SELECT c.name, k.name, 'DEP_KEY' from sys.columns as c, sys.objects as kc, sys.keys as k where kc."name" = c.name AND kc.id = k.id AND k.table_id = c.table_id AND k.rkey = -1 order by c.name, k.name ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Remove obsolete file
Changeset: d4e7d157554c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d4e7d157554c Removed Files: sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test Branch: Aug2024 Log Message: Remove obsolete file diffs (12 lines): diff --git a/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test b/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test deleted file mode 100644 --- a/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test +++ /dev/null @@ -1,7 +0,0 @@ -statement ok -CREATE TABLE t0(c1 VARCHAR) - -query T nosort -SELECT * FROM t0 WHERE NOT NULL ORDER BY JAROWINKLER('a', NULL) DESC - - ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Adapt information_schema views to return chec...
Changeset: 0aea6099054b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0aea6099054b Modified Files: sql/scripts/91_information_schema.sql Branch: Aug2024 Log Message: Adapt information_schema views to return check constraint info. TODO: adapt upgrade code. diffs (39 lines): diff --git a/sql/scripts/91_information_schema.sql b/sql/scripts/91_information_schema.sql --- a/sql/scripts/91_information_schema.sql +++ b/sql/scripts/91_information_schema.sql @@ -192,13 +192,21 @@ GRANT SELECT ON TABLE INFORMATION_SCHEMA -- The view CHECK_CONSTRAINTS contains all check constraints defined on a table, -- that are owned by a currently enabled role. --- This view is currently empty as MonetDB does not support CHECK constraints yet. +-- TODO: that the current user owns or has some privilege other than SELECT on. CREATE VIEW INFORMATION_SCHEMA.CHECK_CONSTRAINTS AS SELECT cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG, - cast(NULL AS varchar(1024)) AS CONSTRAINT_SCHEMA, - cast(NULL AS varchar(1024)) AS CONSTRAINT_NAME, - cast(NULL AS varchar(1024)) AS CHECK_CLAUSE - WHERE 1=0; + s."name" AS CONSTRAINT_SCHEMA, + k."name" AS CONSTRAINT_NAME, + sys.check_constraint(s."name", k."name") AS CHECK_CLAUSE, + -- MonetDB column extensions + t."schema_id" AS schema_id, + t."id" AS table_id, + t."name" AS table_name, + k."id" AS key_id + FROM (SELECT sk."id", sk."table_id", sk."name" FROM sys."keys" sk WHERE sk."type" = 4 UNION ALL SELECT tk."id", tk."table_id", tk."name" FROM tmp."keys" tk WHERE tk."type" = 4) k + INNER JOIN (SELECT st."id", st."schema_id", st."name" FROM sys."_tables" st UNION ALL SELECT tt."id", tt."schema_id", tt."name" FROM tmp."_tables" tt) t ON k."table_id" = t."id" + INNER JOIN sys."schemas" s ON t."schema_id" = s."id" + ORDER BY s."name", t."name", k."name"; GRANT SELECT ON TABLE INFORMATION_SCHEMA.CHECK_CONSTRAINTS TO PUBLIC WITH GRANT OPTION; @@ -211,7 +219,7 @@ CREATE VIEW INFORMATION_SCHEMA.TABLE_CON cast(NULL AS varchar(1)) AS TABLE_CATALOG, s."name" AS TABLE_SCHEMA, t."name" AS TABLE_NAME, - cast(CASE k."type" WHEN 0 THEN 'PRIMARY KEY' WHEN 1 THEN 'UNIQUE' WHEN 2 THEN 'FOREIGN KEY' ELSE NULL END AS varchar(16)) AS CONSTRAINT_TYPE, + cast(CASE k."type" WHEN 0 THEN 'PRIMARY KEY' WHEN 1 THEN 'UNIQUE' WHEN 2 THEN 'FOREIGN KEY' WHEN 3 THEN 'UNIQUE NULLS NOT DISTINCT' WHEN 4 THEN 'CHECK' ELSE NULL END AS varchar(26)) AS CONSTRAINT_TYPE, cast('NO' AS varchar(3)) AS IS_DEFERRABLE, cast('NO' AS varchar(3)) AS INITIALLY_DEFERRED, cast('YES' AS varchar(3)) AS ENFORCED, ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - add ctags/cscope rules (enabled if available ...
Changeset: 8b0240ac7b48 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8b0240ac7b48 Modified Files: .hgignore CMakeLists.txt cmake/monetdb-custom-targets.cmake cmake/monetdb-findpackages.cmake Branch: Aug2024 Log Message: add ctags/cscope rules (enabled if available and if -DSTRICT=ON) diffs (74 lines): diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -44,6 +44,7 @@ GPATH GRTAGS TAGS tags +cscope.* *.pyo *.rej *.orig diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,8 +118,14 @@ if(WIN32) ${CMAKE_CURRENT_BINARY_DIR}/unistd.h) endif() -add_library(monetdb_config_header - INTERFACE) +add_library(monetdb_config_header INTERFACE) + +if (CTAGS_PATH) + add_dependencies(monetdb_config_header tags) +endif() +if (CSCOPE_PATH) + add_dependencies(monetdb_config_header cscope) +endif() target_include_directories(monetdb_config_header INTERFACE diff --git a/cmake/monetdb-custom-targets.cmake b/cmake/monetdb-custom-targets.cmake --- a/cmake/monetdb-custom-targets.cmake +++ b/cmake/monetdb-custom-targets.cmake @@ -97,3 +97,20 @@ else() COMMAND ${CMAKE_COMMAND} -E echo 'Target not available because \"candle\" was not found.') endif() + +if(CTAGS_PATH) +add_custom_target(tags + COMMAND ${CTAGS_PATH} -R --kinds-C=+pLl --fields=+iaS --exclude=*.js +${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} +COMMAND ln -sf ${CMAKE_CURRENT_BINARY_DIR}/tags ${CMAKE_CURRENT_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +endif() + +if(CSCOPE_PATH) +add_custom_target(cscope + COMMAND ${CSCOPE_PATH} -bcqR -s${CMAKE_CURRENT_SOURCE_DIR} +COMMAND ln -sf ${CMAKE_CURRENT_BINARY_DIR}/cscope.out ${CMAKE_CURRENT_SOURCE_DIR}/ +COMMAND ln -sf ${CMAKE_CURRENT_BINARY_DIR}/cscope.in.out ${CMAKE_CURRENT_SOURCE_DIR}/ +COMMAND ln -sf ${CMAKE_CURRENT_BINARY_DIR}/cscope.po.out ${CMAKE_CURRENT_SOURCE_DIR}/ + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +endif() diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake --- a/cmake/monetdb-findpackages.cmake +++ b/cmake/monetdb-findpackages.cmake @@ -137,3 +137,15 @@ find_package(Reprepro) find_package(Semodule) find_package(Awk) find_package(Candle) + +if(STRICT) + find_program(CTAGS_PATH ctags) + if(CTAGS_PATH) +message(STATUS "Found ctags: ${CTAGS_PATH}") + endif(CTAGS_PATH) + find_program(CSCOPE_PATH cscope) + if(CSCOPE_PATH) +message(STATUS "Found cscope: ${CSCOPE_PATH}") + endif(CSCOPE_PATH) +endif(STRICT) + ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Adding tests for check contraints (for old is...
Changeset: ac51ad5eca08 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ac51ad5eca08 Added Files: sql/test/BugConstraints/Tests/3335_check_no_error.test sql/test/BugConstraints/Tests/3568_check_not_enforced.test sql/test/BugConstraints/Tests/check_constraints.test Modified Files: sql/test/BugConstraints/Tests/All Branch: Aug2024 Log Message: Adding tests for check contraints (for old issues 3335 and 3568) diffs (165 lines): diff --git a/sql/test/BugConstraints/Tests/3335_check_no_error.test b/sql/test/BugConstraints/Tests/3335_check_no_error.test new file mode 100644 --- /dev/null +++ b/sql/test/BugConstraints/Tests/3335_check_no_error.test @@ -0,0 +1,35 @@ +statement ok +create table ary(x integer check(x >0 and x <3)) + +statement ok +insert into ary values(1) + +statement error UPDATE: CHECK constraint violated: ary_x_check +insert into ary values(0) + +statement ok +insert into ary values(2) + +statement error UPDATE: CHECK constraint violated: ary_x_check +insert into ary values(-1) + +statement error UPDATE: CHECK constraint violated: ary_x_check +insert into ary values(3) + +statement error UPDATE: CHECK constraint violated: ary_x_check +update ary set x = x+1 + +statement ok +delete from ary where x = 2 + +statement ok +update ary set x = x+1 + +query I rowsort +select * from ary + +2 + +statement ok +drop table ary + diff --git a/sql/test/BugConstraints/Tests/3568_check_not_enforced.test b/sql/test/BugConstraints/Tests/3568_check_not_enforced.test new file mode 100644 --- /dev/null +++ b/sql/test/BugConstraints/Tests/3568_check_not_enforced.test @@ -0,0 +1,52 @@ +statement ok +CREATE TABLE TBLCHECK(nr int CHECK (nr > 10)) + +statement ok +INSERT INTO TBLCHECK VALUES (11) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (10) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (09) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (01) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (00) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (-01) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (-+02) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (+-+03) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (-+-04) + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +INSERT INTO TBLCHECK VALUES (+-+-05) + +query I rowsort +SELECT * FROM TBLCHECK + +11 + +statement error 40002!UPDATE: CHECK constraint violated: tblcheck_nr_check +UPDATE TBLCHECK SET nr = nr -10 + +statement ok +UPDATE TBLCHECK SET nr = nr +10 + +query I rowsort +SELECT * FROM TBLCHECK + +21 + +statement ok +DROP TABLE TBLCHECK + diff --git a/sql/test/BugConstraints/Tests/All b/sql/test/BugConstraints/Tests/All --- a/sql/test/BugConstraints/Tests/All +++ b/sql/test/BugConstraints/Tests/All @@ -3,3 +3,6 @@ delete_primarykey_1643845 drop_column_1643542 update_primarykey_1643375 check_constraint.SF-1714829 +3568_check_not_enforced +3335_check_no_error +check_constraints diff --git a/sql/test/BugConstraints/Tests/check_constraints.test b/sql/test/BugConstraints/Tests/check_constraints.test new file mode 100644 --- /dev/null +++ b/sql/test/BugConstraints/Tests/check_constraints.test @@ -0,0 +1,53 @@ +statement ok +create table kw(x integer primary key check(x >= 1), nm varchar(30) check (nm IS NOT NULL AND length(nm) >= 0), constraint kwname_upper check (nm = upper(nm)), constraint kwname_len_1 check (length(nm) > 0) ) + +statement ok +insert into kw values(1, 'FIRST') + +statement error UPDATE: CHECK constraint violated: kw_x_check +insert into kw values(0, 'FIRST') + +statement eror UPDATE: CHECK constraint violated: kwname_upper +insert into kw values(2, 'Second') + +statement ok +insert into kw values(3, 'FREE') + +statement eror UPDATE: CHECK constraint violated: kwname_len_1 +insert into kw values(4, '') + +statement eror UPDATE: CHECK constraint violated: kw_nm_check +insert into kw values(5, NULL) + +query IT rowsort +select * from kw + +1 +FIRST +3 +FREE + +statement ok +alter table kw drop constraint kw_x_check + +statement ok +alter table kw drop constraint kw_nm_check + +statement ok +alter table kw drop constraint kwname_upper + +statement ok +alter table kw drop constraint kwname_len_1 + +statement ok +insert into kw values(2, 'Second') + +statement ok +insert into kw values(4, '') + +statement ok +insert into kw values(5, NULL) + +statement ok +drop table kw + ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an ema
MonetDB: default - add AND OR infixes for dump
Changeset: 7c980a7d1c64 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7c980a7d1c64 Modified Files: sql/server/rel_dump.c Branch: default Log Message: add AND OR infixes for dump diffs (15 lines): diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c --- a/sql/server/rel_dump.c +++ b/sql/server/rel_dump.c @@ -2521,6 +2521,11 @@ is_infix(sql_func *f) return true; if (f->base.name[0] == '|' && f->base.name[1] == '|') return true; + if (f->base.name[0] == 'o' && f->base.name[1] == 'r') + return true; + } else if (strlen(f->base.name) == 3) { + if (f->base.name[0] == 'a' && f->base.name[1] == 'n' && f->base.name[2] == 'd') + return true; } return false; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Correcting name of test script
Changeset: 5366083b2781 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5366083b2781 Added Files: sql/test/BugTracker-2024/Tests/7528-jarowinkler-null.test Branch: Aug2024 Log Message: Correcting name of test script diffs (3 lines): diff --git a/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test b/sql/test/BugTracker-2024/Tests/7528-jarowinkler-null.test copy from sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test copy to sql/test/BugTracker-2024/Tests/7528-jarowinkler-null.test ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - return null if check constraint not found
Changeset: dcc52208263a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/dcc52208263a Modified Files: sql/backends/monet5/sql.c Branch: default Log Message: return null if check constraint not found diffs (23 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -5260,13 +5260,17 @@ SQLcheck(Client cntxt, MalBlkPtr mb, Mal sql_schema *s = mvc_bind_schema(m, sname); if (s) { sql_key *k = mvc_bind_key(m, s, cname); - if (k->check) { + if (k && k->check) { int pos = 0; sql_rel *rel = rel_basetable(m, k->t, k->t->base.name); sql_exp *exp = exp_read(m, rel, NULL, NULL, sa_strdup(m->sa, k->check), &pos, 0); - *r = GDKstrdup(exp2sql(m, exp)); + if (!(*r = GDKstrdup(exp2sql(m, exp + throw(SQL, "SQLcheck", SQLSTATE(HY013) MAL_MALLOC_FAIL); + return MAL_SUCCEED; } } + if (!(*r = GDKstrdup(str_nil))) + throw(SQL, "SQLcheck", SQLSTATE(HY013) MAL_MALLOC_FAIL); return MAL_SUCCEED; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org