Changeset: 1803eec01444 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1803eec01444
Branch: octbugs
Log Message:

Merged with Oct2020


diffs (114 lines):

diff --git a/cmake/monetdb-functions.cmake b/cmake/monetdb-functions.cmake
--- a/cmake/monetdb-functions.cmake
+++ b/cmake/monetdb-functions.cmake
@@ -9,7 +9,13 @@
 function(monetdb_hg_revision)
   # Get the current version control revision
   if(EXISTS "${CMAKE_SOURCE_DIR}/.hg")
-    execute_process(COMMAND "hg" "id" "-i" WORKING_DIRECTORY 
"${CMAKE_SOURCE_DIR}" RESULT_VARIABLE HG_RETURN_CODE
+    find_package(Hg)
+    if(HG_FOUND)
+      message("hg found: ${HG_EXECUTABLE}")
+    else()
+      message(FATAL_ERROR "Failed to find mercurial")
+    endif()
+    execute_process(COMMAND "${HG_EXECUTABLE}" "id" "-i" WORKING_DIRECTORY 
"${CMAKE_SOURCE_DIR}" RESULT_VARIABLE HG_RETURN_CODE
       OUTPUT_VARIABLE HG_OUPUT_RES OUTPUT_STRIP_TRAILING_WHITESPACE)
     if(HG_RETURN_CODE EQUAL 0 AND HG_OUPUT_RES)
       set(MERCURIAL_ID "${HG_OUPUT_RES}" PARENT_SCOPE)
@@ -17,7 +23,13 @@ function(monetdb_hg_revision)
       message(FATAL_ERROR "Failed to find mercurial ID")
     endif()
   elseif(EXISTS "${CMAKE_SOURCE_DIR}/.git")
-    execute_process(COMMAND "git" "rev-parse" "--short" "HEAD" 
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+    find_package(Git)
+    if(GIT_FOUND)
+      message("git found: ${GIT_EXECUTABLE}")
+    else()
+      message(FATAL_ERROR "Failed to find git")
+    endif()
+    execute_process(COMMAND "${GIT_EXECUTABLE}" "rev-parse" "--short" "HEAD" 
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
       RESULT_VARIABLE GIT_RETURN_CODE OUTPUT_VARIABLE GIT_OUPUT_RES 
OUTPUT_STRIP_TRAILING_WHITESPACE)
     if(GIT_RETURN_CODE EQUAL 0 AND GIT_OUPUT_RES)
       set(MERCURIAL_ID "${GIT_OUPUT_RES}" PARENT_SCOPE)
diff --git a/documentation/source/build.rst b/documentation/source/build.rst
--- a/documentation/source/build.rst
+++ b/documentation/source/build.rst
@@ -96,6 +96,41 @@ README-Fedora .... Which version
 Windows
 =======
 
+Run as Administrator::
+
+  @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile 
-InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object 
System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && 
SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
+  choco feature enable -n allowGlobalConfirmation
+  choco install ActivePerl ant ruby python3 hg git winflexbison
+  cinst VisualStudio2017community --package-parameters "--add 
Microsoft.VisualStudio.Workload.NativeDesktop --add 
microsoft.visualstudio.component.vc.cmake.project --add 
microsoft.visualstudio.component.vc.ATLMFC"
+  refreshenv
+
+  cd \
+  git clone https://github.com/microsoft/vcpkg
+  cd vcpkg
+  bootstrap-vcpkg.bat -disableMetrics
+  vcpkg integrate install
+  # needed for 64 bits (with the available python being 64 bit this is needed)
+  set VCPKG_DEFAULT_TRIPLET=x64-windows
+  vcpkg install libiconv openssl bzip2 geos libxml2 pcre pcre2 zlib getopt
+
+To compile MonetDB (as normal user)::
+
+  hg clone http://dev.monetdb.org/hg/MonetDB/
+
+  "c:\program files (x86)\microsoft visual 
studio\2017\community\common7\tools\vsdevcmd.bat"
+  "c:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
+
+  cd MonetDB
+  mkdir build
+  cd build
+  cmake -G "Visual Studio 15 2017" 
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake 
-DCMAKE_INSTALL_PREFIX=%HOME%\install -A x64 -DTESTING=OFF ..
+  cmake -G "Visual Studio 15 2017" 
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake 
-DCMAKE_INSTALL_PREFIX=%HOME%\install -A x64 ..
+  cmake --build . --target ALL_BUILD
+  cmake --build . --target INSTALL
+  set 
PATH=%HOME%\install\bin;%HOME%\install\lib;%HOME%\install\lib\monetdb5;\vcpkg\installed\x64-windows\bin;\vcpkg\installed\x64-windows\debug\bin;%PATH%
+  cmake --build . --target RUN_TESTS
+  cmake --build . --target mtest
+
 MacOS
 =====
 
diff --git a/tools/monetdbe/monetdbe.c b/tools/monetdbe/monetdbe.c
--- a/tools/monetdbe/monetdbe.c
+++ b/tools/monetdbe/monetdbe.c
@@ -365,9 +365,9 @@ monetdbe_query_internal(monetdbe_databas
                }
 
                if (m->emode & m_prepare)
-                       ((monetdbe_result_internal*) result)->type = Q_PREPARE;
+                       (*(monetdbe_result_internal**) result)->type = 
Q_PREPARE;
                else
-                       ((monetdbe_result_internal*) result)->type = 
(b->results) ? b->results->query_type : m->type;
+                       (*(monetdbe_result_internal**) result)->type = 
(b->results) ? b->results->query_type : m->type;
        }
 
 cleanup:
@@ -380,7 +380,7 @@ cleanup:
                c->fdin = old_bstream;
        }
 
-       char* msg = commit_action(m, mdbe, result, (monetdbe_result_internal*) 
result);
+       char* msg = commit_action(m, mdbe, result, 
result?*(monetdbe_result_internal**) result:NULL);
 
        return msg;
 }
@@ -1183,6 +1183,11 @@ monetdbe_append(monetdbe_database dbhdl,
                        //-------------------------------------
                        BAT *bn = NULL;
 
+                       if (mtype != c->type.type->localtype) {
+                               mdbe->msg = createException(SQL, 
"monetdbe.monetdbe_append", "Cannot append %d into column '%s'", 
input[i]->type, c->base.name);
+                               goto cleanup;
+                       }
+
                        if ((bn = COLnew(0, mtype, 0, TRANSIENT)) == NULL) {
                                mdbe->msg = createException(SQL, 
"monetdbe.monetdbe_append", "Cannot create append column");
                                goto cleanup;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to