Changeset: 42aca56dd9f3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=42aca56dd9f3
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql_upgrades.c
        sql/server/rel_optimizer.c
        sql/test/miscellaneous/Tests/groupby_error.stable.out
Branch: unlock
Log Message:

Merge with default branch.


diffs (truncated from 2446 to 300 lines):

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 11.38.0
+current_version = 11.40.0
 commit = False
 tag = False
 
@@ -11,10 +11,6 @@ serialize = set(MONETDB_VERSION_MAJOR "{
 search = %global version {current_version}
 replace = %global version {new_version}
 
-[bumpversion:file:NT/rules.msc]
-
-[bumpversion:file:NT/monetdb_config.h.in]
-
 [bumpversion:file:gdk/libbat.rc]
 parse = (?P<major>\d+),(?P<minor>\d+),(?P<patch>\d+)
 serialize = {major},{minor},{patch}
@@ -34,3 +30,4 @@ serialize = {major},{minor},{patch}
 [bumpversion:file:monetdb5/tools/libmonetdb5.rc]
 parse = (?P<major>\d+),(?P<minor>\d+),(?P<patch>\d+)
 serialize = {major},{minor},{patch}
+
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -780,3 +780,4 @@ 1e3bd8cd485a0880a7557aa5307e986a210a1e00
 bb157905ecb86908dcfb112d102a8c6152557b5d Jun2020_11
 1e3bd8cd485a0880a7557aa5307e986a210a1e00 Jun2020_SP1_release
 bb157905ecb86908dcfb112d102a8c6152557b5d Jun2020_SP1_release
+94231c85384d893701beeeb69996f57c70fade4d Oct2020_root
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,3 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Wed Jun 10 2020 Sjoerd Mullender <sjo...@acm.org>
-- Removed support for LiDAR data, that is the SQL procedures
-  sys.lidarattach, sys.lidarload, and sys.lidarexport.
-
-* Thu Apr  2 2020 Martin Kersten <m...@cwi.nl>
-- The sys.queue() has been turned into a circular buffer to allow for
-  inspection of both active, paused and recently executed queries.
-
diff --git a/ChangeLog b/ChangeLog.Oct2020
copy from ChangeLog
copy to ChangeLog.Oct2020
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %global name MonetDB
-%global version 11.38.0
+%global version 11.40.0
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # Use bcond_with to add a --with option; i.e., "without" is default.
diff --git a/clients/ChangeLog b/clients/ChangeLog.Oct2020
copy from clients/ChangeLog
copy to clients/ChangeLog.Oct2020
diff --git a/clients/mapiclient/ReadlineTools.c 
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -291,10 +291,6 @@ continue_completion(rl_completion_func_t
        rl_attempted_completion_function = func;
 }
 
-#ifndef BUFSIZ
-#define BUFSIZ 1024
-#endif
-
 static void
 readline_show_error(const char *msg) {
        rl_save_prompt();
@@ -303,13 +299,19 @@ readline_show_error(const char *msg) {
        rl_clear_message();
 }
 
+#ifndef BUFFER_SIZE
+#define BUFFER_SIZE 1024
+#endif
+
 static int
 invoke_editor(int cnt, int key) {
        char template[] = "/tmp/mclient_temp_XXXXXX";
-       char cmd[BUFSIZ];
-       char *editor;
+       char editor_command[BUFFER_SIZE];
+       char *read_buff = NULL;
+       char *editor = NULL;
        FILE *fp;
-       size_t cmd_len;
+       size_t content_len;
+       size_t read_bytes, idx;
 
        (void) cnt;
        (void) key;
@@ -324,35 +326,64 @@ invoke_editor(int cnt, int key) {
        fflush(fp);
 
        editor = getenv("VISUAL");
-       if (!editor) {
+       if (editor == NULL) {
                editor = getenv("EDITOR");
-               if (!editor) {
+               if (editor == NULL) {
                        readline_show_error("invoke_editor: EDITOR/VISUAL env 
variable not set\n");
                        goto bailout;
                }
        }
 
-       snprintf(cmd, BUFSIZ, "%s %s", editor, template);
-       if (system(cmd) != 0) {
+       snprintf(editor_command, BUFFER_SIZE, "%s %s", editor, template);
+       if (system(editor_command) != 0) {
                readline_show_error("invoke_editor: Starting editor failed\n");
                goto bailout;
        }
 
-       fseek(fp, 0, SEEK_SET);
-       cmd_len = fread(cmd, sizeof(char), BUFSIZ, fp);
-       fclose(fp);
+       fseek(fp, 0L, SEEK_END);
+       content_len = ftell(fp);
+       rewind(fp);
+
+       if (content_len > 0) {
+               read_buff = (char *)malloc(content_len*sizeof(char));
+               if (read_buff == NULL) {
+                       readline_show_error("invoke_editor: Cannot allocate 
memory\n");
+                       goto bailout;
+               }
+
+               read_bytes = fread(read_buff, sizeof(char), content_len, fp);
+               if (read_bytes != content_len) {
+                       readline_show_error("invoke_editor: Did not read from 
file correctly\n");
+                       goto bailout;
+               }
 
-       *(cmd + cmd_len) = 0;
+               *(read_buff + read_bytes) = 0;
+
+               /* Remove trailing whitespace */
+               idx = read_bytes - 1;
+               while(isspace(*(read_buff + idx))) {
+                       *(read_buff + idx) = 0;
+                       idx--;
+               }
 
-       rl_replace_line(cmd, 0);
-       rl_point = cmd_len - 1;
+               rl_replace_line(read_buff, 0);
+               rl_point = idx + 1;  // place the point one character after the 
end of the string
 
+               free(read_buff);
+       } else {
+               rl_replace_line("", 0);
+               rl_point = 0;
+       }
+
+       fclose(fp);
        unlink(template);
 
        return 0;
 
 bailout:
        fclose(fp);
+       free(read_buff);
+       unlink(template);
        return 1;
 }
 
@@ -375,7 +406,8 @@ init_readline(Mapi mid, const char *lang
                rl_attempted_completion_function = mal_completion;
        }
 
-       rl_bind_key(024, invoke_editor);
+       rl_add_funmap_entry("invoke-editor", invoke_editor);
+       rl_bind_keyseq("\\M-e", invoke_editor);
 
        if (save_history) {
                int len;
diff --git a/clients/mapilib/ChangeLog b/clients/mapilib/ChangeLog.Oct2020
copy from clients/mapilib/ChangeLog
copy to clients/mapilib/ChangeLog.Oct2020
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
 #define sversion(major,minor,patch)    #major "." #minor "." #patch "\0"
 
 1 VERSIONINFO
-  FILEVERSION version(11,38,0)
-  PRODUCTVERSION version(11,38,0)
+  FILEVERSION version(11,40,0)
+  PRODUCTVERSION version(11,40,0)
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -21,14 +21,14 @@ BEGIN
       VALUE "Comments", "\0"
       VALUE "CompanyName", "MonetDB B.V.\0"
       VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-      VALUE "FileVersion", sversion(11,38,0)
+      VALUE "FileVersion", sversion(11,40,0)
       VALUE "InternalName", "Mapi\0"
       VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2020\0"
       VALUE "LegalTrademarks", "\0"
       VALUE "OriginalFilename", "Mapi.dll\0"
       VALUE "PrivateBuild", "\0"
       VALUE "ProductName", "MonetDB Client Libraries\0"
-      VALUE "ProductVersion", sversion(11,38,0)
+      VALUE "ProductVersion", sversion(11,40,0)
       VALUE "SpecialBuild", "\0"
     END
   END
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
 #define sversion(major,minor,patch)    #major "." #minor "." #patch "\0"
 
 1 VERSIONINFO
-  FILEVERSION version(11,38,0)
-  PRODUCTVERSION version(11,38,0)
+  FILEVERSION version(11,40,0)
+  PRODUCTVERSION version(11,40,0)
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -21,14 +21,14 @@ BEGIN
       VALUE "Comments", "\0"
       VALUE "CompanyName", "MonetDB B.V.\0"
       VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-      VALUE "FileVersion", sversion(11,38,0)
+      VALUE "FileVersion", sversion(11,40,0)
       VALUE "InternalName", "libMonetODBC\0"
       VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2020\0"
       VALUE "LegalTrademarks", "\0"
       VALUE "OriginalFilename", "libMonetODBC.dll\0"
       VALUE "PrivateBuild", "\0"
       VALUE "ProductName", "MonetDB SQL Server\0"
-      VALUE "ProductVersion", sversion(11,38,0)
+      VALUE "ProductVersion", sversion(11,40,0)
       VALUE "SpecialBuild", "\0"
     END
   END
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -65,8 +65,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION version(11,38,0)
- PRODUCTVERSION version(11,38,0)
+ FILEVERSION version(11,40,0)
+ PRODUCTVERSION version(11,40,0)
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -83,12 +83,12 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "MonetDB B.V."
             VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-            VALUE "FileVersion", sversion(11,38,0)
+            VALUE "FileVersion", sversion(11,40,0)
             VALUE "InternalName", "libMonetODBCs.dll"
             VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2020"
             VALUE "OriginalFilename", "libMonetODBCs.dll"
             VALUE "ProductName", "MonetDB SQL Server"
-            VALUE "ProductVersion", sversion(11,38,0)
+            VALUE "ProductVersion", sversion(11,40,0)
         END
     END
     BLOCK "VarFileInfo"
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -7,7 +7,7 @@
 #]]
 
 set(MONETDB_VERSION_MAJOR "11")
-set(MONETDB_VERSION_MINOR "38")
+set(MONETDB_VERSION_MINOR "40")
 set(MONETDB_VERSION_PATCH "0")
 
 if(RELEASE_VERSION)
diff --git a/common/stream/ChangeLog b/common/stream/ChangeLog.Oct2020
copy from common/stream/ChangeLog
copy to common/stream/ChangeLog.Oct2020
diff --git a/common/stream/Tests/All b/common/stream/Tests/All
--- a/common/stream/Tests/All
+++ b/common/stream/Tests/All
@@ -1,13 +1,13 @@
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to