Changeset: d9691b2657a4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d9691b2657a4 Modified Files: clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test monetdb5/modules/atoms/str.c monetdb5/modules/atoms/str.h monetdb5/modules/kernel/batstr.c Branch: ascii-flag Log Message:
Merge with default branch. diffs (truncated from 5629 to 300 lines): diff --git a/clients/ChangeLog.Dec2023 b/clients/ChangeLog.Dec2023 --- a/clients/ChangeLog.Dec2023 +++ b/clients/ChangeLog.Dec2023 @@ -1,3 +1,8 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Wed Mar 6 2024 Sjoerd Mullender <sjo...@acm.org> +- Fixed an issue where mclient wouldn't exit if the server it had + connected to exited for whatever reason while the client was waiting + for a query result. + diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -50692,17 +50692,7 @@ str contains pattern str.contains(X_0:str, X_1:str, X_2:bit):bit STRcontains; -Check if string chaystack contains string needle, icase flag. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output + icase. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output. +Check if string haystack contains string needle, icase flag. str containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) @@ -50710,10 +50700,20 @@ STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output + icase. +str +containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output. +str containsselect pattern str.containsselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRcontainsselect; @@ -50735,25 +50735,25 @@ STRendswith; Check if string ends with substring, icase flag. str endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output + icase. -str -endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output. -str -endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output + icase. +str +endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output. +str endswithselect pattern str.endswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRendswithselect; @@ -50900,25 +50900,25 @@ STRstartswith; Check if string starts with substring, icase flag. str startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output + icase. -str -startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output. -str -startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output + icase. +str +startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output. +str startswithselect pattern str.startswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRstartswithselect; diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -39017,17 +39017,7 @@ str contains pattern str.contains(X_0:str, X_1:str, X_2:bit):bit STRcontains; -Check if string chaystack contains string needle, icase flag. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output + icase. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output. +Check if string haystack contains string needle, icase flag. str containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) @@ -39035,10 +39025,20 @@ STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output + icase. +str +containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output. +str containsselect pattern str.containsselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRcontainsselect; @@ -39060,25 +39060,25 @@ STRendswith; Check if string ends with substring, icase flag. str endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output + icase. -str -endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output. -str -endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output + icase. +str +endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output. +str endswithselect pattern str.endswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRendswithselect; @@ -39225,25 +39225,25 @@ STRstartswith; Check if string starts with substring, icase flag. str startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output + icase. -str -startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output. -str -startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output + icase. +str +startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output. +str startswithselect pattern str.startswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRstartswithselect; diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -1673,7 +1673,7 @@ finish_handle(MapiHdl hdl) if (hdl == NULL) return MERROR; mid = hdl->mid; - if (mid->active == hdl && !hdl->needmore && + if (mid->active == hdl && !hdl->needmore && !mnstr_eof(mid->from) && read_into_cache(hdl, 0) != MOK) return MERROR; if (mid->to) { @@ -3421,7 +3421,7 @@ read_into_cache(MapiHdl hdl, int lookahe line = read_line(mid); if (line == NULL) { if (mid->from && mnstr_eof(mid->from)) { - return mapi_setError(mid, "unexpected end of file", __func__, MERROR); + return mapi_setError(mid, "unexpected end of file", __func__, MTIMEOUT); } return mid->error; diff --git a/clients/odbc/driver/SQLGetTypeInfo.c b/clients/odbc/driver/SQLGetTypeInfo.c --- a/clients/odbc/driver/SQLGetTypeInfo.c +++ b/clients/odbc/driver/SQLGetTypeInfo.c @@ -716,8 +716,8 @@ static const struct types { .type_name = "interval year", .data_type = SQL_INTERVAL_YEAR, /* 101 */ .column_size = 9, - .literal_prefix = "''''", - .literal_suffix = "''''", + .literal_prefix = "'interval '''", + .literal_suffix = "''' year'", .create_params = "NULL", .nullable = SQL_NULLABLE, .case_sensitive = SQL_FALSE, @@ -737,8 +737,8 @@ static const struct types { .type_name = "interval month", .data_type = SQL_INTERVAL_MONTH, /* 102 */ .column_size = 10, - .literal_prefix = "''''", - .literal_suffix = "''''", + .literal_prefix = "'interval '''", + .literal_suffix = "''' month'", .create_params = "NULL", .nullable = SQL_NULLABLE, .case_sensitive = SQL_FALSE, @@ -758,8 +758,8 @@ static const struct types { .type_name = "interval day", .data_type = SQL_INTERVAL_DAY, /* 103 */ .column_size = 5, - .literal_prefix = "''''", - .literal_suffix = "''''", + .literal_prefix = "'interval '''", + .literal_suffix = "''' day'", .create_params = "NULL", .nullable = SQL_NULLABLE, .case_sensitive = SQL_FALSE, @@ -779,8 +779,8 @@ static const struct types { _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org