Changeset: e9b295ddfb8c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e9b295ddfb8c
Modified Files:
        gdk/gdk_logger.c
        sql/backends/monet5/sql_scenario.c
        sql/storage/store.c
Branch: insertonly
Log Message:

Merge with default.


diffs (truncated from 3024 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -809,3 +809,4 @@ 79dbf838f04483a2d9ccce8332090ff91b18caec
 79dbf838f04483a2d9ccce8332090ff91b18caec Jun2023_release
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_5
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release
+ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7
diff --git a/ChangeLog-Archive b/ChangeLog-Archive
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -1,6 +1,15 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Wed Aug 30 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.7-20230925
+- Do a lot more error checking, mostly for allocation failures.  More is
+  still needed, though.
+
+* Thu Aug 10 2023 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.47.7-20230925
+- Improve performance of the ILIKE operator when the pattern contains only
+  ASCII characters. In this case we do not need to treat any characters as
+  UTF-8 and we can use much faster routines that perform byte comparisons.
+
 * Wed Jan 12 2022 Sjoerd Mullender <sjo...@acm.org> - 11.43.5-20220118
 - A couple of concurrency issues have been fixed.
 
diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,12 +1,3 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Wed Aug 30 2023 Sjoerd Mullender <sjo...@acm.org>
-- Do a lot more error checking, mostly for allocation failures.  More is
-  still needed, though.
-
-* Thu Aug 10 2023 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com>
-- Improve performance of the ILIKE operator when the pattern contains only
-  ASCII characters. In this case we do not need to treat any characters as
-  UTF-8 and we can use much faster routines that perform byte comparisons.
-
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -89,7 +89,7 @@ Group: Applications/Databases
 License: MPL-2.0
 URL: https://www.monetdb.org/
 BugURL: https://github.com/MonetDB/MonetDB/issues
-Source: 
https://www.monetdb.org/downloads/sources/Jun2023-SP1/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Jun2023-SP2/%{name}-%{version}.tar.bz2
 
 # The Fedora packaging document says we need systemd-rpm-macros for
 # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7
@@ -860,6 +860,45 @@ fi
 %endif
 
 %changelog
+* Mon Sep 25 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.7-20230925
+- Rebuilt.
+- GH#7094: Drop remote tables in transactions and rollback
+- GH#7303: Improve the performance of multi-column filters
+- GH#7400: VM max memory is not check correctly for cgroups v2
+- GH#7401: Column aliases used incorrectly in UNION subqueries
+- GH#7402: Privileges on merge table not propagated to partition tables
+
+* Fri Sep 22 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.7-20230925
+- gdk: Fixed a number of data races (race conditions).
+
+* Mon Sep 18 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.7-20230925
+- gdk: Fixed a reference counting problem when a BAT could nog be loaded,
+  e.g. because of resource limitations.
+
+* Wed Aug 30 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.7-20230925
+- gdk: Only check for virtual memory limits when creating or growing bats,
+  not for general memory allocations.  There is (still) too much code
+  that doesn't properly handle failing allocations, so we need to avoid
+  those as much as possible.  This has mostly an effect if there are
+  virtual memory size restrictions imposed by cgroups (memory.swap.max
+  in cgroups v2, memory.memsw.limit_in_bytes in cgroups v1).
+- gdk: The low-level commit turned out to always commit every persistent bat
+  in the system.  There is no need for that, it should only commit bats
+  that were changed.  This has now been fixed.
+- gdk: Implemented timeout/exit checks in a bunch more operators.  Long(er)
+  running operators occasionally check whether they're taking too long
+  (past a user-specified timeout) or whether the server is exiting.
+  This is now done in more places.
+
+* Wed Aug 30 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.7-20230925
+- MonetDB: Do a lot more error checking, mostly for allocation failures.  More 
is
+  still needed, though.
+
+* Thu Aug 10 2023 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.47.7-20230925
+- MonetDB: Improve performance of the ILIKE operator when the pattern contains 
only
+  ASCII characters. In this case we do not need to treat any characters as
+  UTF-8 and we can use much faster routines that perform byte comparisons.
+
 * Tue Jul 18 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.5-20230718
 - Rebuilt.
 - GH#7388: Query results in large cross product
diff --git a/clients/mapiclient/dotmonetdb.c b/clients/mapiclient/dotmonetdb.c
--- a/clients/mapiclient/dotmonetdb.c
+++ b/clients/mapiclient/dotmonetdb.c
@@ -158,3 +158,14 @@ parse_dotmonetdb(DotMonetdb *dotfile)
                fclose(config);
        }
 }
+
+void
+destroy_dotmonetdb(DotMonetdb *dotfile)
+{
+       free(dotfile->user);
+       free(dotfile->passwd);
+       free(dotfile->dbname);
+       free(dotfile->host);
+       free(dotfile->output);
+       free(dotfile->language);
+}
diff --git a/clients/mapiclient/dotmonetdb.h b/clients/mapiclient/dotmonetdb.h
--- a/clients/mapiclient/dotmonetdb.h
+++ b/clients/mapiclient/dotmonetdb.h
@@ -21,3 +21,4 @@ typedef struct DotMonetdb {
 } DotMonetdb;
 
 extern void parse_dotmonetdb(DotMonetdb *dotfile);
+extern void destroy_dotmonetdb(DotMonetdb *dotfile);
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -2667,13 +2667,17 @@ dump_database(Mapi mid, stream *toConsol
                  "AND grantor <> 0 "
                "ORDER BY name";
        const char *grants =
+               /* all grants granting roles to users excepting the default 
role */
                "SELECT a1.name, "
                       "a2.name "
                "FROM sys.auths a1, "
                     "sys.auths a2, "
-                    "sys.user_role ur "
+                    "sys.user_role ur, "
+                    "sys.db_user_info ui "
                "WHERE a1.id = ur.login_id "
                  "AND a2.id = ur.role_id "
+                 "AND a1.name = ui.name "
+                 "AND a2.id <> ui.default_role "
                "ORDER BY a1.name, a2.name";
        const char *table_grants =
                "SELECT s.name, t.name, "
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -69,7 +69,7 @@ static stream *toConsole;
 static stream *stdout_stream;
 static stream *stderr_stream;
 static stream *fromConsole = NULL;
-static char *language = NULL;
+static const char *language = NULL;
 static char *logfile = NULL;
 static char promptbuf[16];
 static bool echoquery = false;
@@ -2034,32 +2034,32 @@ doRequest(Mapi mid, const char *buf)
        return errseen;
 }
 
-#define CHECK_RESULT(mid, hdl, buf, fp)                                \
-       switch (mapi_error(mid)) {                              \
-       case MOK:       /* everything A OK */                   \
-               break;                                          \
+#define CHECK_RESULT(mid, hdl, buf, fp)                                        
        \
+       switch (mapi_error(mid)) {                                              
                \
+       case MOK:       /* everything A OK */                                   
        \
+               break;                                                          
                                \
        case MERROR:    /* some error, but try to continue */   \
-       case MTIMEOUT:  /* lost contact with the server */      \
-               if (formatter == TABLEformatter) {              \
-                       mapi_noexplain(mid, "");                \
-               } else {                                        \
-                       mapi_noexplain(mid, NULL);              \
-               }                                               \
-               if (hdl) {                                      \
-                       mapi_explain_query(hdl, stderr);        \
-                       mapi_close_handle(hdl);                 \
-                       hdl = NULL;                             \
-               } else                                          \
-                       mapi_explain(mid, stderr);              \
-               errseen = true;                                 \
-               if (mapi_error(mid) == MERROR)                  \
-                       continue; /* why not in do-while */     \
-               timerEnd();                                     \
-               if (buf)                                        \
-                       free(buf);                              \
-               if (fp)                                         \
-                       close_stream(fp);                       \
-               return 1;                                       \
+       case MTIMEOUT:  /* lost contact with the server */              \
+               if (formatter == TABLEformatter) {                              
        \
+                       mapi_noexplain(mid, "");                                
                \
+               } else {                                                        
                                \
+                       mapi_noexplain(mid, NULL);                              
                \
+               }                                                               
                                        \
+               if (hdl) {                                                      
                                \
+                       mapi_explain_query(hdl, stderr);                        
        \
+                       mapi_close_handle(hdl);                                 
                \
+                       hdl = NULL;                                             
                                \
+               } else                                                          
                                \
+                       mapi_explain(mid, stderr);                              
                \
+               errseen = true;                                                 
                        \
+               if (mapi_error(mid) == MERROR)                                  
        \
+                       continue; /* why not in do-while */                     
        \
+               timerEnd();                                                     
                                \
+               if (buf)                                                        
                                \
+                       free(buf);                                              
                                \
+               if (fp)                                                         
                                \
+                       close_stream(fp);                                       
                        \
+               return 1;                                                       
                                \
        }
 
 static bool
@@ -3198,12 +3198,12 @@ main(int argc, char **argv)
 #endif
 {
        int port = 0;
-       char *user = NULL;
-       char *passwd = NULL;
-       char *host = NULL;
-       char *command = NULL;
-       char *dbname = NULL;
-       char *output = NULL;    /* output format as string */
+       const char *user = NULL;
+       const char *passwd = NULL;
+       const char *host = NULL;
+       const char *command = NULL;
+       const char *dbname = NULL;
+       const char *output = NULL;      /* output format as string */
        DotMonetdb dotfile = {0};
        stream *s = NULL;
        bool trace = false;
@@ -3321,7 +3321,7 @@ main(int argc, char **argv)
                        mode = MAL;
                }
        } else {
-               language = strdup("sql");
+               language = "sql";
                mode = SQL;
        }
 
@@ -3345,9 +3345,7 @@ main(int argc, char **argv)
                        break;
                case 'd':
                        assert(optarg);
-                       if (dbname)
-                               free(dbname);
-                       dbname = strdup(optarg);
+                       dbname = optarg;
                        break;
                case 'D':
                        dump = true;
@@ -3363,9 +3361,7 @@ main(int argc, char **argv)
 #endif
                case 'f':
                        assert(optarg);
-                       if (output != NULL)
-                               free(output);
-                       output = strdup(optarg);        /* output format */
+                       output = optarg;        /* output format */
                        break;
                case 'h':
                        assert(optarg);
@@ -3383,17 +3379,14 @@ main(int argc, char **argv)
                        if (strcmp(optarg, "sql") == 0 ||
                            strcmp(optarg, "sq") == 0 ||
                            strcmp(optarg, "s") == 0) {
-                               free(language);
-                               language = strdup(optarg);
+                               language = "sql";
                                mode = SQL;
                        } else if (strcmp(optarg, "mal") == 0 ||
                                   strcmp(optarg, "ma") == 0) {
-                               free(language);
-                               language = strdup("mal");
+                               language = "mal";
                                mode = MAL;
                        } else if (strcmp(optarg, "msql") == 0) {
-                               free(language);
-                               language = strdup("msql");
+                               language = "msql";
                                mode = MAL;
                        } else {
                                mnstr_printf(stderr_stream, "language option 
needs to be sql or mal\n");
@@ -3417,9 +3410,7 @@ main(int argc, char **argv)
                        break;
                case 'P':
                        assert(optarg);
-                       if (passwd)
-                               free(passwd);
-                       passwd = strdup(optarg);
+                       passwd = optarg;
                        passwd_set_as_flag = true;
                        break;
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to