Changeset: 6c75c738f37f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c75c738f37f
Modified Files:
clients/mapilib/mapi.c
configure.ag
sql/backends/monet5/sql_gencode.mx
tools/merovingian/client/monetdb.c
Branch: default
Log Message:
Merge with Mar2011 branch.
diffs (232 lines):
diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst
--- a/buildtools/doc/windowsbuild.rst
+++ b/buildtools/doc/windowsbuild.rst
@@ -303,7 +303,7 @@
nmake /f ms\ntdll.mak
nmake /f ms\ntdll.mak install
and::
- perl Configure VC-WIN64 --prefix=C:\Libraries\openssl-1.0.0a.win64
+ 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
@@ -344,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.
@@ -422,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``.
@@ -531,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.mx
b/sql/backends/monet5/sql_gencode.mx
--- a/sql/backends/monet5/sql_gencode.mx
+++ b/sql/backends/monet5/sql_gencode.mx
@@ -2360,6 +2360,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;
@@ -2373,7 +2374,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/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);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list