MonetDB: mbedded - cleanup

2020-05-17 Thread Niels Nes
Changeset: 6aa55b903b06 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6aa55b903b06
Modified Files:
tools/embedded/monetdb_embedded.h
Branch: mbedded
Log Message:

cleanup


diffs (9 lines):

diff --git a/tools/embedded/monetdb_embedded.h 
b/tools/embedded/monetdb_embedded.h
--- a/tools/embedded/monetdb_embedded.h
+++ b/tools/embedded/monetdb_embedded.h
@@ -154,4 +154,5 @@ embedded_export char* monetdb_shutdown(v
 }
 #endif
 
+
 #endif
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mbedded - make sure we return the scenarios on SQLepilogue

2020-05-17 Thread Niels Nes
Changeset: bd615452b27c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd615452b27c
Modified Files:
monetdb5/mal/mal.c
monetdb5/mal/mal_embedded.c
monetdb5/mal/mal_scenario.c
sql/backends/monet5/sql_scenario.c
Branch: mbedded
Log Message:

make sure we return the scenarios on SQLepilogue


diffs (150 lines):

diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -90,8 +90,6 @@ int mal_init(char *modules[], int embedd
  */
 void mal_reset(void)
 {
-   str err = 0;
-
GDKprepareExit();
MCstopClients(0);
dropQRYqueue();
@@ -99,6 +97,8 @@ void mal_reset(void)
stopProfiler(0);
AUTHreset();
if (!GDKinmemory()) {
+   str err = 0;
+
if ((err = msab_wildRetreat()) != NULL) {
TRC_ERROR(MAL_SERVER, "%s\n", err);
free(err);
diff --git a/monetdb5/mal/mal_embedded.c b/monetdb5/mal/mal_embedded.c
--- a/monetdb5/mal/mal_embedded.c
+++ b/monetdb5/mal/mal_embedded.c
@@ -120,7 +120,8 @@ malEmbeddedReset(void) //remove extra mo
stopProfiler(0);
AUTHreset();
if (!GDKinmemory()) {
-str err = 0;
+   str err = 0;
+
if ((err = msab_wildRetreat()) != NULL) {
TRC_ERROR(MAL_SERVER, "%s\n", err);
free(err);
@@ -129,7 +130,6 @@ malEmbeddedReset(void) //remove extra mo
TRC_ERROR(MAL_SERVER, "%s\n", err);
free(err);
}
-
}
mal_factory_reset();
mal_dataflow_reset();
diff --git a/monetdb5/mal/mal_scenario.c b/monetdb5/mal/mal_scenario.c
--- a/monetdb5/mal/mal_scenario.c
+++ b/monetdb5/mal/mal_scenario.c
@@ -194,8 +194,8 @@ findScenario(str nme)
int i;
Scenario scen = scenarioRec;
 
-   for (i = 0; i < MAXSCEN && scen->name; i++, scen++)
-   if (strcmp(scen->name, nme) == 0)
+   for (i = 0; i < MAXSCEN; i++, scen++)
+   if (scen->name && strcmp(scen->name, nme) == 0)
return scen;
return NULL;
 }
diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -222,6 +222,13 @@ SQLepilogue(void *ret)
return err;
}
}
+   /* return scenarios */
+   Scenario sc = findScenario(s);
+   if (sc)
+   sc->name = NULL;
+   sc = findScenario(m);
+   if (sc)
+   sc->name = NULL;
return MAL_SUCCEED;
 }
 
@@ -511,76 +518,6 @@ SQLinit(Client c)
freeException(other);
if (msg)
TRC_INFO(SQL_PARSER, "%s\n", msg);
-#if 0 //OLD
-   if (GDKembedded()) {
-   } else {
-   char path[FILENAME_MAX];
-   str fullname;
-   
-   snprintf(path, FILENAME_MAX, "createdb");
-   slash_2_dir_sep(path);
-   fullname = MSP_locate_sqlscript(path, 1);
-   if (fullname) {
-   str filename = fullname, p, n;
-
-   fprintf(stdout, "# SQL catalog created, loading 
sql scripts once\n");
-   do {
-   stream *fd = NULL;
-   
-   p = strchr(filename, PATH_SEP);
-   if (p)
-   *p = '\0';
-   if ((n = strrchr(filename, DIR_SEP)) == 
NULL) {
-   n = filename;
-   } else {
-   n++;
-   }
-   fprintf(stdout, "# loading sql script: 
%s\n", n);
-   fd = open_rastream(filename);
-   if (p)
-   filename = p + 1;
-   
-   if (fd) {
-   size_t sz;
-   sz = getFileSize(fd);
-   if (sz > (size_t) 1 << 29) {
-   close_stream(fd);
-   msg = 
createException(MAL, "createdb", SQLSTATE(42000) "File %s too large to 
process", filename);
-   } else {
-   bstream *bfd = NULL;
-   
-   if ((bfd = 
bst

MonetDB: mbedded - merged

2020-05-17 Thread Niels Nes
Changeset: 8b14a84dc1dc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b14a84dc1dc
Modified Files:
CMakeLists.txt
clients/examples/C/CMakeLists.txt
clients/examples/perl/CMakeLists.txt
clients/examples/php/CMakeLists.txt
clients/mapiclient/CMakeLists.txt
clients/mapilib/CMakeLists.txt
clients/odbc/driver/CMakeLists.txt
clients/odbc/samples/CMakeLists.txt
clients/odbc/setup/CMakeLists.txt
clients/odbc/winsetup/CMakeLists.txt
monetdb5/tools/CMakeLists.txt
testing/CMakeLists.txt
tools/merovingian/client/CMakeLists.txt
tools/merovingian/daemon/CMakeLists.txt
tools/merovingian/daemon/config/CMakeLists.txt
tools/mserver/CMakeLists.txt
Branch: mbedded
Log Message:

merged


diffs (truncated from 380 to 300 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,7 +216,8 @@ write_basic_package_version_file(
 
 install(FILES
   ${CMAKE_CURRENT_BINARY_DIR}/MonetDBConfig.cmake
-  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake)
+  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake
+  COMPONENT monetdbdev)
 
 include(monetdb-packages)
 
@@ -226,3 +227,5 @@ add_subdirectory(ctest)
 if(CMAKE_SUMMARY)
   monetdb_cmake_summary()
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/examples/C/CMakeLists.txt 
b/clients/examples/C/CMakeLists.txt
--- a/clients/examples/C/CMakeLists.txt
+++ b/clients/examples/C/CMakeLists.txt
@@ -45,5 +45,8 @@ if(TESTING)
 smack01
 RUNTIME
 DESTINATION
-${CMAKE_INSTALL_BINDIR})
+${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/examples/perl/CMakeLists.txt 
b/clients/examples/perl/CMakeLists.txt
--- a/clients/examples/perl/CMakeLists.txt
+++ b/clients/examples/perl/CMakeLists.txt
@@ -10,10 +10,14 @@ if(TESTING)
   install(FILES
 sqlsample.pl 
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 
   install(FILES
 malsample.pl
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/examples/php/CMakeLists.txt 
b/clients/examples/php/CMakeLists.txt
--- a/clients/examples/php/CMakeLists.txt
+++ b/clients/examples/php/CMakeLists.txt
@@ -10,5 +10,8 @@ if(TESTING)
   install(FILES
 sqlsample.php 
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/mapiclient/CMakeLists.txt 
b/clients/mapiclient/CMakeLists.txt
--- a/clients/mapiclient/CMakeLists.txt
+++ b/clients/mapiclient/CMakeLists.txt
@@ -128,4 +128,7 @@ install(TARGETS
 install(FILES
   mclient.1
   msqldump.1
-  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
+  COMPONENT mclient)
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/mapilib/CMakeLists.txt b/clients/mapilib/CMakeLists.txt
--- a/clients/mapilib/CMakeLists.txt
+++ b/clients/mapilib/CMakeLists.txt
@@ -47,8 +47,7 @@ set_target_properties(mapi
   PROPERTIES
   VERSION ${MAPI_VERSION}
   SOVERSION ${MAPI_VERSION_MAJOR}
-  PUBLIC_HEADER mapi.h 
-  PUBLIC_HEADER mapi_querytype.h)
+  PUBLIC_HEADER mapi.h)
 
 if (NOT WIN32)
   configure_file(monetdb-mapi.pc.in
@@ -82,3 +81,5 @@ install(EXPORT mapiTargets
   NAMESPACE MonetDB::
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake
   COMPONENT clientdev)
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/odbc/driver/CMakeLists.txt 
b/clients/odbc/driver/CMakeLists.txt
--- a/clients/odbc/driver/CMakeLists.txt
+++ b/clients/odbc/driver/CMakeLists.txt
@@ -117,21 +117,21 @@ target_compile_definitions(MonetODBC
 target_link_libraries(MonetODBC
   PRIVATE
   monetdb_config_header
-   mutils
-   mapi
-   ODBC::ODBC)
+  mutils
+  mapi
+  ODBC::ODBC)
 
 install(TARGETS
   MonetODBC
   RUNTIME
   DESTINATION ${CMAKE_INSTALL_BINDIR}
-  COMPONENT client
+  COMPONENT odbc
   LIBRARY
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  COMPONENT client
+  COMPONENT odbc
   ARCHIVE
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  COMPONENT client
+  COMPONENT odbc
   PUBLIC_HEADER
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
   COMPONENT clientdev
diff --git a/clients/odbc/samples/CMakeLists.txt 
b/clients/odbc/samples/CMakeLists.txt
--- a/clients/odbc/samples/CMakeLists.txt
+++ b/clients/odbc/samples/CMakeLists.txt
@@ -43,5 +43,8 @@ if(TESTING)
 testStmtAttr
 RUNTIME
 DESTINATION
-${CMAKE_INSTALL_BINDIR})
+${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/odbc/setup/CMakeLists.txt 
b/clients/odbc/setup/CMakeLists.txt
--- a/clients/odbc/setup/CMakeLis

MonetDB: mbedded - also call mvc_export_affrows (just don't outp...

2020-05-17 Thread Niels Nes
Changeset: e742a9c2616a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e742a9c2616a
Modified Files:
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_result.c
Branch: mbedded
Log Message:

also call mvc_export_affrows (just don't output anything)


diffs (25 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -6063,8 +6063,7 @@ output_rel_bin(backend *be, sql_rel *rel
be->cur_append = 0;
be->first_statement_generated = false;
}
-   if (!GDKembedded())
-   s = stmt_affected_rows(be, s);
+   s = stmt_affected_rows(be, s);
}
return s;
 }
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -2112,6 +2112,8 @@ mvc_export_affrows(backend *b, stream *s
 
m->rowcnt = val;
stack_set_number(m, "rowcnt", m->rowcnt);
+   if(GDKembedded()) 
+   return 0;
if (mnstr_write(s, "&2 ", 3, 1) != 1 ||
!mvc_send_lng(s, val) ||
mnstr_write(s, " ", 1, 1) != 1 ||
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mbedded - add components for testing

2020-05-17 Thread Arjen de Rijke
Changeset: 0081bddbe535 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0081bddbe535
Modified Files:
CMakeLists.txt
testing/CMakeLists.txt
Branch: mbedded
Log Message:

add components for testing


diffs (77 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,7 +216,8 @@ write_basic_package_version_file(
 
 install(FILES
   ${CMAKE_CURRENT_BINARY_DIR}/MonetDBConfig.cmake
-  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake)
+  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake
+  COMPONENT monetdbdev)
 
 include(monetdb-packages)
 
@@ -226,3 +227,5 @@ add_subdirectory(ctest)
 if(CMAKE_SUMMARY)
   monetdb_cmake_summary()
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -98,7 +98,8 @@ target_link_libraries(Mdiff
 
 install(TARGETS
   Mdiff
-  DESTINATION ${CMAKE_INSTALL_BINDIR})
+  DESTINATION ${CMAKE_INSTALL_BINDIR}
+  COMPONENT testing)
 
 configure_file(Mtest.py.in
   ${CMAKE_CURRENT_BINARY_DIR}/Mtest.py
@@ -111,7 +112,8 @@ configure_file(listexports.py.in
 install(FILES
   ${CMAKE_CURRENT_BINARY_DIR}/Mtest.py
   PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-  DESTINATION ${CMAKE_INSTALL_BINDIR})
+  DESTINATION ${CMAKE_INSTALL_BINDIR}
+  COMPONENT pytesting)
 
 if(PYTHON3_LIBDIR)
   install(FILES
@@ -122,7 +124,8 @@ if(PYTHON3_LIBDIR)
 exportutils.py
 malcheck.py
 sqllogictest.py
-DESTINATION ${PYTHON3_LIBDIR}/MonetDBtesting)
+DESTINATION ${PYTHON3_LIBDIR}/MonetDBtesting
+COMPONENT pytesting)
 endif()
 
 if(WIN32)
@@ -157,16 +160,21 @@ else()
   install(FILES
 ${CMAKE_CURRENT_BINARY_DIR}/Mlog
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT testing)
 
   install(FILES
 ${CMAKE_CURRENT_BINARY_DIR}/monetdb_mtest.sh
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT pytesting)
 
   install(FILES
 ${CMAKE_CURRENT_BINARY_DIR}/Mtest.py
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
 DESTINATION ${CMAKE_INSTALL_BINDIR}
-RENAME Mapprove.py)
+RENAME Mapprove.py
+COMPONENT pytesting)
 endif()
+
+# vim: set ts=2:sw=2:et
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mbedded - more install improvements

2020-05-17 Thread Arjen de Rijke
Changeset: 01cca09c61b5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=01cca09c61b5
Modified Files:
clients/examples/C/CMakeLists.txt
clients/examples/perl/CMakeLists.txt
clients/examples/php/CMakeLists.txt
clients/mapiclient/CMakeLists.txt
clients/mapilib/CMakeLists.txt
clients/odbc/driver/CMakeLists.txt
clients/odbc/samples/CMakeLists.txt
clients/odbc/setup/CMakeLists.txt
clients/odbc/winsetup/CMakeLists.txt
monetdb5/tools/CMakeLists.txt
tools/merovingian/client/CMakeLists.txt
tools/merovingian/daemon/CMakeLists.txt
tools/merovingian/daemon/config/CMakeLists.txt
tools/mserver/CMakeLists.txt
Branch: mbedded
Log Message:

more install improvements


diffs (truncated from 303 to 300 lines):

diff --git a/clients/examples/C/CMakeLists.txt 
b/clients/examples/C/CMakeLists.txt
--- a/clients/examples/C/CMakeLists.txt
+++ b/clients/examples/C/CMakeLists.txt
@@ -45,5 +45,8 @@ if(TESTING)
 smack01
 RUNTIME
 DESTINATION
-${CMAKE_INSTALL_BINDIR})
+${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/examples/perl/CMakeLists.txt 
b/clients/examples/perl/CMakeLists.txt
--- a/clients/examples/perl/CMakeLists.txt
+++ b/clients/examples/perl/CMakeLists.txt
@@ -10,10 +10,14 @@ if(TESTING)
   install(FILES
 sqlsample.pl 
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 
   install(FILES
 malsample.pl
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/examples/php/CMakeLists.txt 
b/clients/examples/php/CMakeLists.txt
--- a/clients/examples/php/CMakeLists.txt
+++ b/clients/examples/php/CMakeLists.txt
@@ -10,5 +10,8 @@ if(TESTING)
   install(FILES
 sqlsample.php 
 PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-DESTINATION ${CMAKE_INSTALL_BINDIR})
+DESTINATION ${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/mapiclient/CMakeLists.txt 
b/clients/mapiclient/CMakeLists.txt
--- a/clients/mapiclient/CMakeLists.txt
+++ b/clients/mapiclient/CMakeLists.txt
@@ -128,4 +128,7 @@ install(TARGETS
 install(FILES
   mclient.1
   msqldump.1
-  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
+  COMPONENT mclient)
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/mapilib/CMakeLists.txt b/clients/mapilib/CMakeLists.txt
--- a/clients/mapilib/CMakeLists.txt
+++ b/clients/mapilib/CMakeLists.txt
@@ -47,8 +47,7 @@ set_target_properties(mapi
   PROPERTIES
   VERSION ${MAPI_VERSION}
   SOVERSION ${MAPI_VERSION_MAJOR}
-  PUBLIC_HEADER mapi.h 
-  PUBLIC_HEADER mapi_querytype.h)
+  PUBLIC_HEADER mapi.h)
 
 if (NOT WIN32)
   configure_file(monetdb-mapi.pc.in
@@ -82,3 +81,5 @@ install(EXPORT mapiTargets
   NAMESPACE MonetDB::
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake
   COMPONENT clientdev)
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/odbc/driver/CMakeLists.txt 
b/clients/odbc/driver/CMakeLists.txt
--- a/clients/odbc/driver/CMakeLists.txt
+++ b/clients/odbc/driver/CMakeLists.txt
@@ -117,21 +117,21 @@ target_compile_definitions(MonetODBC
 target_link_libraries(MonetODBC
   PRIVATE
   monetdb_config_header
-   mutils
-   mapi
-   ODBC::ODBC)
+  mutils
+  mapi
+  ODBC::ODBC)
 
 install(TARGETS
   MonetODBC
   RUNTIME
   DESTINATION ${CMAKE_INSTALL_BINDIR}
-  COMPONENT client
+  COMPONENT odbc
   LIBRARY
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  COMPONENT client
+  COMPONENT odbc
   ARCHIVE
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  COMPONENT client
+  COMPONENT odbc
   PUBLIC_HEADER
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
   COMPONENT clientdev
diff --git a/clients/odbc/samples/CMakeLists.txt 
b/clients/odbc/samples/CMakeLists.txt
--- a/clients/odbc/samples/CMakeLists.txt
+++ b/clients/odbc/samples/CMakeLists.txt
@@ -43,5 +43,8 @@ if(TESTING)
 testStmtAttr
 RUNTIME
 DESTINATION
-${CMAKE_INSTALL_BINDIR})
+${CMAKE_INSTALL_BINDIR}
+COMPONENT clienttest)
 endif()
+
+# vim: set ts=2:sw=2:et
diff --git a/clients/odbc/setup/CMakeLists.txt 
b/clients/odbc/setup/CMakeLists.txt
--- a/clients/odbc/setup/CMakeLists.txt
+++ b/clients/odbc/setup/CMakeLists.txt
@@ -32,14 +32,16 @@ install(TARGETS
   MonetODBCs
   RUNTIME
   DESTINATION ${CMAKE_INSTALL_BINDIR}
-  COMPONENT client
+  COMPONENT odbc
   LIBRARY
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  COMPONENT client
+  COMPONENT odbc
   ARCHIVE
   DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  COMPONENT client
+  COMPONENT odbc
   PUBLIC_HEADER
   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
   COMPONENT clientdev
   INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+# vim: set ts=2:s

MonetDB: mbedded - set the name of the result (also included it ...

2020-05-17 Thread Niels Nes
Changeset: 908c39474e84 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=908c39474e84
Modified Files:
tools/embedded/monetdb_embedded.c
tools/embedded/monetdb_embedded.h
Branch: mbedded
Log Message:

set the name of the result (also included it in the overwrite c-structure)


diffs (32 lines):

diff --git a/tools/embedded/monetdb_embedded.c 
b/tools/embedded/monetdb_embedded.c
--- a/tools/embedded/monetdb_embedded.c
+++ b/tools/embedded/monetdb_embedded.c
@@ -1034,6 +1034,8 @@ monetdb_result_fetch(monetdb_connection 
j++;
}
}
+   if (column_result)
+   column_result->name = 
result->monetdb_resultset->cols[column_index].name;
 cleanup:
if (b)
BBPunfix(b->batCacheid);
diff --git a/tools/embedded/monetdb_embedded.h 
b/tools/embedded/monetdb_embedded.h
--- a/tools/embedded/monetdb_embedded.h
+++ b/tools/embedded/monetdb_embedded.h
@@ -99,12 +99,13 @@ typedef struct {
 
 typedef void* monetdb_connection;
 
-#define DEFAULT_STRUCT_DEFINITION(ctype, typename) \
-   typedef struct \
-   {  \
+#define DEFAULT_STRUCT_DEFINITION(ctype, typename) \
+   typedef struct \
+   {  \
monetdb_types type;\
ctype *data;   \
size_t count;  \
+   char *name;\
ctype null_value;  \
double scale;  \
int (*is_null)(ctype value);   \
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mbedded - cleanup cmake code, improving installs

2020-05-17 Thread Arjen de Rijke
Changeset: b1075af7fe08 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1075af7fe08
Modified Files:
clients/examples/C/CMakeLists.txt
clients/mapiclient/CMakeLists.txt
clients/mapilib/CMakeLists.txt
clients/odbc/samples/CMakeLists.txt
cmake/monetdb-defines.cmake
common/stream/CMakeLists.txt
gdk/CMakeLists.txt
monetdb5/mal/CMakeLists.txt
monetdb5/tools/CMakeLists.txt
tools/merovingian/client/CMakeLists.txt
tools/merovingian/daemon/CMakeLists.txt
tools/merovingian/daemon/config/CMakeLists.txt
tools/mserver/CMakeLists.txt
Branch: mbedded
Log Message:

cleanup cmake code, improving installs


diffs (247 lines):

diff --git a/clients/examples/C/CMakeLists.txt 
b/clients/examples/C/CMakeLists.txt
--- a/clients/examples/C/CMakeLists.txt
+++ b/clients/examples/C/CMakeLists.txt
@@ -7,16 +7,43 @@
 #]]
 
 if(TESTING)
-   add_executable(sample0 sample0.c)
-   target_link_libraries(sample0 PRIVATE mapi)
-   add_executable(sample1 sample1.c)
-   target_link_libraries(sample1 PRIVATE mapi)
-   add_executable(sample4 sample4.c)
-   target_link_libraries(sample4 PRIVATE mapi)
-   add_executable(smack00 smack00.c)
-   target_link_libraries(smack00 PRIVATE mapi)
-   add_executable(smack01 smack01.c)
-   target_link_libraries(smack01 PRIVATE mapi)
+  add_executable(sample0
+sample0.c)
+
+  target_link_libraries(sample0
+PRIVATE mapi)
+
+  add_executable(sample1
+sample1.c)
+
+  target_link_libraries(sample1
+PRIVATE mapi)
+
+  add_executable(sample4
+sample4.c)
+
+  target_link_libraries(sample4
+PRIVATE mapi)
 
-   install(TARGETS sample0 sample1 sample4 smack00 smack01 DESTINATION 
${BINDIR})
+  add_executable(smack00
+smack00.c)
+
+  target_link_libraries(smack00
+PRIVATE mapi)
+
+  add_executable(smack01
+smack01.c)
+
+  target_link_libraries(smack01
+PRIVATE mapi)
+
+  install(TARGETS
+sample0
+sample1
+sample4
+smack00
+smack01
+RUNTIME
+DESTINATION
+${CMAKE_INSTALL_BINDIR})
 endif()
diff --git a/clients/mapiclient/CMakeLists.txt 
b/clients/mapiclient/CMakeLists.txt
--- a/clients/mapiclient/CMakeLists.txt
+++ b/clients/mapiclient/CMakeLists.txt
@@ -128,4 +128,4 @@ install(TARGETS
 install(FILES
   mclient.1
   msqldump.1
-  DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1)
+  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
diff --git a/clients/mapilib/CMakeLists.txt b/clients/mapilib/CMakeLists.txt
--- a/clients/mapilib/CMakeLists.txt
+++ b/clients/mapilib/CMakeLists.txt
@@ -56,16 +56,8 @@ if (NOT WIN32)
 
   install(FILES
 ${CMAKE_CURRENT_BINARY_DIR}/monetdb-mapi.pc
-DESTINATION ${PKGCONFIGDIR})
-endif()
-
-if (NOT WIN32)
-  configure_file(monetdb-mapi.pc.in
-${CMAKE_CURRENT_BINARY_DIR}/monetdb-mapi.pc @ONLY)
-
-  install(FILES
-${CMAKE_CURRENT_BINARY_DIR}/monetdb-mapi.pc
-DESTINATION ${PKGCONFIGDIR})
+DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+COMPONENT clientdev)
 endif()
 
 install(TARGETS
diff --git a/clients/odbc/samples/CMakeLists.txt 
b/clients/odbc/samples/CMakeLists.txt
--- a/clients/odbc/samples/CMakeLists.txt
+++ b/clients/odbc/samples/CMakeLists.txt
@@ -41,6 +41,7 @@ if(TESTING)
 testgetinfo
 arraytest
 testStmtAttr
+RUNTIME
 DESTINATION
-${BINDIR})
+${CMAKE_INSTALL_BINDIR})
 endif()
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -55,10 +55,10 @@ function(monetdb_configure_defines)
   check_symbol_exists("getaddrinfo" "netdb.h" UNIX_GETADDRINFO)
   check_symbol_exists("getaddrinfo" "ws2tcpip.h" WIN_GETADDRINFO)
   if(UNIX_GETADDRINF)
- set(HAVE_GETADDRINFO 1 PARENT_SCOPE)
+set(HAVE_GETADDRINFO 1 PARENT_SCOPE)
   endif()
   if(WIN_GETADDRINF)
- set(HAVE_GETADDRINFO 1 PARENT_SCOPE)
+set(HAVE_GETADDRINFO 1 PARENT_SCOPE)
   endif()
 
   #check_symbol_exists("WSADATA" "winsock2.h" HAVE_WINSOCK_H)
diff --git a/common/stream/CMakeLists.txt b/common/stream/CMakeLists.txt
--- a/common/stream/CMakeLists.txt
+++ b/common/stream/CMakeLists.txt
@@ -91,7 +91,8 @@ if (NOT WIN32)
 
   install(FILES
 ${CMAKE_CURRENT_BINARY_DIR}/monetdb-stream.pc
-DESTINATION ${PKGCONFIGDIR})
+DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+COMPONENT streamdev)
 endif()
 
 install(TARGETS
diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt
--- a/gdk/CMakeLists.txt
+++ b/gdk/CMakeLists.txt
@@ -115,7 +115,8 @@ if (NOT WIN32)
 
   install(FILES
 ${CMAKE_CURRENT_BINARY_DIR}/monetdb-gdk.pc
-DESTINATION ${PKGCONFIGDIR})
+DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+COMPONENT monetdbdev)
 endif()
 
 install(TARGETS
diff --git a/monetdb5/mal/CMakeLists.txt b/monetdb5/mal/CMakeLists.txt
--- a/monetdb5/mal/CMakeLists.txt
+++ b/monetdb5/mal/CMakeLists.txt
@@ -94,4 +94,5 @@ install(TARGETS
   DESTINATION ${CMAKE_I