Changeset: 6a3b045b96e4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6a3b045b96e4
Modified Files:
        configure.ag
        sql/backends/monet5/sql_gencode.c
Branch: headless
Log Message:

Merge with default branch.


diffs (truncated from 413 to 300 lines):

diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -6,6 +6,7 @@
  * _MSC_VER = 1310: Visual Studio .NET 2003 (a.k.a. Visual Studio 7)
  * _MSC_VER = 1400: Visual Studio 8
  * _MSC_VER = 1500: Visual Studio 9.0
+ * _MSC_VER = 1600: Visual Studio 10.0
  */
 
 /* Prevent pollution through excessive inclusion of include files by
diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst
--- a/buildtools/doc/windowsbuild.rst
+++ b/buildtools/doc/windowsbuild.rst
@@ -297,6 +297,19 @@
 ``INSTALL.W32`` or ``INSTALL.W64``.  We used the option
 ``enable-static-engine`` as described in the instructions.
 
+.. The actual commands used were::
+   perl Configure VC-WIN32 no-asm --prefix=C:\Libraries\openssl-1.0.0a.win32
+   ms\do_ms.bat
+   nmake /f ms\ntdll.mak
+   nmake /f ms\ntdll.mak install
+   and::
+   perl Configure VC-WIN64A --prefix=C:\Libraries\openssl-1.0.0a.win64
+   ms\do_win64a
+   nmake /f ms\ntdll.mak
+   nmake /f ms\ntdll.mak install
+   For the debug versions, use debug-VC-WIN32 and VC-WIN64A and edit
+   the file ``ms/ntdll.mak`` before building.
+
 Fix the ``OPENSSL`` definitions in ``buildtools\conf\winrules.msc`` so
 that they refer to the location where you installed the library and
 call ``nmake`` with the extra parameter ``HAVE_OPENSSL=1``.
@@ -331,6 +344,11 @@
  nmake /f Makefile.msvc
  nmake /f Makefile.msvc install
 
+.. Before the install, run the commands::
+   cd bin.msvc
+   mt -nologo -manifest libxml2.dll.manifest -outputresource:libxml2.dll;2
+   cd ..
+
 After this, you may want to move the file ``libxml2.dll`` from the
 ``lib`` folder to the ``bin`` folder.
 
@@ -354,6 +372,14 @@
 before starting the build so that it gets created from the correct
 (Windows) source.
 
+.. The actual commands were::
+   autogen.bat
+   nmake /f makefile.vc MSCV_VER=1600
+   The logic having to do with finding out which compiler is being
+   used in ``nmake.opt`` uses an older version number for ``nmake``
+   for Visual Studio 10.  I fixed the last conditional checking
+   ``_NMAKE_VER`` to also include ``|| "$(_NMAKE_VER)" == "10.00.30319.01"``.
+
 After this, install the library somewhere, e.g. in
 ``C:\geos-3.2.2.win32``::
 
@@ -401,6 +427,13 @@
  nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD PREFIX=C:\iconv-1.11.win64
  nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD PREFIX=C:\iconv-1.11.win64 
install
 
+.. Before the install, run the commands::
+   cd lib
+   mt -nologo -manifest iconv.dll.manifest -outputresource:iconv.dll;2
+   cd ..\libcharset\lib
+   mt -nologo -manifest charset.dll.manifest -outputresource:charset.dll;2
+   cd ..\..
+
 Fix the ``ICONV`` definitions in ``buildtools\conf\winrules.msc`` so
 that they refer to the location where you installed the library and
 call ``nmake`` with the extra parameter ``HAVE_ICONV=1``.
@@ -429,7 +462,7 @@
 ::
 
  call "C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\bin\amd64\vcvarsamd64.bat"
- nmake /f win32\Makefile.msc
+ nmake /f win32\Makefile.msc OBJA=inffast.obj
 
 Create the folder where you want to install the binaries,
 e.g. ``C:\zlib-1.2.5.win64``, and the subfolders ``bin``, ``include``,
@@ -510,6 +543,9 @@
 the MonetDB build process can find them,
 e.g. ``C:\bzip2-1.0.5.win32``.
 
+.. Before copying the files, run the command::
+   mt -nologo -manifest libbz2.dll.manifest -outputresource:libbz2.dll;2
+
 Fix the ``LIBBZ2`` definitions in ``buildtools\conf\winrules.msc`` so
 that they refer to the location where you installed the library and
 call ``nmake`` with the extra parameter ``HAVE_LIBBZ2=1``.
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -3255,6 +3255,11 @@
                        continue;
                }
 
+               if (k + (q - p) >= lim) {
+                       lim += MAPIBLKSIZE;
+                       REALLOC(hdl->query, lim);
+                       assert(hdl->query);
+               }
                strncpy(hdl->query + k, p, q - p);
                k += q - p;
                hdl->query[k] = 0;
@@ -3311,7 +3316,7 @@
                                sprintf(hdl->query + k, "%.9g", *(float *) src);
                                break;
                        case MAPI_DOUBLE:
-                               checkSpace(20);
+                               checkSpace(30);
                                sprintf(hdl->query + k, "%.17g", *(double *) 
src);
                                break;
                        case MAPI_DATE:
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2124,11 +2124,9 @@
 
 dnl OpenSSL library
 dnl required for MonetDB5 (and SQL), optional otherwise
-PKG_CHECK_EXISTS([openssl >= 0.9.8f], [have_openssl=yes], [have_openssl=no])
-if test "x$have_openssl" = xyes; then
-       PKG_CHECK_MODULES([openssl], [openssl >= 0.9.8f])
-       AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have the OpenSSL library])
-fi
+PKG_CHECK_MODULES([openssl], [openssl >= 0.9.8f],
+       [have_openssl=yes; AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have the 
OpenSSL library])],
+       [have_openssl=no])
 case "$enable_monetdb5-$have_openssl" in
 yes-no)
        AC_MSG_ERROR([OpenSSL library not found but required for MonetDB5])
@@ -2141,9 +2139,9 @@
 dnl PCRE library
 dnl required for MonetDB5 (and SQL), optional otherwise
 req_pcre_ver='4.5'
-PKG_CHECK_EXISTS([libpcre >= $req_pcre_ver], [have_pcre=yes], [have_pcre=no])
+PKG_CHECK_MODULES([pcre], [libpcre >= $req_pcre_ver],
+       [have_pcre=yes], [have_pcre=no])
 if test "x$have_pcre" = xyes; then
-       PKG_CHECK_MODULES([pcre], [libpcre >= $req_pcre_ver])
        AC_PATH_PROG(PCRETEST,pcretest)
        if test "x$PCRETEST" = x; then
                AC_MSG_ERROR([could not find pcretest])
@@ -2168,7 +2166,7 @@
 esac
 
 
-PKG_CHECK_EXISTS([libxml-2.0], [have_libxml2="yes"], [have_libxml2="no"])
+PKG_CHECK_MODULES([libxml2], [libxml-2.0], [have_libxml2="yes"], 
[have_libxml2="no"])
 case "$enable_monetdb5-$have_libxml2" in
 yes-no)
        AC_MSG_ERROR([libxml2 library not found but required for MonetDB5])
@@ -2176,34 +2174,27 @@
 auto-no)
        enable_monetdb5=no
        ;;
-*-yes)
-       PKG_CHECK_MODULES([libxml2], [libxml-2.0])
-       ;;
 esac
 
 
 have_raptor=no
 if test "x$enable_rdf" != xno; then
        req_raptor_ver='1.4.16'
-       PKG_CHECK_EXISTS([raptor >= $req_raptor_ver], [have_raptor="yes"], 
[have_raptor="no"])
        # if RDF is explicitly enabled, raptor library is required
-       if test x"$have_raptor" = x"yes" -o "x$enable_rdf" = xyes; then
-               PKG_CHECK_MODULES([raptor], [raptor >= $req_raptor_ver])
-               AC_DEFINE(HAVE_RAPTOR, 1, [Define if you have the raptor 
library])
-       fi
+       PKG_CHECK_MODULES([raptor], [raptor >= $req_raptor_ver],
+               [have_raptor="yes"],
+               [have_raptor="no"; if test "x$enable_rdf" = xyes; then 
AC_MSG_ERROR([raptor library required for RDF support]); fi])
 fi
 AM_CONDITIONAL(HAVE_RAPTOR, test x"$have_raptor" != xno)
 
-PKG_CHECK_EXISTS([libcurl], [have_curl="yes"], [have_curl="no"])
+PKG_CHECK_MODULES([curl], [libcurl], [have_curl="yes"], [have_curl="no"])
 if test x"$have_curl" = x"yes" ; then
-       PKG_CHECK_MODULES([curl], [libcurl])
        AC_DEFINE(HAVE_CURL, 1, [Define if you have the cURL library])
        AC_SUBST(PKG_CURL, libcurl)
 fi
 
-PKG_CHECK_EXISTS([zlib], [have_zlib="yes"], [have_zlib="no"])
+PKG_CHECK_MODULES([zlib], [zlib], [have_zlib="yes"], [have_zlib="no"])
 if test x"$have_zlib" = x"yes" ; then
-       PKG_CHECK_MODULES([zlib], [zlib])
        AC_DEFINE(HAVE_LIBZ, 1, [Define if you have the z library])
        AC_SUBST(PKG_ZLIB, zlib)
 fi
@@ -2216,10 +2207,8 @@
        have_valgrind=$withval)
 if test "x$have_valgrind" != xno; then
        PKG_CHECK_MODULES([valgrind], [valgrind],
-               [have_valgrind=yes], [if test "x$have_valgrind" = xyes; then 
AC_MSG_ERROR([no valgrind support found]); else have_valgrind=no; fi])
-       if test "x$have_valgrind" = xyes; then
-               AC_DEFINE(HAVE_VALGRIND, 1, [Define if you have valgrind 
installed])
-       fi
+               [AC_DEFINE(HAVE_VALGRIND, 1, [Define if you have valgrind 
installed])],
+               [if test "x$have_valgrind" = xyes; then AC_MSG_ERROR([no 
valgrind support found]); fi])
 fi
 
 # check for sphinxclient
@@ -2500,11 +2489,9 @@
 AC_SUBST(PCL_CFLAGS)
 AC_SUBST(PCL_LIBS)
 
-PKG_CHECK_EXISTS([cfitsio], [have_cfitsio=yes], [have_cfitsio=no])
-if test "x$have_cfitsio" = xyes; then
-       PKG_CHECK_MODULES([cfitsio], [cfitsio])
-       AC_DEFINE(HAVE_CFITSIO, 1, [Define if you have the cfitsio library])
-fi
+PKG_CHECK_MODULES([cfitsio], [cfitsio],
+       [have_cfitsio=yes; AC_DEFINE(HAVE_CFITSIO, 1, [Define if you have the 
cfitsio library])],
+       [have_cfitsio=no])
 AM_CONDITIONAL(HAVE_CFITSIO, test x"$have_cfitsio" != xno)
 
 LIBGC_CFLAGS=
diff --git a/sql/backends/monet5/sql_gencode.c 
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -2325,6 +2325,7 @@
 backend_create_func(backend *be, sql_func *f)
 {
        mvc *m = be->mvc;
+       sql_schema *schema = m->session->schema;
        MalBlkPtr curBlk = 0;
        InstrPtr curInstr = 0;
        Client c = be->client;
@@ -2338,7 +2339,9 @@
                return;
        f->sql++;
        sa = sa_create();
+       m->session->schema = f->s;
        s = sql_parse(m, sa, f->query, m_instantiate);
+       m->session->schema = schema;
        if (s && !f->sql) /* native function */
                return;
 
diff --git a/sql/server/rel_updates.c b/sql/server/rel_updates.c
--- a/sql/server/rel_updates.c
+++ b/sql/server/rel_updates.c
@@ -175,7 +175,7 @@
        sql_subtype *bt = sql_bind_localtype("bit");
        sql_subfunc *or = sql_bind_func_result(sql->sa, sql->session->schema, 
"or", bt, bt, bt);
 
-       sql_rel *_nlls, *nnlls, *ins = inserts->r;
+       sql_rel *_nlls = NULL, *nnlls, *ins = inserts->r;
        sql_exp *nll_exps = NULL, *e;
        list *join_exps = new_exp_list(sql->sa), *pexps;
 
diff --git a/sql/server/sql_psm.c b/sql/server/sql_psm.c
--- a/sql/server/sql_psm.c
+++ b/sql/server/sql_psm.c
@@ -616,6 +616,8 @@
                                        sql_func *f = mvc_create_func(sql, 
sql->session->schema, fname, l, restype, is_aggr, fmod, fnme, q, is_func);
                                        if (!backend_resolve_function(sql, f)) 
                                                return sql_error(sql, 01, 
"CREATE %s: external name %s.%s not bound", F, fmod, fnme);
+                               } else if (!sf) {
+                                       return sql_error(sql, 01, "CREATE %s: 
external name %s.%s not bound (%s,%s)", F, fmod, fnme, s->base.name, fname );
                                } else {
                                        sql_func *f = sf->func;
                                        f->mod = _strdup(fmod);
diff --git a/tools/merovingian/client/monetdb.c 
b/tools/merovingian/client/monetdb.c
--- a/tools/merovingian/client/monetdb.c
+++ b/tools/merovingian/client/monetdb.c
@@ -938,7 +938,7 @@
                 * databases.  In this mode we should omit starting already
                 * started databases, so we need to check first. */
 
-               if (doall != 1 && (
+               if (doall == 1 && (
                                ((mode == STOP || mode == KILL) && stats->state 
!= SABdbRunning)
                                || (mode == START && stats->state == 
SABdbRunning)))
                {
@@ -959,7 +959,6 @@
                prev = stats;
                stats = stats->next;
        }
-       
 
        if (orig != NULL) {
                simple_argv_cmd(argv[0], orig, type, NULL, action);
diff --git a/tools/merovingian/daemon/argvcmds.c 
b/tools/merovingian/daemon/argvcmds.c
--- a/tools/merovingian/daemon/argvcmds.c
+++ b/tools/merovingian/daemon/argvcmds.c
@@ -346,7 +346,7 @@
 
        if (kill(daemon, SIGTERM) == -1) {
                fprintf(stderr, "unable to shut down monetdbd[%d]: %s\n",
-                               daemon, strerror(errno));
+                               (int)daemon, strerror(errno));
                return(1);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to