MonetDB: check - fix memory leak
Changeset: 5f415056d946 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5f415056d946 Modified Files: sql/storage/store.c Branch: check Log Message: fix memory leak diffs (11 lines): diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -160,6 +160,7 @@ key_destroy(sqlstore *store, sql_key *k) if (ATOMIC_DEC(&k->base.refcnt) > 0) return; list_destroy2(k->columns, store); + _DELETE(k->check); k->columns = NULL; _DELETE(k->base.name); _DELETE(k); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: check - approve test output
Changeset: 10ea7d33c679 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/10ea7d33c679 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: check Log Message: approve test output diffs (33 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 @@ -1359,6 +1359,7 @@ select 'null in fkeys.delete_action', de [ "sys._columns", "sys", "keys", "name", "varchar", 1024, 0, NULL, true, 3, NULL, NULL] [ "sys._columns", "sys", "keys", "rkey", "int", 31, 0, NULL, true, 4, NULL, NULL] [ "sys._columns", "sys", "keys", "action", "int", 31, 0, NULL, true, 5, NULL, NULL] +[ "sys._columns", "sys", "keys", "check","varchar", 2048, 0, NULL, true, 6, NULL, NULL] [ "sys._columns", "sys", "keywords", "keyword", "varchar", 40, 0, NULL, false, 0, NULL, NULL] [ "sys._columns", "sys", "malfunctions", "module", "varchar", 0, 0, NULL, true, 0, NULL, NULL] [ "sys._columns", "sys", "malfunctions", "function", "varchar", 0, 0, NULL, true, 1, NULL, 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 @@ -1359,6 +1359,7 @@ select 'null in fkeys.delete_action', de [ "sys._columns", "sys", "keys", "name", "varchar", 1024, 0, NULL, true, 3, NULL, NULL] [ "sys._columns", "sys", "keys", "rkey", "int", 31, 0, NULL, true, 4, NULL, NULL] [ "sys._columns", "sys", "keys", "action", "int", 31, 0, NULL, true, 5, NULL, NULL] +[ "sys._columns", "sys", "keys", "check","varchar", 2048, 0, NULL, true, 6, NULL, NULL] [ "sys._columns", "sys", "keywords", "keyword", "varchar", 40, 0, NULL, false, 0, NULL, NULL] [ "sys._columns", "sys", "malfunctions", "module", "varchar", 0, 0, NULL, true, 0, NULL, NULL] [ "sys._columns", "sys", "malfunctions", "function", "varchar", 0, 0, NULL, true, 1, NULL, 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 @@ -1359,6 +1359,7 @@ select 'null in fkeys.delete_action', de [ "sys._columns", "sys", "keys", "name", "varchar", 1024, 0, NULL, true, 3, NULL, NULL] [ "sys._columns", "sys", "keys", "rkey", "int", 31, 0, NULL, true, 4, NULL, NULL] [ "sys._columns", "sys", "keys", "action", "int", 31, 0, NULL, true, 5, NULL, NULL] +[ "sys._columns", "sys", "keys", "check","varchar", 2048, 0, NULL, true, 6, NULL, NULL] [ "sys._columns", "sys", "keywords", "keyword", "varchar", 40, 0, NULL, false, 0, NULL, NULL] [ "sys._columns", "sys", "malfunctions", "module", "varchar", 0, 0, NULL, true, 0, NULL, NULL] [ "sys._columns", "sys", "malfunctions", "function", "varchar", 0, 0, NULL, true, 1, NULL, NULL] ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: check - missing internal store administration for check...
Changeset: d7f5e38b6ed7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d7f5e38b6ed7 Modified Files: sql/storage/bat/bat_logger.c Branch: check Log Message: missing internal store administration for check column diffs (31 lines): diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c --- a/sql/storage/bat/bat_logger.c +++ b/sql/storage/bat/bat_logger.c @@ -902,6 +902,13 @@ const struct table { }, { .schema = "sys", + .table = "keys", + .column = "check", + .fullname = "sys_keys_check", + .newid = 2165, + }, + { + .schema = "sys", .table = "idxs", .fullname = "D_sys_idxs", .newid = 2094, @@ -1240,6 +1247,13 @@ const struct table { }, { .schema = "tmp", + .table = "keys", + .column = "check", + .fullname = "tmp_keys_action", + .newid = 2166, + }, + { + .schema = "tmp", .table = "idxs", .fullname = "D_tmp_idxs", .newid = 2142, ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: check - missing/wrong column record
Changeset: 3e1e1f22c6b4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3e1e1f22c6b4 Modified Files: sql/storage/bat/bat_logger.c Branch: check Log Message: missing/wrong column record diffs (37 lines): diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c --- a/sql/storage/bat/bat_logger.c +++ b/sql/storage/bat/bat_logger.c @@ -3294,8 +3294,8 @@ bl_postversion(void *Store, void *Lg) 2079, "varchar", /* sys._columns.type */ 2080, &(int) {2048}, /* sys._columns.type_digits */ 2081, &(int) {0},/* sys._columns.type_scale */ - /* 2016 is sys.functions */ - 2082, &(int) {2016}, /* sys._columns.table_id */ + /* 2087 is sys.keys */ + 2082, &(int) {2087}, /* sys._columns.table_id */ 2083, str_nil, /* sys._columns.default */ 2084, &(bit) {TRUE}, /* sys._columns.null */ 2085, &(int) {6},/* sys._columns.number */ @@ -3303,6 +3303,22 @@ bl_postversion(void *Store, void *Lg) 0) != GDK_SUCCEED) return GDK_FAIL; tabins_first = false; + if (tabins(lg, old_lg, tabins_first, -1, 0, + 2076, &(msk) {false}, /* sys._columns */ + /* 2166 is tmp.keys.check */ + 2077, &(int) {2166},/* sys._columns.id */ + 2078, "sub", /* sys._columns.name */ + 2079, "int", /* sys._columns.type */ + 2080, &(int) {32}, /* sys._columns.type_digits */ + 2081, &(int) {0}, /* sys._columns.type_scale */ + /* 2135 is tmp.keys */ + 2082, &(int) {2135},/* sys._columns.table_id */ + 2083, str_nil, /* sys._columns.default */ + 2084, &(bit) {TRUE},/* sys._columns.null */ + 2085, &(int) {3}, /* sys._columns.number */ + 2086, str_nil, /* sys._columns.storage */ + 0) != GDK_SUCCEED) + return GDK_FAIL; } #endif ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: check - fix upgrade record
Changeset: 73731f1bd24f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/73731f1bd24f Modified Files: sql/storage/bat/bat_logger.c Branch: check Log Message: fix upgrade record diffs (38 lines): diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c --- a/sql/storage/bat/bat_logger.c +++ b/sql/storage/bat/bat_logger.c @@ -3304,20 +3304,20 @@ bl_postversion(void *Store, void *Lg) return GDK_FAIL; tabins_first = false; if (tabins(lg, old_lg, tabins_first, -1, 0, - 2076, &(msk) {false}, /* sys._columns */ - /* 2166 is tmp.keys.check */ - 2077, &(int) {2166},/* sys._columns.id */ - 2078, "sub", /* sys._columns.name */ - 2079, "int", /* sys._columns.type */ - 2080, &(int) {32}, /* sys._columns.type_digits */ - 2081, &(int) {0}, /* sys._columns.type_scale */ - /* 2135 is tmp.keys */ - 2082, &(int) {2135},/* sys._columns.table_id */ - 2083, str_nil, /* sys._columns.default */ - 2084, &(bit) {TRUE},/* sys._columns.null */ - 2085, &(int) {3}, /* sys._columns.number */ - 2086, str_nil, /* sys._columns.storage */ - 0) != GDK_SUCCEED) + 2076, &(msk) {false},/* sys._columns */ + /* 2165 is tmp.keys.check */ + 2077, &(int) {2166}, /* sys._columns.id */ + 2078, "check", /* sys._columns.name */ + 2079, "varchar", /* sys._columns.type */ + 2080, &(int) {2048}, /* sys._columns.type_digits */ + 2081, &(int) {0},/* sys._columns.type_scale */ + /* 2135 is tmp.keys */ + 2082, &(int) {2135}, /* sys._columns.table_id */ + 2083, str_nil, /* sys._columns.default */ + 2084, &(bit) {TRUE}, /* sys._columns.null */ + 2085, &(int) {6},/* sys._columns.number */ + 2086, str_nil, /* sys._columns.storage */ + 0) != GDK_SUCCEED) return GDK_FAIL; } #endif ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge 'odbc-tls' into 'default'
Changeset: 12b3827b412f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/12b3827b412f Modified Files: clients/odbc/winsetup/setup.rc Branch: default Log Message: Merge 'odbc-tls' into 'default' diffs (truncated from 3600 to 300 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -745,12 +745,23 @@ const char *mo_find_option(opt *set, int void mo_free_options(opt *set, int setlen); void mo_print_options(opt *set, int setlen); int mo_system_config(opt **Set, int setlen); +mparm mparm_enumerate(int i); +bool mparm_is_core(mparm parm); +const char *mparm_name(mparm parm); mparm mparm_parse(const char *name); +char *msetting_as_string(const msettings *mp, mparm parm); bool msetting_bool(const msettings *mp, mparm parm); long msetting_long(const msettings *mp, mparm parm); +const char *msetting_parm_name(const msettings *mp, mparm parm); +msettings_error msetting_parse(msettings *mp, mparm parm, const char *text); int msetting_parse_bool(const char *text); +msettings_error msetting_set_bool(msettings *mp, mparm parm, bool value); +msettings_error msetting_set_ignored(msettings *mp, const char *key, const char *value); +msettings_error msetting_set_long(msettings *mp, mparm parm, long value); msettings_error msetting_set_named(msettings *mp, bool allow_core, const char *key, const char *value); +msettings_error msetting_set_string(msettings *mp, mparm parm, const char *value) __attribute__((__nonnull__(3))); const char *msetting_string(const msettings *mp, mparm parm); +msettings *msettings_clone(const msettings *mp); long msettings_connect_binary(const msettings *mp); const char *msettings_connect_certhash_digits(const msettings *mp); const char *msettings_connect_clientcert(const msettings *mp); @@ -761,8 +772,12 @@ const char *msettings_connect_tcp(const enum msetting_tls_verify msettings_connect_tls_verify(const msettings *mp); const char *msettings_connect_unix(const msettings *mp); msettings *msettings_create(void); +const msettings *msettings_default; msettings *msettings_destroy(msettings *mp); +bool msettings_malloc_failed(msettings_error err); bool msettings_parse_url(msettings *mp, const char *url, char **error_buffer); +void msettings_reset(msettings *mp); +void msettings_set_localizer(msettings *mp, const char *(*localizer)(const void *data, mparm parm), void *data); bool msettings_validate(msettings *mp, char **errmsg); const char *wsaerror(int); diff --git a/clients/examples/C/testsfile.c b/clients/examples/C/testsfile.c --- a/clients/examples/C/testsfile.c +++ b/clients/examples/C/testsfile.c @@ -85,7 +85,7 @@ handle_set_command(const char *location, { msettings_error msg = msetting_set_named(mp, true, key, value); if (msg) { - fprintf(stderr, "%s: cannot set '%s': %s\n", location, key, msg); + fprintf(stderr, "%s: %s\n", location, msg); return false; } return true; diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c --- a/clients/mapilib/connect.c +++ b/clients/mapilib/connect.c @@ -144,6 +144,17 @@ establish_connection(Mapi mid) msg = mapi_handshake(mid); } + // Switch from MP_CONNECT_TIMEOUT to MP_REPLY_TIMEOUT + if (msg == MOK) { + long connect_timeout = msetting_long(mid->settings, MP_CONNECT_TIMEOUT); + long reply_timeout = msetting_long(mid->settings, MP_REPLY_TIMEOUT); + if (connect_timeout > 0 || reply_timeout > 0) { + if (reply_timeout < 0) + reply_timeout = 0; + msg = mapi_timeout(mid, reply_timeout); + } + } + return msg; } @@ -153,6 +164,7 @@ connect_socket(Mapi mid) assert(!mid->connected); const char *sockname = msettings_connect_unix(mid->settings); const char *tcp_host = msettings_connect_tcp(mid->settings); + long timeout = msetting_long(mid->settings, MP_CONNECT_TIMEOUT); assert(*sockname || *tcp_host); do { @@ -165,6 +177,11 @@ connect_socket(Mapi mid) return mid->error; } while (0); + // the socket code may have set SO_SNDTIMEO and SO_RCVTIMEO but + // the mapi layer doesn't know this yet. + if (timeout > 0) + mapi_timeout(mid, timeout); + mid->connected = true; return MOK; } @@ -293,6 +310,8 @@ connect_socket_tcp(Mapi mid) static SOCKET connect_socket_tcp_addr(Mapi mid, struct addrinfo *info) { + long timeout = msetting_long(mid->settings, MP_CONNECT_TIMEOUT); + if (mid->tracelog) { char addrbuf[100] = {0}; const char *addrtext; @@ -311,7 +330,7 @@ connect_socket_tcp_addr(Mapi mid, struct port = -1; addrtext = NULL;
MonetDB: default - fix and test bug #7521
Changeset: 3a51d8edf6af for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3a51d8edf6af Modified Files: sql/server/rel_select.c sql/test/2024/Tests/distinct_from.test Branch: default Log Message: fix and test bug #7521 diffs (54 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -2318,9 +2318,24 @@ negate_symbol_tree(mvc *sql, symbol *sc) case SQL_COMPARE: { dnode *cmp_n = sc->data.lval->h; comp_type neg_cmp_type = negate_compare(compare_str2type(cmp_n->next->data.sval)); /* negate the comparator */ + if (cmp_n->next->next->next) { + switch(cmp_n->next->next->next->data.i_val) + { + case 0: /* negating ANY/ALL */ + cmp_n->next->next->next->data.i_val = 1; + break; + case 1: /* negating ANY/ALL */ + cmp_n->next->next->next->data.i_val = 0; + break; + case 2: /* negating IS [NOY] DINSTINCT FROM */ + cmp_n->next->next->next->data.i_val = 3; + break; + case 3: /* negating IS [NOY] DINSTINCT FROM */ + cmp_n->next->next->next->data.i_val = 2; + break; + } + } cmp_n->next->data.sval = sa_strdup(sql->sa, compare_func(neg_cmp_type, 0)); - if (cmp_n->next->next->next) /* negating ANY/ALL */ - cmp_n->next->next->next->data.i_val = cmp_n->next->next->next->data.i_val == 0 ? 1 : 0; } break; case SQL_AND: case SQL_OR: { diff --git a/sql/test/2024/Tests/distinct_from.test b/sql/test/2024/Tests/distinct_from.test --- a/sql/test/2024/Tests/distinct_from.test +++ b/sql/test/2024/Tests/distinct_from.test @@ -34,10 +34,20 @@ SELECT NULL IS DISTINCT FROM NULL 0 query I nosort +SELECT NOT (NULL IS DISTINCT FROM NULL) + +1 + +query I nosort SELECT NULL IS NOT DISTINCT FROM NULL 1 +query I nosort +SELECT NOT (NULL IS NOT DISTINCT FROM NULL) + +0 + statement ok create table foo(s) as values (10), (20), (NULL) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: balanced_union - Fixes crash: ->r needs to be NULL from...
Changeset: 6d7de45082d0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6d7de45082d0 Modified Files: sql/server/rel_statistics.c Branch: balanced_union Log Message: Fixes crash: ->r needs to be NULL from munion to project op conversion diffs (11 lines): diff --git a/sql/server/rel_statistics.c b/sql/server/rel_statistics.c --- a/sql/server/rel_statistics.c +++ b/sql/server/rel_statistics.c @@ -910,6 +910,7 @@ rel_get_statistics_(visitor *v, sql_rel rel->l = nl; if (list_length(nl) == 1) { sql_rel *l = rel->l = nl->h->data; /* ugh */ + rel->r = NULL; rel->op = op_project; for (node *n = rel->exps->h, *m = l->exps->h ; n && m ; n = n->next, m = m->next) { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - some more cleanup and fixes for the new labeling
Changeset: dee77ea35123 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/dee77ea35123 Modified Files: sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_select.c sql/server/rel_unnest.c sql/test/BugTracker-2024/Tests/rel_groupby_cse-Bug-7484.test Branch: label Log Message: some more cleanup and fixes for the new labeling diffs (182 lines): diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -1101,12 +1101,15 @@ exp_label(allocator *sa, sql_exp *e, int } list* -exps_label(allocator *sa, list *exps, int nr) +exps_label(mvc *sql, list *exps) { if (!exps) return NULL; + + int nr = sql->label+1; + sql->label += list_length(exps); for (node *n = exps->h; n; n = n->next) - n->data = exp_label(sa, n->data, nr++); + n->data = exp_label(sql->sa, n->data, nr++); list_hash_clear(exps); return exps; } @@ -1318,6 +1321,22 @@ exps_find_exp( list *l, sql_exp *e) return NULL; } +sql_exp* +exps_find_equal_exp( list *l, sql_exp *e) +{ + node *n; + + if (!l || !l->h) + return NULL; + + for(n=l->h; n; n = n->next) { + sql_exp *s = n->data; + if (exp_match(n->data, e) || (s->nid && s->nid == e->nid)) + return n->data; + } + return NULL; +} + /* c refers to the parent p */ int diff --git a/sql/server/rel_exp.h b/sql/server/rel_exp.h --- a/sql/server/rel_exp.h +++ b/sql/server/rel_exp.h @@ -123,7 +123,7 @@ extern void exp_prop_alias(allocator *sa extern void noninternexp_setname(mvc *sql, sql_exp *e, const char *rname, const char *name ); extern char* make_label(allocator *sa, int nr); extern sql_exp* exp_label(allocator *sa, sql_exp *e, int nr); -extern list* exps_label(allocator *sa, list *exps, int nr); +extern list* exps_label(mvc *sql, list *exps); extern sql_exp * exp_copy( mvc *sql, sql_exp *e); extern list * exps_copy( mvc *sql, list *exps); @@ -149,6 +149,7 @@ extern int exp_refers( sql_exp *p, sql_e extern sql_exp *exps_refers( sql_exp *p, list *exps); extern int exp_match( sql_exp *e1, sql_exp *e2); extern sql_exp* exps_find_exp( list *l, sql_exp *e); +extern sql_exp* exps_find_equal_exp( list *l, sql_exp *e); extern int exp_match_exp( sql_exp *e1, sql_exp *e2); extern int exp_match_exp_semantics( sql_exp *e1, sql_exp *e2, bool semantics); extern sql_exp* exps_any_match(list *l, sql_exp *e); diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -1423,8 +1423,10 @@ rel_column_ref(sql_query *query, sql_rel else exp->card = CARD_ATOM; set_freevar(exp, i); + /* if (exp->alias.label == exp->nid) exp->alias.label = -(sql->nid++); + */ if (!is_sql_where(of) && !is_sql_aggr(of) && !is_sql_aggr(f) && !outer->grouped) set_outer(outer); } @@ -1521,8 +1523,10 @@ rel_column_ref(sql_query *query, sql_rel else exp->card = CARD_ATOM; set_freevar(exp, i); + /* if (exp->alias.label == exp->nid) exp->alias.label = -(sql->nid++); + */ if (!is_sql_where(of) && !is_sql_aggr(of) && !is_sql_aggr(f) && !outer->grouped) set_outer(outer); } @@ -5134,6 +5138,8 @@ rel_value_exp2(sql_query *query, sql_rel exp_kind nek = ek; nek.aggr = is_sql_aggr(f); r = rel_subquery(query, se, nek); + if (r) + exps_label(sql, r->exps); } if (rel && *rel) { *rel = query_pop_outer(query); 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 @@ -752,7 +752,6 @@ rel_general_unnest(mvc *sql, sql_rel *re if (rel && (is_join(rel->op) || is_semi(rel->op)) && is_dependent(rel) && ad) { list *fd; node *n, *m; - int nr; sql_rel *l = rel->l, *r = rel->r, *inner_r; @@ -781,7 +780,7 @@ rel_general_unnest(mvc *sql, sql_rel *re r = rel_project(sql->sa, r, (is_semi(inner_r->op))?sa_list(sql->sa):rel_projections(sql, r->r, NULL, 1, 1)); - if (!is_semi(inner_r-
MonetDB: default - Fixed list of wide character code points.
Changeset: 206629814e02 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/206629814e02 Modified Files: common/utils/mutf8.c Branch: default Log Message: Fixed list of wide character code points. diffs (123 lines): diff --git a/common/utils/mutf8.c b/common/utils/mutf8.c --- a/common/utils/mutf8.c +++ b/common/utils/mutf8.c @@ -101,25 +101,24 @@ static const struct interval intervals[] { 0x27BF, 0x27BF, 2 }, { 0x2B1B, 0x2B1C, 2 }, { 0x2B50, 0x2B50, 2 }, { 0x2B55, 0x2B55, 2 }, { 0x2CEF, 0x2CF1, 0 }, { 0x2D7F, 0x2D7F, 0 }, { 0x2DE0, 0x2DFF, 0 }, { 0x2E80, 0x2E99, 2 }, { 0x2E9B, 0x2EF3, 2 }, - { 0x2F00, 0x2FD5, 2 }, { 0x2FF0, 0x303E, 2 }, { 0x302A, 0x302D, 0 }, - { 0x3041, 0x3096, 2 }, { 0x3099, 0x309A, 0 }, { 0x3099, 0x30FF, 2 }, - { 0x3105, 0x312F, 2 }, { 0x3131, 0x318E, 2 }, { 0x3190, 0x31E3, 2 }, - { 0x31EF, 0x321E, 2 }, { 0x3220, 0x3247, 2 }, { 0x3250, 0x3400, 2 }, - { 0x4DBF, 0x4DBF, 2 }, { 0x4E00, 0x4E00, 2 }, { 0x9FFF, 0xA48C, 2 }, - { 0xA490, 0xA4C6, 2 }, { 0xA66F, 0xA672, 0 }, { 0xA674, 0xA67D, 0 }, - { 0xA69E, 0xA69F, 0 }, { 0xA6F0, 0xA6F1, 0 }, { 0xA802, 0xA802, 0 }, - { 0xA806, 0xA806, 0 }, { 0xA80B, 0xA80B, 0 }, { 0xA825, 0xA826, 0 }, - { 0xA82C, 0xA82C, 0 }, { 0xA8C4, 0xA8C5, 0 }, { 0xA8E0, 0xA8F1, 0 }, - { 0xA8FF, 0xA8FF, 0 }, { 0xA926, 0xA92D, 0 }, { 0xA947, 0xA951, 0 }, - { 0xA960, 0xA97C, 2 }, { 0xA980, 0xA982, 0 }, { 0xA9B3, 0xA9B3, 0 }, - { 0xA9B6, 0xA9B9, 0 }, { 0xA9BC, 0xA9BD, 0 }, { 0xA9E5, 0xA9E5, 0 }, - { 0xAA29, 0xAA2E, 0 }, { 0xAA31, 0xAA32, 0 }, { 0xAA35, 0xAA36, 0 }, - { 0xAA43, 0xAA43, 0 }, { 0xAA4C, 0xAA4C, 0 }, { 0xAA7C, 0xAA7C, 0 }, - { 0xAAB0, 0xAAB0, 0 }, { 0xAAB2, 0xAAB4, 0 }, { 0xAAB7, 0xAAB8, 0 }, - { 0xAABE, 0xAABF, 0 }, { 0xAAC1, 0xAAC1, 0 }, { 0xAAEC, 0xAAED, 0 }, - { 0xAAF6, 0xAAF6, 0 }, { 0xABE5, 0xABE5, 0 }, { 0xABE8, 0xABE8, 0 }, - { 0xABED, 0xABED, 0 }, { 0xAC00, 0xAC00, 2 }, { 0xD7A3, 0xD7A3, 2 }, - { 0xF900, 0xFA6D, 2 }, { 0xFA70, 0xFAD9, 2 }, { 0xFB1E, 0xFB1E, 0 }, + { 0x2F00, 0x2FD5, 2 }, { 0x2FF0, 0x3029, 2 }, { 0x302A, 0x302D, 0 }, + { 0x302E, 0x303E, 2 }, { 0x3041, 0x3096, 2 }, { 0x3099, 0x309A, 0 }, + { 0x309B, 0x30FF, 2 }, { 0x3105, 0x312F, 2 }, { 0x3131, 0x318E, 2 }, + { 0x3190, 0x31E3, 2 }, { 0x31EF, 0x321E, 2 }, { 0x3220, 0x3247, 2 }, + { 0x3250, 0x4DBF, 2 }, { 0x4E00, 0xA48C, 2 }, { 0xA490, 0xA4C6, 2 }, + { 0xA66F, 0xA672, 0 }, { 0xA674, 0xA67D, 0 }, { 0xA69E, 0xA69F, 0 }, + { 0xA6F0, 0xA6F1, 0 }, { 0xA802, 0xA802, 0 }, { 0xA806, 0xA806, 0 }, + { 0xA80B, 0xA80B, 0 }, { 0xA825, 0xA826, 0 }, { 0xA82C, 0xA82C, 0 }, + { 0xA8C4, 0xA8C5, 0 }, { 0xA8E0, 0xA8F1, 0 }, { 0xA8FF, 0xA8FF, 0 }, + { 0xA926, 0xA92D, 0 }, { 0xA947, 0xA951, 0 }, { 0xA960, 0xA97C, 2 }, + { 0xA980, 0xA982, 0 }, { 0xA9B3, 0xA9B3, 0 }, { 0xA9B6, 0xA9B9, 0 }, + { 0xA9BC, 0xA9BD, 0 }, { 0xA9E5, 0xA9E5, 0 }, { 0xAA29, 0xAA2E, 0 }, + { 0xAA31, 0xAA32, 0 }, { 0xAA35, 0xAA36, 0 }, { 0xAA43, 0xAA43, 0 }, + { 0xAA4C, 0xAA4C, 0 }, { 0xAA7C, 0xAA7C, 0 }, { 0xAAB0, 0xAAB0, 0 }, + { 0xAAB2, 0xAAB4, 0 }, { 0xAAB7, 0xAAB8, 0 }, { 0xAABE, 0xAABF, 0 }, + { 0xAAC1, 0xAAC1, 0 }, { 0xAAEC, 0xAAED, 0 }, { 0xAAF6, 0xAAF6, 0 }, + { 0xABE5, 0xABE5, 0 }, { 0xABE8, 0xABE8, 0 }, { 0xABED, 0xABED, 0 }, + { 0xAC00, 0xD7A3, 2 }, { 0xF900, 0xFAFF, 2 }, { 0xFB1E, 0xFB1E, 0 }, { 0xFE00, 0xFE0F, 0 }, { 0xFE10, 0xFE19, 2 }, { 0xFE20, 0xFE2F, 0 }, { 0xFE30, 0xFE52, 2 }, { 0xFE54, 0xFE66, 2 }, { 0xFE68, 0xFE6B, 2 }, { 0xFEFF, 0xFEFF, 0 }, { 0xFF01, 0xFF60, 2 }, { 0xFFE0, 0xFFE6, 2 }, @@ -159,43 +158,38 @@ static const struct interval intervals[] { 0x11F00, 0x11F01, 0 }, { 0x11F36, 0x11F3A, 0 }, { 0x11F40, 0x11F40, 0 }, { 0x11F42, 0x11F42, 0 }, { 0x13430, 0x13440, 0 }, { 0x13447, 0x13455, 0 }, { 0x16AF0, 0x16AF4, 0 }, { 0x16B30, 0x16B36, 0 }, { 0x16F4F, 0x16F4F, 0 }, - { 0x16F8F, 0x16F92, 0 }, { 0x16FE0, 0x16FE4, 2 }, { 0x16FE4, 0x16FE4, 0 }, - { 0x16FF0, 0x16FF1, 2 }, { 0x17000, 0x17000, 2 }, { 0x187F7, 0x187F7, 2 }, - { 0x18800, 0x18CD5, 2 }, { 0x18D00, 0x18D00, 2 }, { 0x18D08, 0x18D08, 2 }, - { 0x1AFF0, 0x1AFF3, 2 }, { 0x1AFF5, 0x1AFFB, 2 }, { 0x1AFFD, 0x1AFFE, 2 }, - { 0x1B000, 0x1B122, 2 }, { 0x1B132, 0x1B132, 2 }, { 0x1B150, 0x1B152, 2 }, - { 0x1B155, 0x1B155, 2 }, { 0x1B164, 0x1B167, 2 }, { 0x1B170, 0x1B2FB, 2 }, - { 0x1BC9D, 0x1BC9E, 0 }, { 0x1BCA0, 0x1BCA3, 0 }, { 0x1CF00, 0x1CF2D, 0 }, - { 0x1CF30, 0x1CF46, 0 }, { 0x1D167, 0x1D169, 0 }, { 0x1D173, 0x1D182, 0 }, - { 0x1D185, 0x1D18B, 0 }, { 0x1D1AA, 0x1D1AD, 0 }, { 0x1D242, 0x1D244, 0 }, - { 0x1DA00, 0x1DA36, 0 }, { 0x1DA3B, 0x1DA6C, 0 }, { 0x1DA75, 0x1DA75, 0 }, - { 0x1DA84, 0x1DA84, 0 }, { 0x1DA9B, 0x1DA9F, 0 }, { 0x1DAA1, 0x1DAAF, 0 }, - { 0x1E000, 0x1E006, 0 }, { 0x1E008,
MonetDB: default - Fix comment.
Changeset: b909f8286f3a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b909f8286f3a Modified Files: clients/mapiclient/mclient.c Branch: default Log Message: Fix comment. diffs (12 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -174,7 +174,7 @@ static char *nullstring = default_nullst static timertype gettime(void) { - /* Return the time in milliseconds since an epoch. The epoch + /* Return the time in microseconds since an epoch. The epoch is roughly the time this program started. */ #ifdef _MSC_VER static LARGE_INTEGER freq, start; /* automatically initialized to 0 */ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fixes #7522
Changeset: e9925b686b29 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e9925b686b29 Modified Files: sql/server/rel_select.c Branch: default Log Message: Fixes #7522 diffs (12 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -1303,7 +1303,7 @@ bool group_by_pk_project_uk_cond(mvc* sq continue; } } - if (pki && pki->columns->cnt == 1 && ((list*) inner->r)->cnt == 1) { + if (pki && pki->columns->cnt == 1 && inner->r && ((list*) inner->r)->cnt == 1) { /* for now only check simple case where primary key and group by expression is a single column*/ sql_exp* gbe = ((list*) inner->r)->h->data; assert(gbe->type == e_column); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Adds some reader empathy in mtest
Changeset: 7c21b8cfa4f6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7c21b8cfa4f6 Modified Files: sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test Branch: default Log Message: Adds some reader empathy in mtest diffs (212 lines): diff --git a/sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test b/sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test --- a/sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test +++ b/sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test @@ -6,79 +6,135 @@ create table test ( ) query TIIITT rowsort -SELECT * FROM ( SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'SYSTEM TABLE' AS "TABLE_TYPE", '' AS -"REMARKS", null AS "TYPE_CAT", null AS "TYPE_SCHEM", -null AS "TYPE_NAME", 'rowid' AS -"SELF_REFERENCING_COL_NAME", 'SYSTEM' AS -"REF_GENERATION" FROM "tables", "schemas" WHERE -"tables"."schema_id" = "schemas"."id" AND -"tables"."system" = true AND "tables"."type" = 0 -UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'TABLE' AS "TABLE_TYPE", '' AS "REMARKS", -null AS "TYPE_CAT", null AS "TYPE_SCHEM", null AS -"TYPE_NAME", 'rowid' AS "SELF_REFERENCING_COL_NAME", -'SYSTEM' AS "REF_GENERATION" FROM "tables", "schemas" -WHERE "tables"."schema_id" = "schemas"."id" AND -"tables"."system" = false AND "tables".name = 'test' -AND "tables"."type" = 0 UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'SYSTEM VIEW' AS "TABLE_TYPE", '' AS -"REMARKS", null AS "TYPE_CAT", null AS "TYPE_SCHEM", -null AS "TYPE_NAME", 'rowid' AS -"SELF_REFERENCING_COL_NAME", 'SYSTEM' AS -"REF_GENERATION" FROM "tables", "schemas" WHERE -"tables"."schema_id" = "schemas"."id" AND -"tables"."system" = true AND "tables"."type" = 1 -UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'VIEW' AS "TABLE_TYPE", '' AS "REMARKS", -null AS "TYPE_CAT", null AS "TYPE_SCHEM", null AS -"TYPE_NAME", 'rowid' AS "SELF_REFERENCING_COL_NAME", -'SYSTEM' AS "REF_GENERATION" FROM "tables", "schemas" -WHERE "tables"."schema_id" = "schemas"."id" AND -"tables"."system" = false AND "tables".name = 'test' -AND "tables"."type" = 1 UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'SYSTEM SESSION TABLE' AS "TABLE_TYPE", -'' AS "REMARKS", null AS "TYPE_CAT", null AS -"TYPE_SCHEM", null AS "TYPE_NAME", 'rowid' AS -"SELF_REFERENCING_COL_NAME", 'SYSTEM' AS -"REF_GENERATION" FROM tmp."_tables" AS "tables", -"schemas" WHERE "tables"."schema_id" = "schemas"."id" -AND "tables"."system" = true AND "tables"."type" = -0 UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'SESSION TABLE' AS "TABLE_TYPE", '' AS -"REMARKS", null AS "TYPE_CAT", null AS "TYPE_SCHEM", -null AS "TYPE_NAME", 'rowid' AS -"SELF_REFERENCING_COL_NAME", 'SYSTEM' AS -"REF_GENERATION" FROM tmp."_tables" AS "tables", -"schemas" WHERE "tables"."schema_id" = "schemas"."id" -AND "tables"."system" = false AND "tables".name = 'test' -AND "tables"."type" = 0 UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'SYSTEM SESSION VIEW' AS "TABLE_TYPE", '' -AS "REMARKS", null AS "TYPE_CAT", null AS "TYPE_SCHEM", -null AS "TYPE_NAME", 'rowid' AS -"SELF_REFERENCING_COL_NAME", 'SYSTEM' AS -"REF_GENERATION" FROM tmp."_tables" AS "tables", -"schemas" WHERE "tables"."schema_id" = "schemas"."id" -AND "tables"."system" = true AND "tables"."type" = -1 UNION ALL SELECT 'demo' AS "TABLE_CAT", -"schemas"."name" AS "TABLE_SCHEM", "tables"."name" AS -"TABLE_NAME", 'SESSION VIEW' AS "TABLE_TYPE", '' AS -"REMARKS", null AS "TYPE_CAT", null AS "TYPE_SCHEM", -null AS "TYPE_NAME", 'rowid' AS -"SELF_REFERENCING_COL_NAME", 'SYSTEM' AS -"REF_GENERATION" FROM tmp."_tables" AS "tables", -"schemas" WHERE "tables"."schema_id" = "schemas"."id" -AND "tables"."system" = false AND "tables".name = 'test' -AND "tables"."type" = 1 ) AS "tables" WHERE 1 = 1 AND ("TABLE_TYPE" LIKE -'TABLE' OR "TABLE_TYPE" LIKE 'VIEW') ORDER BY -"TABLE_TYPE", "TABLE_SCHEM", "TABLE_NAME" +SELECT * FROM ( +SELECT 'demo' AS "TABLE_CAT", +"schemas"."name" AS "TABLE_SCHEM", + "tables"."name" AS "TABLE_NAME", + 'SYSTEM TABLE' AS "TABLE_TYPE", + '' AS "REMARKS", + null AS "TYPE_CAT", + null AS "TYPE_SCHEM", +null AS "TYPE_NAME", + 'rowid' AS "SELF_REFERENCING_COL_NAME", + 'SYSTEM' AS "REF_GENERATION" + FROM "tables", "schemas" + WHERE "tables"."schema_id" = "schemas"."id" AND + "tables"."system" = true AND + "tables"."type" = 0 +UNION ALL +SELECT 'demo' AS "TABLE_CAT", +"schemas"."name" AS
MonetDB: default - Merges other head
Changeset: acb560eab26d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/acb560eab26d Branch: default Log Message: Merges other head diffs (12 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -1303,7 +1303,7 @@ bool group_by_pk_project_uk_cond(mvc* sq continue; } } - if (pki && pki->columns->cnt == 1 && ((list*) inner->r)->cnt == 1) { + if (pki && pki->columns->cnt == 1 && inner->r && ((list*) inner->r)->cnt == 1) { /* for now only check simple case where primary key and group by expression is a single column*/ sql_exp* gbe = ((list*) inner->r)->h->data; assert(gbe->type == e_column); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Add script to create charwidth table.
Changeset: e3930423f7df for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e3930423f7df Added Files: misc/bash/uniwidthtab.sh Modified Files: common/utils/mutf8.c Branch: default Log Message: Add script to create charwidth table. diffs (73 lines): diff --git a/common/utils/mutf8.c b/common/utils/mutf8.c --- a/common/utils/mutf8.c +++ b/common/utils/mutf8.c @@ -19,6 +19,7 @@ struct interval { int width; }; +/* this table was created using the script uniwidthtab.sh */ static const struct interval intervals[] = { /* sorted list of non-overlapping ranges: * ranges with width==0 represent all codepoints with diff --git a/misc/bash/uniwidthtab.sh b/misc/bash/uniwidthtab.sh new file mode 100755 --- /dev/null +++ b/misc/bash/uniwidthtab.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# SPDX-License-Identifier: MPL-2.0 +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 2024 MonetDB Foundation; +# Copyright August 2008 - 2023 MonetDB B.V.; +# Copyright 1997 - July 2008 CWI. + +{ +sed -n -e '/# Mn/d' \ + -e 's/^\([0-9A-F][0-9A-F]*\)\.\.\([0-9A-F][0-9A-F]*\) *; *[FW].*/0x\1 0x\2/p' \ + -e 's/^\([0-9A-F][0-9A-F]*\) *; [FW].*/0x\1 0x\1/p' \ + < /usr/share/unicode/ucd/EastAsianWidth.txt | { + while read line; do + line=($line) + f=$((${line[0]%})) + l=$((${line[1]%})) + if [[ -n $prevl ]]; then + if (($prevl+1 == $f)); then + prevl=$l + else + printf '\t{ 0x%05X, 0x%05X, 2 },\n' $prevf $prevl + prevf=$f + prevl=$l + fi + else + prevf=$f + prevl=$l + fi + done + printf '\t{ 0x%05X, 0x%05X, 2 },\n' $prevf $prevl +} + +sed -n '/^00AD/d;s/^\([0-9A-F][0-9A-F]*\);[^;]*;\(Me\|Mn\|Cf\);.*/0x\1/p' \ + < /usr/share/unicode/ucd/UnicodeData.txt | { + while read line; do + u=$(($line)) + if [[ -n $prevf ]]; then + if (($prevl+1 == $u)); then + prevl=$u + else + printf '\t{ 0x%05X, 0x%05X, 0 },\n' $prevf $prevl + prevf=$u + prevl=$u + fi + else + prevf=$u + prevl=$u + fi + done + printf '\t{ 0x%05X, 0x%05X, 0 },\n' $prevf $prevl +} +} | sort | sed 's/0x0\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\)/0x\1/g' ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - fixed lookup of count expression
Changeset: 3f5268a0c6dc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3f5268a0c6dc Modified Files: sql/server/rel_unnest.c Branch: label Log Message: fixed lookup of count expression diffs (27 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 @@ -3241,17 +3241,21 @@ rewrite_compare(visitor *v, sql_rel *rel return NULL; re = rsq->exps->t->data; +#if 0 if (!is_tuple) { re = exp_label(v->sql->sa, re, ++v->sql->label); /* unique name */ list_hash_clear(rsq->exps); re = exp_ref(v->sql, re); } +#endif set_processed(rsq); } int is_cnt = 0; - if (rsq) - is_cnt = exp_is_count(re, rsq); + if (rsq) { + sql_exp *r = exps_bind_nid(rsq->exps, re->nid); + is_cnt = exp_is_count(r, rsq); + } if (is_project(rel->op) || depth > 0 || quantifier || is_cnt) { sql_rel *sq = lsq; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - merged with default
Changeset: d947ddc7c002 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d947ddc7c002 Modified Files: sql/server/rel_select.c Branch: label Log Message: merged with default diffs (truncated from 4080 to 300 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -745,12 +745,23 @@ const char *mo_find_option(opt *set, int void mo_free_options(opt *set, int setlen); void mo_print_options(opt *set, int setlen); int mo_system_config(opt **Set, int setlen); +mparm mparm_enumerate(int i); +bool mparm_is_core(mparm parm); +const char *mparm_name(mparm parm); mparm mparm_parse(const char *name); +char *msetting_as_string(const msettings *mp, mparm parm); bool msetting_bool(const msettings *mp, mparm parm); long msetting_long(const msettings *mp, mparm parm); +const char *msetting_parm_name(const msettings *mp, mparm parm); +msettings_error msetting_parse(msettings *mp, mparm parm, const char *text); int msetting_parse_bool(const char *text); +msettings_error msetting_set_bool(msettings *mp, mparm parm, bool value); +msettings_error msetting_set_ignored(msettings *mp, const char *key, const char *value); +msettings_error msetting_set_long(msettings *mp, mparm parm, long value); msettings_error msetting_set_named(msettings *mp, bool allow_core, const char *key, const char *value); +msettings_error msetting_set_string(msettings *mp, mparm parm, const char *value) __attribute__((__nonnull__(3))); const char *msetting_string(const msettings *mp, mparm parm); +msettings *msettings_clone(const msettings *mp); long msettings_connect_binary(const msettings *mp); const char *msettings_connect_certhash_digits(const msettings *mp); const char *msettings_connect_clientcert(const msettings *mp); @@ -761,8 +772,12 @@ const char *msettings_connect_tcp(const enum msetting_tls_verify msettings_connect_tls_verify(const msettings *mp); const char *msettings_connect_unix(const msettings *mp); msettings *msettings_create(void); +const msettings *msettings_default; msettings *msettings_destroy(msettings *mp); +bool msettings_malloc_failed(msettings_error err); bool msettings_parse_url(msettings *mp, const char *url, char **error_buffer); +void msettings_reset(msettings *mp); +void msettings_set_localizer(msettings *mp, const char *(*localizer)(const void *data, mparm parm), void *data); bool msettings_validate(msettings *mp, char **errmsg); const char *wsaerror(int); diff --git a/clients/examples/C/testsfile.c b/clients/examples/C/testsfile.c --- a/clients/examples/C/testsfile.c +++ b/clients/examples/C/testsfile.c @@ -85,7 +85,7 @@ handle_set_command(const char *location, { msettings_error msg = msetting_set_named(mp, true, key, value); if (msg) { - fprintf(stderr, "%s: cannot set '%s': %s\n", location, key, msg); + fprintf(stderr, "%s: %s\n", location, msg); return false; } return true; diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -174,7 +174,7 @@ static char *nullstring = default_nullst static timertype gettime(void) { - /* Return the time in milliseconds since an epoch. The epoch + /* Return the time in microseconds since an epoch. The epoch is roughly the time this program started. */ #ifdef _MSC_VER static LARGE_INTEGER freq, start; /* automatically initialized to 0 */ diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c --- a/clients/mapilib/connect.c +++ b/clients/mapilib/connect.c @@ -144,6 +144,17 @@ establish_connection(Mapi mid) msg = mapi_handshake(mid); } + // Switch from MP_CONNECT_TIMEOUT to MP_REPLY_TIMEOUT + if (msg == MOK) { + long connect_timeout = msetting_long(mid->settings, MP_CONNECT_TIMEOUT); + long reply_timeout = msetting_long(mid->settings, MP_REPLY_TIMEOUT); + if (connect_timeout > 0 || reply_timeout > 0) { + if (reply_timeout < 0) + reply_timeout = 0; + msg = mapi_timeout(mid, reply_timeout); + } + } + return msg; } @@ -153,6 +164,7 @@ connect_socket(Mapi mid) assert(!mid->connected); const char *sockname = msettings_connect_unix(mid->settings); const char *tcp_host = msettings_connect_tcp(mid->settings); + long timeout = msetting_long(mid->settings, MP_CONNECT_TIMEOUT); assert(*sockname || *tcp_host); do { @@ -165,6 +177,11 @@ connect_socket(Mapi mid) return mid->error; } while (0); + // the socket code may have set SO_SNDTIMEO and SO_RCVTIMEO but + // the mapi layer doesn't know this yet. + if (timeout > 0) + mapi_timeout(mid, ti
MonetDB: odbc-tls - closing branch
Changeset: 08f92e5c2cf1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/08f92e5c2cf1 Modified Files: clients/odbc/driver/SQLConnect.c Branch: odbc-tls Log Message: closing branch diffs (12 lines): diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c --- a/clients/odbc/driver/SQLConnect.c +++ b/clients/odbc/driver/SQLConnect.c @@ -571,7 +571,7 @@ SQLConnectW(SQLHDBC ConnectionHandle, { SQLCHAR *ds = NULL, *uid = NULL, *pwd = NULL; SQLRETURN rc = SQL_ERROR; - ODBCDbc *dbc = (ODBCDbc *) ConnectionHandle; + ODBCDbc dbc = (ODBCDbc *) ConnectionHandle; #ifdef ODBCDEBUG ODBCLOG("SQLConnectW %p\n", ConnectionHandle); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fix output with newline.
Changeset: a02997296566 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a02997296566 Modified Files: clients/mapiclient/mclient.c Branch: default Log Message: Fix output with newline. diffs (12 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -389,7 +389,7 @@ utf8strlenmax(char *s, char *e, size_t m case UTF8_ACCEPT: if (codepoint == '\n') { if (max) { - *t = s; + *t = s - 1; /* before the \n */ return len; } len++; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - fixed issue on overwriting list with empty list
Changeset: 7350a992e0f3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7350a992e0f3 Modified Files: sql/server/rel_optimize_sel.c Branch: label Log Message: fixed issue on overwriting list with empty list diffs (12 lines): diff --git a/sql/server/rel_optimize_sel.c b/sql/server/rel_optimize_sel.c --- a/sql/server/rel_optimize_sel.c +++ b/sql/server/rel_optimize_sel.c @@ -3338,7 +3338,7 @@ rel_push_select_down(visitor *v, sql_rel node *n; if (rel_is_ref(rel)) { - if (is_select(rel->op) && rel->exps) { + if (is_select(rel->op) && !list_empty(rel->exps)) { /* add inplace empty select */ sql_rel *l = rel_select(v->sql->sa, rel->l, NULL); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - merged with default
Changeset: 140678787f40 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/140678787f40 Branch: label Log Message: merged with default diffs (12 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -389,7 +389,7 @@ utf8strlenmax(char *s, char *e, size_t m case UTF8_ACCEPT: if (codepoint == '\n') { if (max) { - *t = s; + *t = s - 1; /* before the \n */ return len; } len++; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Move ChangeLog entry to the right place
Changeset: d02940d6dae3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d02940d6dae3 Removed Files: clients/odbc/ChangeLog.odbc-tls Modified Files: clients/odbc/ChangeLog Branch: default Log Message: Move ChangeLog entry to the right place diffs (57 lines): diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog --- a/clients/odbc/ChangeLog +++ b/clients/odbc/ChangeLog @@ -1,3 +1,24 @@ # ChangeLog file for odbc # This file is updated with Maddlog +* Fri May 24 2024 Joeri van Ruth +- ODBC now supports TLS. It can be configured through the following + DSN- or Connection String attributes (canonical name / user friendly name): +TLS / Encrypt = ON/OFF +CERT / Server Certificate = PATH +CERTHASH / Server Certificate Hash = sha256:HEXDIGITS +CLIENTKEY / Client Key = PATH +CLIENTCERT / Client Certificate = PATH +AUTOCOMMIT / Autocommit = ON/OFF +- Several more connection properties have been made configurable: +SCHEMA / Schema = NAME +TIMEZONE / Time Zone = Minutes East Of UTC +REPLYSIZE / Reply Size = NUMBER +LOGFILE / Log File = PATH +LOGINTIMEOUT / Login Timeout = MILLISECONDS +CONNECTIONTIMEOUT / Connection Timeout = MILLISECONDS +SOCK / Unix Socket = PATH (unix only) +- SQLBrowseConnect adds On/Off suggestions to boolean settings + and prioritizes the DATABASE attribute if it notices monetdbd + requires one. Apart from that only UID/User and PWD/Password + are required, all others have sensible defaults. diff --git a/clients/odbc/ChangeLog.odbc-tls b/clients/odbc/ChangeLog.odbc-tls deleted file mode 100644 --- a/clients/odbc/ChangeLog.odbc-tls +++ /dev/null @@ -1,24 +0,0 @@ -# ChangeLog file for odbc -# This file is updated with Maddlog - -* Fri May 24 2024 Joeri van Ruth -- ODBC now supports TLS. It can be configured through the following - DSN- or Connection String attributes (canonical name / user friendly name): -TLS / Encrypt = ON/OFF -CERT / Server Certificate = PATH -CERTHASH / Server Certificate Hash = sha256:HEXDIGITS -CLIENTKEY / Client Key = PATH -CLIENTCERT / Client Certificate = PATH -AUTOCOMMIT / Autocommit = ON/OFF -- Several more connection properties have been made configurable: -SCHEMA / Schema = NAME -TIMEZONE / Time Zone = Minutes East Of UTC -REPLYSIZE / Reply Size = NUMBER -LOGFILE / Log File = PATH -LOGINTIMEOUT / Login Timeout = MILLISECONDS -CONNECTIONTIMEOUT / Connection Timeout = MILLISECONDS -SOCK / Unix Socket = PATH (unix only) -- SQLBrowseConnect adds On/Off suggestions to boolean settings - and prioritizes the DATABASE attribute if it notices monetdbd - requires one. Apart from that only UID/User and PWD/Password - are required, all others have sensible defaults. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fix the odbc-tls mess.
Changeset: f04ec543d5fd for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f04ec543d5fd Modified Files: clients/odbc/winsetup/setup.rc Branch: default Log Message: Fix the odbc-tls mess. After merge into default, there were some more checkins on the branch, and then the branch was closed, so loosing those changes. They are now merged. diffs (299 lines): diff --git a/clients/odbc/winsetup/install.c b/clients/odbc/winsetup/install.c --- a/clients/odbc/winsetup/install.c +++ b/clients/odbc/winsetup/install.c @@ -166,7 +166,7 @@ static void CreateAttributeString(char *attrs, size_t len, const char *dsn) { snprintf(attrs, len, - "DSN=%s;Server=localhost;Database=;UID=monetdb;PWD=monetdb;Logfile=;", + "DSN=%s;Server=localhost;Database=;UID=monetdb;PWD=monetdb;AutoCommit=on;TLS=off;", dsn); for (; *attrs; attrs++) @@ -230,9 +230,8 @@ Install(const char *driverpath, const ch } rc = InstallMyDriver(driverpath, drivername); - if (rc) { - /* after the driver is installed create the new DSN */ + /* after the driver is installed create the new System DSN */ rc = AddMyDSN(dsn, drivername); } 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 @@ -40,7 +40,9 @@ #define IDC_EDIT_CLIENTKEY 2024 #define IDC_EDIT_CLIENTCERT 2025 -#define IDC_BUTTON_CANCEL 2031 +//#define IDC_BUTTON_CANCEL 2031 +#define IDC_BUTTON_TEST 2031 +#define IDC_BUTTON_HELP 2032 // Next default values for new objects // 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 @@ -328,44 +328,44 @@ ConfigDSN(HWND parent, WORD request, LPC return FALSE; } value++; - if (strncasecmp("dsn=", attributes, value - attributes) == 0) { + if (strncasecmp("DSN=", attributes, value - attributes) == 0) { dsn = value; data.dsn = strdup(value); - } else if (strncasecmp("description=", attributes, value - attributes) == 0) + } else if (strncasecmp("Description=", attributes, value - attributes) == 0) data.desc = strdup(value); - else if (strncasecmp("uid=", attributes, value - attributes) == 0) + else if (strncasecmp("UID=", attributes, value - attributes) == 0) data.uid = strdup(value); - else if (strncasecmp("pwd=", attributes, value - attributes) == 0) + else if (strncasecmp("PWD=", attributes, value - attributes) == 0) data.pwd = strdup(value); - else if (strncasecmp("host=", attributes, value - attributes) == 0) + else if (strncasecmp("Host=", attributes, value - attributes) == 0) data.host = strdup(value); - else if (strncasecmp("port=", attributes, value - attributes) == 0) + else if (strncasecmp("Port=", attributes, value - attributes) == 0) data.port = strdup(value); - else if (strncasecmp("database=", attributes, value - attributes) == 0) + else if (strncasecmp("Database=", attributes, value - attributes) == 0) data.database = strdup(value); - else if (strncasecmp("schema=", attributes, value - attributes) == 0) + else if (strncasecmp("Schema=", attributes, value - attributes) == 0) data.schema = strdup(value); - else if (strncasecmp("logintimeout=", attributes, value - attributes) == 0) + else if (strncasecmp("LoginTimeout=", attributes, value - attributes) == 0) data.logintimeout = strdup(value); - else if (strncasecmp("replytimeout=", attributes, value - attributes) == 0) + else if (strncasecmp("ReplyTimeout=", attributes, value - attributes) == 0) data.replytimeout = strdup(value); - else if (strncasecmp("replysize=", attributes, value - attributes) == 0) + else if (strncasecmp("ReplySize=", attributes, value - attributes) == 0) data.replysize = strdup(value); - else if (strncasecmp("autocommit=", attributes, value - attributes) == 0) + else if (strncasecmp("AutoCommit=", attributes, value - attributes) == 0) data.autocommit = strdup(value); - else if (strncasecmp("timezone=", attributes, value - attributes) == 0) + else if (strncasecmp("Tim
MonetDB: label - Improved check for equal expressions in rel_pro...
Changeset: fd29c863b67f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/fd29c863b67f Modified Files: sql/server/rel_optimize_proj.c Branch: label Log Message: Improved check for equal expressions in rel_project_select_exp optimizer diffs (12 lines): diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c --- a/sql/server/rel_optimize_proj.c +++ b/sql/server/rel_optimize_proj.c @@ -3036,7 +3036,7 @@ rel_project_select_exp(visitor *v, sql_r sql_exp *cmp = m->data; if (cmp->type == e_cmp && cmp->flag == cmp_equal && !is_anti(cmp) && !is_semantics(cmp) && exp_is_atom(cmp->r)) { sql_exp *l = cmp->l; - if(l->type == e_column && col->alias.label == l->nid /*((!col->l && !l->l) || (col->l && l->l && strcmp(col->l, l->l) == 0)) && strcmp(col->r, l->r) == 0*/) { + if(l->type == e_column && col->nid == l->nid /*((!col->l && !l->l) || (col->l && l->l && strcmp(col->l, l->l) == 0)) && strcmp(col->r, l->r) == 0*/) { /* replace column with the constant */ sql_exp *e = n->data = exp_copy(v->sql, cmp->r); exp_setalias(e, col->alias.label, exp_relname(col), exp_name(col)); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - approved output
Changeset: 026943ff604a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/026943ff604a Modified Files: sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test sql/test/BugTracker-2015/Tests/crash.Bug-3736.test sql/test/BugTracker-2016/Tests/merge_project.Bug-3955.test sql/test/SQLancer/Tests/sqlancer17.test sql/test/astro/Tests/astro.test sql/test/bugs/Tests/rtrim_bug.test sql/test/merge-partitions/Tests/mergepart31.test sql/test/miscellaneous/Tests/groupby_prepare.stable.out sql/test/miscellaneous/Tests/simple_selects.test sql/test/prepare/Tests/prepare-complex.stable.out sql/test/prepare/Tests/rename_exps.Bug-3974.stable.out sql/test/prepare/Tests/sqlancer_prepare.stable.out Branch: label Log Message: approved output diffs (truncated from 691 to 300 lines): diff --git a/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test b/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test --- a/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test +++ b/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test @@ -73,12 +73,12 @@ project ( | distinct union ( | | project ( | | | table("sys"."t2606a") [ "t2606a"."a" NOT NULL UNIQUE ] -| | ) [ "t2606a"."a" NOT NULL UNIQUE as "%1"."a" ], +| | ) [ "t2606a"."a" NOT NULL UNIQUE ], | | project ( | | | table("sys"."t2606b") [ "t2606b"."a" NOT NULL UNIQUE ] -| | ) [ "t2606b"."a" NOT NULL UNIQUE as "%2"."a" ] -| ) [ "%1"."a" NOT NULL UNIQUE as "%5"."a" ] -) [ "%5"."a" NOT NULL UNIQUE ] [ "%5"."a" ASC NOT NULL UNIQUE ] +| | ) [ "t2606b"."a" NOT NULL UNIQUE ] +| ) [ "t2606a"."a" NOT NULL UNIQUE ] +) [ "t2606a"."a" NOT NULL UNIQUE ] [ "t2606a"."a" ASC NOT NULL UNIQUE ] query I rowsort select * from t2606a union select * from t2606b order by a @@ -100,12 +100,12 @@ project ( | distinct union ( | | project ( | | | table("sys"."t2606a") [ "t2606a"."a" NOT NULL UNIQUE ] -| | ) [ "t2606a"."a" NOT NULL UNIQUE as "%1"."a" ], +| | ) [ "t2606a"."a" NOT NULL UNIQUE ], | | project ( | | | table("sys"."t2606b") [ "t2606b"."a" NOT NULL UNIQUE ] -| | ) [ "t2606b"."a" NOT NULL UNIQUE as "%2"."a" ] -| ) [ "%1"."a" NOT NULL UNIQUE as "%5"."a" ] -) [ "%5"."a" NOT NULL UNIQUE ] [ "%5"."a" ASC NOT NULL UNIQUE ] +| | ) [ "t2606b"."a" NOT NULL UNIQUE ] +| ) [ "t2606a"."a" NOT NULL UNIQUE ] +) [ "t2606a"."a" NOT NULL UNIQUE ] [ "t2606a"."a" ASC NOT NULL UNIQUE ] query I rowsort ( select * from t2606a union select * from t2606b ) order by a @@ -127,12 +127,12 @@ project ( | distinct union ( | | project ( | | | table("sys"."t2606a") [ "t2606a"."a" NOT NULL UNIQUE ] -| | ) [ "t2606a"."a" NOT NULL UNIQUE as "%1"."a" ], +| | ) [ "t2606a"."a" NOT NULL UNIQUE ], | | project ( | | | table("sys"."t2606b") [ "t2606b"."a" NOT NULL UNIQUE ] -| | ) [ "t2606b"."a" NOT NULL UNIQUE as "%2"."a" ] -| ) [ "%1"."a" NOT NULL UNIQUE as "%5"."a" ] -) [ "%5"."a" NOT NULL UNIQUE ] [ "%5"."a" ASC NOT NULL UNIQUE ] +| | ) [ "t2606b"."a" NOT NULL UNIQUE ] +| ) [ "t2606a"."a" NOT NULL UNIQUE ] +) [ "t2606a"."a" NOT NULL UNIQUE ] [ "t2606a"."a" ASC NOT NULL UNIQUE ] query I rowsort ( select * from t2606a ) union ( select * from t2606b ) order by a @@ -154,12 +154,12 @@ project ( | distinct except ( | | project ( | | | table("sys"."t2606a") [ "t2606a"."a" NOT NULL UNIQUE ] -| | ) [ "t2606a"."a" NOT NULL UNIQUE as "%1"."a" ], +| | ) [ "t2606a"."a" NOT NULL UNIQUE ], | | project ( | | | table("sys"."t2606b") [ "t2606b"."a" NOT NULL UNIQUE ] -| | ) [ "t2606b"."a" NOT NULL UNIQUE as "%2"."a" ] -| ) [ "%1"."a" NOT NULL UNIQUE as "%5"."a" ] -) [ "%5"."a" NOT NULL UNIQUE ] [ "%5"."a" ASC NOT NULL UNIQUE ] +| | ) [ "t2606b"."a" NOT NULL UNIQUE ] +| ) [ "t2606a"."a" NOT NULL UNIQUE ] +) [ "t2606a"."a" NOT NULL UNIQUE ] [ "t2606a"."a" ASC NOT NULL UNIQUE ] query I rowsort select * from t2606a except select * from t2606b order by a @@ -175,12 +175,12 @@ project ( | distinct except ( | | project ( | | | table("sys"."t2606a") [ "t2606a"."a" NOT NULL UNIQUE ] -| | ) [ "t2606a"."a" NOT NULL UNIQUE as "%1"."a" ], +| | ) [ "t2606a"."a" NOT NULL UNIQUE ], | | project ( | | | table("sys"."t2606b") [ "t2606b"."a" NOT NULL UNIQUE ] -| | ) [ "t2606b"."a" NOT NULL UNIQUE as "%2"."a" ] -| ) [ "%1"."a" NOT NULL UNIQUE as "%5"."a" ] -) [ "%5"."a" NOT NULL UNIQUE ] [ "%5"."a" ASC NOT NULL UNIQUE ] +| | ) [ "t2606b"."a" NOT NULL UNIQUE ] +| ) [ "t2606a"."a" NOT NULL UNIQUE ] +) [ "t2606a"."a" NOT NULL UNIQUE ] [ "t2606a"."a" ASC NOT NULL UNIQUE ] query I rowsort ( select * from t2606a except select * from t2606b ) order by a @@ -196,12 +196,12 @@ project ( | distinct except ( | | project ( | | | table("sys"."t2606a") [ "t2606a"."a" NOT NULL UNIQUE ] -| | ) [ "t2606a"."a" NOT NULL UNIQUE as "%1"."a" ], +| | ) [ "t2606a"."a"
MonetDB: label - approved output
Changeset: 585513d411f8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/585513d411f8 Modified Files: sql/test/prepare/Tests/sqlancer_prepare.stable.out sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 Branch: label Log Message: approved output diffs (165 lines): diff --git a/sql/test/prepare/Tests/sqlancer_prepare.stable.out b/sql/test/prepare/Tests/sqlancer_prepare.stable.out --- a/sql/test/prepare/Tests/sqlancer_prepare.stable.out +++ b/sql/test/prepare/Tests/sqlancer_prepare.stable.out @@ -10,9 +10,9 @@ % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type -% 12, 2, 1, 0, 3, 2 # length -[ "boolean", 1, 0, "", "%10", "c0"] -[ "sec_interval", 13, 0, "", "%10", "%1"] +% 12, 2, 1, 0, 2, 2 # length +[ "boolean", 1, 0, "", "t0", "c0"] +[ "sec_interval", 13, 0, "", "%1", "%1"] [ "boolean", 1, 0, NULL, NULL, NULL] [ "sec_interval", 13, 0, NULL, NULL, NULL] #ROLLBACK; @@ -27,9 +27,9 @@ % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type -% 7, 2, 1, 0, 3, 3 # length -[ "decimal", 2, 1, "", "%22", "%13" ] -[ "int", 31, 0, "", "%22", "c2"] +% 7, 2, 1, 0, 2, 2 # length +[ "decimal", 2, 1, "", "%6", "%6"] +[ "int", 31, 0, "", "t1", "c2"] [ "decimal", 2, 1, NULL, NULL, NULL] [ "int", 31, 0, NULL, NULL, NULL] [ "int", 31, 0, NULL, NULL, NULL] @@ -128,15 +128,15 @@ % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type -% 7, 1, 1, 0, 3, 3 # length -[ "boolean", 1, 0, "", "%10", "%10" ] +% 7, 1, 1, 0, 2, 2 # length +[ "boolean", 1, 0, "", "%7", "%7"] [ "decimal", 9, 6, NULL, NULL, NULL] #PREPARE SELECT "quarter"(date '2021-01-02') IN ("second"(TIME '01:00:00'), (select ? where true)); % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type -% 7, 1, 1, 0, 3, 3 # length -[ "boolean", 1, 0, "", "%10", "%10" ] +% 7, 1, 1, 0, 2, 2 # length +[ "boolean", 1, 0, "", "%7", "%7"] [ "decimal", 9, 6, NULL, NULL, NULL] % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name @@ -164,12 +164,12 @@ % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type -% 7, 1, 1, 0, 3, 3 # length -[ "varchar", 1, 0, "", "%22", "%14" ] +% 7, 1, 1, 0, 2, 2 # length +[ "varchar", 1, 0, "", "%7", "%7"] [ "varchar", 1, 0, NULL, NULL, NULL] [ "boolean", 1, 0, NULL, NULL, NULL] -% .%22 # table_name -% %14 # name +% .%7 # table_name +% %7 # name % varchar # type % 1 # length [ "b" ] diff --git a/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 b/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 --- a/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 +++ b/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 @@ -10,9 +10,9 @@ % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type -% 12, 2, 1, 0, 3, 2 # length -[ "boolean", 1, 0, "", "%10", "c0"] -[ "sec_interval", 13, 0, "", "%10", "%1"] +% 12, 2, 1, 0, 2, 2 # length +[ "boolean", 1, 0, "", "t0", "c0"] +[ "sec_interval", 13, 0, "", "%1", "%1"] [ "boolean", 1, 0, NULL,