Changeset: 81af50ea24ff for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=81af50ea24ff
Modified Files:
common/stream/monetdb-stream.pc.in
configure.ag
sql/server/rel_optimizer.c
tools/merovingian/daemon/forkmserver.c
Branch: default
Log Message:
Merge with Aug2018 branch.
diffs (212 lines):
diff --git a/common/stream/monetdb-stream.pc.in
b/common/stream/monetdb-stream.pc.in
--- a/common/stream/monetdb-stream.pc.in
+++ b/common/stream/monetdb-stream.pc.in
@@ -12,7 +12,7 @@ includedir=@includedir@
Name: monetdb-stream
Description: MonetDB streams libary
Version: @PACKAGE_VERSION@
-Requires: @PKG_CURL@ @PKG_ZLIB@ @PKG_LIBLZMA@
+Requires: @PKG_CURL@ @PKG_ZLIB@ @PKG_LIBLZMA@ @PKG_LZ4@
-Libs: -L${libdir} -lstream @SOCKET_LIBS@ @BZ_LIBS@ @snappy_LIBS@ @lz4_LIBS@
@LIBICONV@
+Libs: -L${libdir} -lstream @SOCKET_LIBS@ @BZ_LIBS@ @snappy_LIBS@ @LIBICONV@
Cflags: -I${includedir}/monetdb
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1408,36 +1408,18 @@ AM_CONDITIONAL([HAVE_LIBSNAPPY], [test x
dnl check for lz4 (de)compression library
org_have_lz4=auto
have_lz4=$org_have_lz4
-lz4_CFLAGS=""
-lz4_LIBS="-llz4"
AC_ARG_WITH([lz4],
[AS_HELP_STRING([--with-lz4=DIR],
[lz4 library is installed in DIR])],
[have_lz4="$withval"])
-AS_CASE(["$have_lz4"],
- [yes|no|auto], [],
- [
- lz4_CFLAGS="-I$withval/include"
- lz4_LIBS="-L$withval/lib -llz4"])
-
AS_VAR_IF([have_lz4], [no], [], [
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $lz4_CFLAGS"
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lz4_LDFLAGS"
- AC_CHECK_HEADER([lz4.h],
- [AC_CHECK_LIB([lz4], [LZ4_compress_fast],
- [AC_DEFINE([HAVE_LIBLZ4], 1, [Define if you have the
lz4 library])],
- [AS_VAR_IF([have_lz4], [auto], [], [AC_MSG_ERROR([-llz4
library not found])])
- have_lz4=no; why_not_lz4="(lz4 library not found)"])],
- [AS_VAR_IF([have_lz4], [auto], [], [AC_MSG_ERROR([lz4.h header
not found])])
- have_lz4=no; why_not_lz4="(lz4.h header not found)"])
- LDFLAGS="$save_LDFLAGS"
- CPPFLAGS="$save_CPPFLAGS"])
-AS_VAR_IF([have_lz4], [no], [lz4_CFLAGS=""; lz4_LIBS=""])
-AC_SUBST([lz4_CFLAGS])
-AC_SUBST([lz4_LIBS])
+ PKG_CHECK_MODULES([lz4], [liblz4 >= 1.8.0],
+ [have_lz4=yes],
+ [have_lz4=no; why_not_lz4="(liblz4 not found)"])
+ AS_VAR_IF([have_lz4], [yes], [
+ AC_DEFINE([HAVE_LIBLZ4], 1, [Define if you have the lz4
library])
+ AC_SUBST([PKG_LZ4], [liblz4])])])
AM_CONDITIONAL([HAVE_LIBLZ4], [test x$have_lz4 != xno])
@@ -2466,7 +2448,7 @@ AS_VAR_IF([have_atomic_ops], [yes], [
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $atomic_ops_CFLAGS"
AC_CHECK_HEADERS([atomic_ops.h], [have_atomic_ops=yes],
[have_atomic_ops=no why_not_atomic_ops="(atomic_ops was incorrectly installed
(happens on at least Solaris/OpenIndiana))"])
- CFAGS="$save_CFLAGS"
+ CFLAGS="$save_CFLAGS"
AS_VAR_IF([have_atomic_ops], [yes], [
AC_DEFINE([HAVE_LIBATOMIC_OPS], 1, [Define if you have
the libatomic_ops library])
CFLAGS="$CFLAGS $atomic_ops_CFLAGS"
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -1931,10 +1931,10 @@ rel_simplify_count_fk_join(int *changes,
static sql_rel *
rel_simplify_fk_joins(int *changes, mvc *sql, sql_rel *rel)
{
- sql_rel *r;
+ sql_rel *r = NULL;
if (rel->op == op_project)
- r = rel->l;
+ r = rel->l;
while (rel->op == op_project && r && r->exps && list_length(r->exps) ==
1 && is_join(r->op) && !(rel_is_ref(r))) {
sql_rel *or = r;
@@ -1949,7 +1949,7 @@ rel_simplify_fk_joins(int *changes, mvc
if (!is_groupby(rel->op))
return rel;
- r = rel->l;
+ r = rel->l;
while(r && r->op == op_project)
r = r->l;
@@ -2351,7 +2351,7 @@ exp_push_down_prj(mvc *sql, sql_exp *e,
case e_aggr:
case e_func: {
list *l = e->l, *nl = NULL;
- sql_exp *ne = NULL;
+ sql_exp *ne = NULL;
if (e->type == e_func && exp_unsafe(e))
return NULL;
@@ -3475,7 +3475,7 @@ rel_select_cse(int *changes, mvc *sql, s
if (!needed)
return rel;
- nexps = new_exp_list(sql->sa);
+ nexps = new_exp_list(sql->sa);
for (n=rel->exps->h; n; n = n->next) {
sql_exp *e = n->data, *l = NULL;
@@ -3501,7 +3501,7 @@ rel_select_cse(int *changes, mvc *sql, s
}
if (!needed)
return rel;
- nexps = new_exp_list(sql->sa);
+ nexps = new_exp_list(sql->sa);
for (n=rel->exps->h; n; n = n->next) {
sql_exp *e = n->data;
@@ -6222,7 +6222,7 @@ rel_remove_unused(mvc *sql, sql_rel *rel
if (!needed)
return rel;
- exps = new_exp_list(sql->sa);
+ exps = new_exp_list(sql->sa);
for(n=rel->exps->h; n; n = n->next) {
sql_exp *e = n->data;
@@ -7347,10 +7347,10 @@ reduce_scale(atom *a)
int i = 0;
if (v != 0)
- while( (v/10)*10 == v ) {
- i++;
- v /= 10;
- }
+ while( (v/10)*10 == v ) {
+ i++;
+ v /= 10;
+ }
a->data.val.hval = v;
return i;
}
@@ -7359,11 +7359,11 @@ reduce_scale(atom *a)
lng v = a->data.val.lval;
int i = 0;
- if (v != 0)
- while( (v/10)*10 == v ) {
- i++;
- v /= 10;
- }
+ if (v != 0)
+ while( (v/10)*10 == v ) {
+ i++;
+ v /= 10;
+ }
a->data.val.lval = v;
return i;
}
@@ -7371,11 +7371,11 @@ reduce_scale(atom *a)
int v = a->data.val.ival;
int i = 0;
- if (v != 0)
- while( (v/10)*10 == v ) {
- i++;
- v /= 10;
- }
+ if (v != 0)
+ while( (v/10)*10 == v ) {
+ i++;
+ v /= 10;
+ }
a->data.val.ival = v;
return i;
}
@@ -7383,11 +7383,11 @@ reduce_scale(atom *a)
sht v = a->data.val.shval;
int i = 0;
- if (v != 0)
- while( (v/10)*10 == v ) {
- i++;
- v /= 10;
- }
+ if (v != 0)
+ while( (v/10)*10 == v ) {
+ i++;
+ v /= 10;
+ }
a->data.val.shval = v;
return i;
}
diff --git a/tools/merovingian/daemon/forkmserver.c
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -602,11 +602,11 @@ forkMserver(char *database, sabdb** stat
close(pfdo[1]);
close(pfde[0]);
- if(dup_err)
+ if(dup_err == -1)
perror("dup2");
dup_err = dup2(pfde[1], 2);
close(pfde[1]);
- if(dup_err)
+ if(dup_err == -1)
perror("dup2");
write_error = write(1, "arguments:", 10);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list