Changeset: 8b6476be6936 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b6476be6936 Modified Files: .bumpversion.cfg .hgtags MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag debian/changelog gdk/libbat.rc libversions monetdb5/modules/atoms/mtime.c monetdb5/tools/libmonetdb5.rc sql/backends/monet5/sql_user.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/subquery/Tests/subquery6.sql Branch: unlock Log Message:
merged with default diffs (truncated from 422 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -6,6 +6,8 @@ tag = False [bumpversion:file:configure.ag] [bumpversion:file:MonetDB.spec] +search = %global version {current_version} +replace = %global version {new_version} [bumpversion:file:NT/rules.msc] diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -772,3 +772,6 @@ 0d51d6758f2b1f3f1804415545f8551a38da1848 28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_5 0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_release 28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_release +80bd3e89c48032840f493a63d6c4c12ee6273b3d Jun2020_7 +28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_release +80bd3e89c48032840f493a63d6c4c12ee6273b3d Jun2020_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -984,6 +984,9 @@ fi %postun -p /sbin/ldconfig %changelog +* Fri May 29 2020 Sjoerd Mullender <sjo...@acm.org> - 11.37.7-20200529 +- Rebuilt. + * Tue May 26 2020 Sjoerd Mullender <sjo...@acm.org> - 11.37.5-20200526 - Rebuilt. - BZ#6864: (I)LIKE with multiple % doen't find matches diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -9101,8 +9101,8 @@ stdout of test 'MAL-signatures` in direc [ "batcalc", "hash", "command batcalc.hash(b:bat[:lng]):bat[:lng] ", "MKEYbathash;", "" ] [ "batcalc", "hash", "command batcalc.hash(b:bat[:oid]):bat[:lng] ", "MKEYbathash;", "" ] [ "batcalc", "hash", "command batcalc.hash(b:bat[:sht]):bat[:lng] ", "MKEYbathash;", "" ] -[ "batcalc", "identity", "command batcalc.identity(b:bat[:any_2]):bat[:oid] ", "BATSQLidentity;", "Returns the unique row identitfiers." ] -[ "batcalc", "identity", "pattern batcalc.identity(b:bat[:any_2], s:oid) (resb:bat[:oid], ns:oid) ", "PBATSQLidentity;", "Returns the unique row identitfiers." ] +[ "batcalc", "identity", "command batcalc.identity(b:bat[:any]):bat[:oid] ", "BATSQLidentity;", "Returns the unique row identitfiers." ] +[ "batcalc", "identity", "pattern batcalc.identity(b:bat[:any], s:oid) (resb:bat[:oid], ns:oid) ", "PBATSQLidentity;", "Returns the unique row identitfiers." ] [ "batcalc", "ifthenelse", "pattern batcalc.ifthenelse(b:bat[:bit], b1:bat[:any_1], b2:bat[:any_1]):bat[:any_1] ", "CMDifthen;", "If-then-else operation to assemble a conditional result" ] [ "batcalc", "ifthenelse", "pattern batcalc.ifthenelse(b:bat[:bit], b1:bat[:any_1], v2:any_1):bat[:any_1] ", "CMDifthen;", "If-then-else operation to assemble a conditional result" ] [ "batcalc", "ifthenelse", "pattern batcalc.ifthenelse(b:bat[:bit], v1:any_1, b2:bat[:any_1]):bat[:any_1] ", "CMDifthen;", "If-then-else operation to assemble a conditional result" ] @@ -12836,7 +12836,7 @@ stdout of test 'MAL-signatures` in direc [ "calc", "hash", "pattern calc.hash(v:lng):lng ", "MKEYhash;", "" ] [ "calc", "hash", "pattern calc.hash(v:oid):lng ", "MKEYhash;", "" ] [ "calc", "hash", "pattern calc.hash(v:sht):lng ", "MKEYhash;", "" ] -[ "calc", "identity", "command calc.identity(X_0:any_2):oid ", "SQLidentity;", "Returns a unique row identitfier." ] +[ "calc", "identity", "command calc.identity(X_0:any):oid ", "SQLidentity;", "Returns a unique row identitfier." ] [ "calc", "ifthenelse", "pattern calc.ifthenelse(b:bit, t:any_1, f:any_1):any_1 ", "CALCswitchbit;", "If VALUE is true return MIDDLE else RIGHT" ] [ "calc", "index", "command calc.index(v:str, u:bit):bte ", "STRindex_bte;", "Return the offsets as an index bat" ] [ "calc", "index", "command calc.index(v:str, u:bit):int ", "STRindex_int;", "Return the offsets as an index bat" ] diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.37.7) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender <sjo...@acm.org> Fri, 29 May 2020 12:21:47 +0200 + monetdb (11.37.5) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=20:2:0 +GDK_VERSION=20:3:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=12:4:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=29:2:0 +MONETDB5_VERSION=29:3:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=13:5:0 diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c --- a/monetdb5/modules/atoms/mtime.c +++ b/monetdb5/modules/atoms/mtime.c @@ -768,28 +768,6 @@ MTIMElocal_timezone_msec(lng *ret) return MAL_SUCCEED; } -str -MTIMEstr_to_date(date *ret, const char *const *s, const char *const *format) -{ - struct tm tm = (struct tm) {0}; - time_t t; - - if (strNil(*s) || strNil(*format)) { - *ret = date_nil; - return MAL_SUCCEED; - } - t = time(NULL); - localtime_r(&t, &tm); - tm.tm_sec = tm.tm_min = tm.tm_hour = 0; - if (strptime(*s, *format, &tm) == NULL) - throw(MAL, "mtime.str_to_date", "format '%s', doesn't match date '%s'", - *format, *s); - *ret = date_create(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); - if (is_date_nil(*ret)) - throw(MAL, "mtime.str_to_date", "bad date '%s'", *s); - return MAL_SUCCEED; -} - static str timestamp_to_str(str *ret, const timestamp *d, const char *const *format, const char *type, const char *malfunc) @@ -825,44 +803,8 @@ timestamp_to_str(str *ret, const timesta return MAL_SUCCEED; } -str -MTIMEdate_to_str(str *ret, const date *d, const char *const *format) -{ - timestamp ts = timestamp_create(*d, timestamp_daytime(timestamp_current())); - return timestamp_to_str(ret, &ts, format, "date", "mtime.date_to_str"); -} - -str -MTIMEstr_to_time(daytime *ret, const char *const *s, const char *const *format) -{ - struct tm tm = (struct tm) {0}; - time_t t; - - if (strNil(*s) || strNil(*format)) { - *ret = daytime_nil; - return MAL_SUCCEED; - } - t = time(NULL); - localtime_r(&t, &tm); - tm.tm_sec = tm.tm_min = tm.tm_hour = 0; - if (strptime(*s, *format, &tm) == NULL) - throw(MAL, "mtime.str_to_time", "format '%s', doesn't match time '%s'", - *format, *s); - *ret = daytime_create(tm.tm_hour, tm.tm_min, tm.tm_sec == 60 ? 59 : tm.tm_sec, 0); - if (is_daytime_nil(*ret)) - throw(MAL, "mtime.str_to_time", "bad time '%s'", *s); - return MAL_SUCCEED; -} - -str -MTIMEtime_to_str(str *ret, const daytime *d, const char *const *format) -{ - timestamp ts = timestamp_create(timestamp_date(timestamp_current()), *d); - return timestamp_to_str(ret, &ts, format, "time", "mtime.time_to_str"); -} - -str -MTIMEstr_to_timestamp(timestamp *ret, const char *const *s, const char *const *format) +static str +str_to_timestamp(timestamp *ret, const char *const *s, const char *const *format, const char *type, const char *malfunc) { struct tm tm = (struct tm) {0}; time_t t; @@ -876,8 +818,8 @@ MTIMEstr_to_timestamp(timestamp *ret, co tm.tm_sec = tm.tm_min = tm.tm_hour = 0; tm.tm_isdst = -1; if (strptime(*s, *format, &tm) == NULL) - throw(MAL, "mtime.str_to_timestamp", - "format '%s', doesn't match timestamp '%s'", *format, *s); + throw(MAL, malfunc, + "format '%s', doesn't match %s '%s'", *format, type, *s); *ret = timestamp_create(date_create(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday), @@ -904,11 +846,53 @@ MTIMEstr_to_timestamp(timestamp *ret, co *ret = timestamp_add_usec(*ret, -tz * LL_CONSTANT(1000000)); } if (is_timestamp_nil(*ret)) - throw(MAL, "mtime.str_to_timestamp", "bad timestamp '%s'", *s); + throw(MAL, malfunc, "bad %s '%s'", type, *s); + return MAL_SUCCEED; +} + +str +MTIMEstr_to_date(date *ret, const char *const *s, const char *const *format) +{ + timestamp ts; + str msg = str_to_timestamp(&ts, s, format, "date", "mtime.str_to_date"); + if (msg != MAL_SUCCEED) + return msg; + *ret = timestamp_date(ts); return MAL_SUCCEED; } str +MTIMEdate_to_str(str *ret, const date *d, const char *const *format) +{ + timestamp ts = timestamp_create(*d, timestamp_daytime(timestamp_current())); + return timestamp_to_str(ret, &ts, format, "date", "mtime.date_to_str"); +} + +str +MTIMEstr_to_time(daytime *ret, const char *const *s, const char *const *format) +{ + timestamp ts; + str msg = str_to_timestamp(&ts, s, format, "time", "mtime.str_to_time"); + if (msg != MAL_SUCCEED) + return msg; + *ret = timestamp_daytime(ts); + return MAL_SUCCEED; +} + +str +MTIMEtime_to_str(str *ret, const daytime *d, const char *const *format) +{ + timestamp ts = timestamp_create(timestamp_date(timestamp_current()), *d); + return timestamp_to_str(ret, &ts, format, "time", "mtime.time_to_str"); +} + +str +MTIMEstr_to_timestamp(timestamp *ret, const char *const *s, const char *const *format) +{ + return str_to_timestamp(ret, s, format, "timestamp", "mtime.str_to_timestamp"); +} + +str MTIMEtimestamp_to_str(str *ret, const timestamp *d, const char *const *format) { return timestamp_to_str(ret, d, format, diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c --- a/sql/backends/monet5/sql_user.c +++ b/sql/backends/monet5/sql_user.c @@ -522,8 +522,12 @@ monet5_user_set_def_schema(mvc *m, oid u users_schema = find_sql_column(user_info, "default_schema"); rid = table_funcs.column_find_row(m->session->tr, users_name, username, NULL); - if (is_oid_nil(rid)) + if (is_oid_nil(rid)) { + if (m->session->tr->active && (other = mvc_rollback(m, 0, NULL, false)) != MAL_SUCCEED) + freeException(other); + GDKfree(username); return NULL; + } p = table_funcs.column_find_value(m->session->tr, users_schema, rid); assert(p); diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -6440,8 +6440,8 @@ set schema "sys"; # 15:17:55 > #select 1; -% . # table_name -% single_value # name +% .%2 # table_name +% %2 # name % tinyint # type % 1 # length [ 1 ] diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 @@ -6440,8 +6440,8 @@ set schema "sys"; # 15:17:55 > #select 1; -% . # table_name -% single_value # name +% .%2 # table_name +% %2 # name % tinyint # type % 1 # length [ 1 ] diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out --- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out +++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out @@ -5626,8 +5626,8 @@ set schema "sys"; # 15:55:37 > #select 1; -% . # table_name -% single_value # name +% .%2 # table_name +% %2 # name % tinyint # type % 1 # length [ 1 ] diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit --- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit +++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit @@ -5626,8 +5626,8 @@ set schema "sys"; # 16:02:52 > _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list