MonetDB: Jun2010 - Merge heads.

2010-08-19 Thread Sjoerd Mullender
Changeset: 2b6866300f0a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b6866300f0a
Modified Files:

Branch: Jun2010
Log Message:

Merge heads.


diffs (124 lines):

diff -r 6eaa76bd4fbd -r 2b6866300f0a clients/ChangeLog.Jun2010
--- a/clients/ChangeLog.Jun2010 Thu Aug 19 09:31:31 2010 +0200
+++ b/clients/ChangeLog.Jun2010 Thu Aug 19 10:09:31 2010 +0200
@@ -1,9 +1,16 @@
 # ChangeLog file for clients
 # This file is updated with Maddlog
 
+* Thu Aug 19 2010 Sjoerd Mullender sjo...@acm.org
+- mclient now complains about NULL bytes in the input when in interactive
+  mode.
+
 * Fri Aug 13 2010 Fabian Groffen fab...@cwi.nl
-- Slight rendering improvements to mclient's tabular output when rendering 
results larger than the available screen width, headers were previously 
unnecessarily squeezed.
-- Fix bug #2650, a too small buffer caused the active database as reported by 
mclient's welcome message to be truncated
+- Slight rendering improvements to mclient's tabular output when
+  rendering results larger than the available screen width, headers
+  were previously unnecessarily squeezed.
+- Fix bug #2650, a too small buffer caused the active database as
+  reported by mclient's welcome message to be truncated
 
 * Wed Jul 21 2010 Fabian Groffen fab...@cwi.nl
 - Add --version option to mclient.
diff -r 6eaa76bd4fbd -r 2b6866300f0a clients/src/mapiclient/mclient.mx
--- a/clients/src/mapiclient/mclient.mx Thu Aug 19 09:31:31 2010 +0200
+++ b/clients/src/mapiclient/mclient.mx Thu Aug 19 10:09:31 2010 +0200
@@ -1685,7 +1685,7 @@
MapiHdl hdl = mapi_get_active(mid);
MapiMsg rc = MOK;
int sent = 0;   /* whether we sent any data to the server */
-   int first = 1;  /* first line processing */
+   int lineno = 1;
 
 #ifdef HAVE_LIBREADLINE
if (prompt == NULL)
@@ -1693,6 +1693,10 @@
oldbuf = buf = malloc(BUFSIZ);
 
do {
+   if (prompt) {
+   /* clear errors when interactive */
+   errseen = 0;
+   }
stream_flush(toConsole);
timerPause();
 #ifdef HAVE_LIBREADLINE
@@ -1721,6 +1725,8 @@
} else
 #endif
{
+   int c = 0;
+
 #ifndef HAVE_LIBREADLINE
if (prompt) {
fputs(hdl ? more : prompt, stdout);
@@ -1730,11 +1736,35 @@
if (buf != oldbuf)
free(buf);
buf = oldbuf;
-   line = fgets(buf, BUFSIZ, fp);
-   }
-   if (prompt) {
-   /* clear errors when interactive */
-   errseen = 0;
+   line = buf;
+   while (line  buf + BUFSIZ - 1 
+  (c = getc(fp)) != EOF) {
+   if (c == 0) {
+   fprintf(stderr, NULL byte in input on 
line %d of input\n, lineno);
+   /* read away rest of line */
+   while ((c = getc(fp)) != EOF 
+  c != '\n')
+   ;
+   errseen = 1;
+   c = 0x1234; /* indicate error */
+   if (hdl) {
+   mapi_close_handle(hdl);
+   hdl = NULL;
+   }
+   break;
+   }
+   *line++ = c;
+   if (c == '\n')
+   break;
+   }
+   if (c == 0x1234)
+   continue;
+   if (line == buf)
+   line = NULL;
+   else {
+   *line = 0;
+   line = buf;
+   }
}
 #ifdef HAVE_ICONV
if (line != NULL  encoding != NULL  cd_in != (iconv_t) -1) {
@@ -1755,10 +1785,10 @@
 #ifdef HAVE_ICONV
encoding == NULL 
 #endif
-   first 
+   lineno == 1 
strncmp(line, UTF8BOM, UTF8BOMLENGTH) == 0)
line += UTF8BOMLENGTH;  /* skip Byte Order Mark (BOM) */
-   first = 0;
+   lineno++;
if (line == NULL ||
(mode == XQUERY  line[0] == ''  line[1] == '')) {
/* end of file */
diff -r 6eaa76bd4fbd -r 2b6866300f0a 
sql/src/test/BugTracker-2008/Tests/insert-null-byte.SF-2233581.stable.err
--- 

MonetDB: Jun2010 - Merge heads.

2010-07-22 Thread Sjoerd Mullender
Changeset: f8fff5403988 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8fff5403988
Modified Files:

Branch: Jun2010
Log Message:

Merge heads.


diffs (92 lines):

diff -r 5343927ddb65 -r f8fff5403988 MonetDB4/MonetDB-server.spec
--- a/MonetDB4/MonetDB-server.spec  Wed Jul 21 22:08:27 2010 +0200
+++ b/MonetDB4/MonetDB-server.spec  Thu Jul 22 09:47:29 2010 +0200
@@ -136,7 +136,7 @@
 make install DESTDIR=$RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB
-mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4
+mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4/dbfarm
 # insert example db here!
 
 # cleanup stuff we don't want to install
@@ -190,8 +190,9 @@
 %{_libdir}/MonetDB4/lib/*.so*
 %{_libdir}/MonetDB4/*.mil
 
-%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB
-%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4
+%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB
+%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4
+%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4/dbfarm
 
 %config(noreplace) %{_sysconfdir}/MonetDB.conf
 
diff -r 5343927ddb65 -r f8fff5403988 MonetDB4/debian/monetdb4-server.dirs
--- a/MonetDB4/debian/monetdb4-server.dirs  Wed Jul 21 22:08:27 2010 +0200
+++ b/MonetDB4/debian/monetdb4-server.dirs  Thu Jul 22 09:47:29 2010 +0200
@@ -1,1 +1,2 @@
 /var/MonetDB4
+/var/MonetDB4/dbfarm
diff -r 5343927ddb65 -r f8fff5403988 MonetDB4/debian/monetdb4-server.postinst
--- a/MonetDB4/debian/monetdb4-server.postinst  Wed Jul 21 22:08:27 2010 +0200
+++ b/MonetDB4/debian/monetdb4-server.postinst  Thu Jul 22 09:47:29 2010 +0200
@@ -10,9 +10,9 @@
 if ! getent passwd monetdb  /dev/null; then
 adduser --system --ingroup monetdb --home /var/lib/monetdb 
--disabled-password --shell /usr/sbin/nologin monetdb
 fi
-   mkdir -p /var/MonetDB4
-   chown monetdb:monetdb /var/MonetDB4
-   chmod ug=rwx,o= /var/MonetDB4
+   mkdir -p /var/MonetDB4/dbfarm
+   chown monetdb:monetdb /var/MonetDB4 /var/MonetDB4/dbfarm
+   chmod ug=rwx,g+s,o= /var/MonetDB4 /var/MonetDB4/dbfarm
 ;;
 
 abort-upgrade|abort-remove|abort-deconfigure)
diff -r 5343927ddb65 -r f8fff5403988 MonetDB5/MonetDB-server.spec
--- a/MonetDB5/MonetDB-server.spec  Wed Jul 21 22:08:27 2010 +0200
+++ b/MonetDB5/MonetDB-server.spec  Thu Jul 22 09:47:29 2010 +0200
@@ -133,7 +133,7 @@
 make install DESTDIR=$RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB
-mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5
+mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5/dbfarm
 # insert example db here!
 
 # cleanup stuff we don't want to install
@@ -184,8 +184,9 @@
 %dir %{_libdir}/MonetDB5/autoload
 %{_libdir}/MonetDB5/autoload/*xml*.mal
 
-%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB
-%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5
+%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB
+%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5
+%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5/dbfarm
 
 %config(noreplace) %{_sysconfdir}/monetdb5.conf
 %{_mandir}/man5/monetdb5.conf.5.gz
diff -r 5343927ddb65 -r f8fff5403988 MonetDB5/debian/monetdb5-server.dirs
--- a/MonetDB5/debian/monetdb5-server.dirs  Wed Jul 21 22:08:27 2010 +0200
+++ b/MonetDB5/debian/monetdb5-server.dirs  Thu Jul 22 09:47:29 2010 +0200
@@ -1,1 +1,2 @@
 /var/MonetDB5
+/var/MonetDB5/dbfarm
diff -r 5343927ddb65 -r f8fff5403988 MonetDB5/debian/monetdb5-server.postinst
--- a/MonetDB5/debian/monetdb5-server.postinst  Wed Jul 21 22:08:27 2010 +0200
+++ b/MonetDB5/debian/monetdb5-server.postinst  Thu Jul 22 09:47:29 2010 +0200
@@ -10,9 +10,9 @@
 if ! getent passwd monetdb  /dev/null; then
 adduser --system --ingroup monetdb --home /var/lib/monetdb 
--disabled-password --shell /usr/sbin/nologin monetdb
 fi
-   mkdir -p /var/MonetDB5
-   chown monetdb:monetdb /var/MonetDB5
-   chmod ug=rwx,o= /var/MonetDB5
+   mkdir -p /var/MonetDB5/dbfarm
+   chown monetdb:monetdb /var/MonetDB5 /var/MonetDB5/dbfarm
+   chmod ug=rwx,g+s,o= /var/MonetDB5 /var/MonetDB5/dbfarm
 ;;
 
 abort-upgrade|abort-remove|abort-deconfigure)
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2010 - Merge heads.

2010-07-12 Thread Sjoerd Mullender
Changeset: 42f1977c5854 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=42f1977c5854
Modified Files:

Branch: Jun2010
Log Message:

Merge heads.


diffs (15 lines):

diff -r b36ce8c95924 -r 42f1977c5854 sql/ChangeLog.Jun2010
--- a/sql/ChangeLog.Jun2010 Mon Jul 12 11:07:11 2010 +0200
+++ b/sql/ChangeLog.Jun2010 Mon Jul 12 11:27:57 2010 +0200
@@ -5,6 +5,9 @@
 - Make queries like
   (SELECT ...) UNION ALL (SELECT ...) ORDER BY ...;
   work, again, that were broken since Jun 22 2010
-  triggering errors like
-  !ORDER BY: missing select operator
+  triggering errors like ORDER BY: missing select operator
 
+* Fri Jul  9 2010 Fabian Groffen fab...@cwi.nl
+- Removed false connection warning about missing SQL script (could not
+  read createdb.sql) received by the client upon first connect on a
+  newly created database.  Bug #2591
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2010 - Merge heads.

2010-07-05 Thread Sjoerd Mullender
Changeset: 1976120a95df for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1976120a95df
Modified Files:

Branch: Jun2010
Log Message:

Merge heads.


diffs (144 lines):

diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr.mx
--- a/MonetDB5/src/modules/kernel/aggr.mx   Mon Jul 05 10:19:56 2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr.mx   Mon Jul 05 10:44:53 2010 +0200
@@ -196,11 +196,15 @@
 
 @-
 In case the head of the group extend (e) is sorted, we assume that also the
-the tail of group map (g) almost sorted --- or at least clustered such
-that group IDs in cluster i are smaller than those in cluster i+1; this is
-the case if the first grouping attribute (column/BAT) is sorted --- and
-resorted to local scanning rather than (inherently random and expensive)
-hash-lookups.
+the tail of the group map (g) is almost sorted or mostly ascending ---
+or at least clustered such that group IDs in cluster i are smaller than
+those in cluster i+1; this is the case if the first grouping attribute
+(column/BAT) is sorted --- and resorted to local scanning rather than
+(inherently random and expensive) hash-lookups.
+Lacking a suitable and efficient way to detect that the tail of the group
+map (g) is almost sorted or mostly ascending, we require that the tail
+of the group map (g) is sorted --- the local scanning performs much worse
+than hash-lookups in case the tail of the group map (g) is in random order.
 @h
 #define MERGE_aggr_init\
BUN _i = 0, _j = BATcount(bn), _r = BUNfirst(bn);   \
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_be_avg.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_avg.mxMon Jul 05 10:19:56 
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_avg.mxMon Jul 05 10:44:53 
2010 +0200
@@ -236,7 +236,7 @@
} else {

@:aggrX3_avg(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),r-off)@
}
-   } else if (BAThordered(e)1) {
+   } else if (BATtordered(b)BAThordered(e)1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df 
MonetDB5/src/modules/kernel/aggr_be_count.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_count.mx  Mon Jul 05 10:19:56 
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_count.mx  Mon Jul 05 10:44:53 
2010 +0200
@@ -232,7 +232,7 @@
} else {

@:aggrX3_count(0,0,SCANfndOID,loc,BUNhloc(bi,p),BUNtloc(bni,r))@
}
-   } else if (BAThordered(e)1) {
+   } else if (BATtordered(b)BAThordered(e)1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df 
MonetDB5/src/modules/kernel/aggr_be_minmax.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_minmax.mx Mon Jul 05 10:19:56 
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_minmax.mx Mon Jul 05 10:44:53 
2010 +0200
@@ -293,7 +293,7 @@
} else {

@:aggrx3_minm...@5(@2,0,SCANfndOID,loc,BUNhloc(bi,p),@3,@4,r-off,@6)@
}
-   } else if (BAThordered(e)1) {
+   } else if (BATtordered(b)BAThordered(e)1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_be_prod.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_prod.mx   Mon Jul 05 10:19:56 
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_prod.mx   Mon Jul 05 10:44:53 
2010 +0200
@@ -234,7 +234,7 @@
} else {

@:aggrX3_prod(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),@3,r-off)@
}
-   } else if (BAThordered(e)1) {
+   } else if (BATtordered(b)BAThordered(e)1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_be_sum.mx
--- a/MonetDB5/src/modules/kernel/aggr_be_sum.mxMon Jul 05 10:19:56 
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_be_sum.mxMon Jul 05 10:44:53 
2010 +0200
@@ -232,7 +232,7 @@
} else {

@:aggrX3_sum(0,0,SCANfndOID,loc,BUNhloc(bi,p),@1,@2,b...@2(bni,r),@3,r-off)@
}
-   } else if (BAThordered(e)1) {
+   } else if (BATtordered(b)BAThordered(e)1) {
/* merge lookup */
MERGE_aggr_init;
if (BAThdense(b)) {
diff -r c9fcf41b58f5 -r 1976120a95df MonetDB5/src/modules/kernel/aggr_bge_avg.mx
--- a/MonetDB5/src/modules/kernel/aggr_bge_avg.mx   Mon Jul 05 10:19:56 
2010 +0200
+++ b/MonetDB5/src/modules/kernel/aggr_bge_avg.mx   Mon Jul 05 10:44:53 
2010 +0200
@@ -279,7 +279,7 @@
} else {

MonetDB: Jun2010 - Merge heads.

2010-06-30 Thread Sjoerd Mullender
Changeset: 40594bfd57a5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40594bfd57a5
Modified Files:

Branch: Jun2010
Log Message:

Merge heads.


diffs (35 lines):

diff -r 9665844e6545 -r 40594bfd57a5 MonetDB/src/gdk/gdk_system.mx
--- a/MonetDB/src/gdk/gdk_system.mx Wed Jun 30 10:22:29 2010 +0200
+++ b/MonetDB/src/gdk/gdk_system.mx Wed Jun 30 10:27:35 2010 +0200
@@ -372,22 +372,20 @@
 #  if defined(HAVE_SYSCONF)  defined(_SC_PHYS_PAGES)
_MT_npages = sysconf(_SC_PHYS_PAGES);
 #  else
-#   if defined(HAVE_GETRLIMIT)  defined(RLIMIT_RSS)
+#   if defined(HAVE_SYS_SYSCTL_H)  defined(HW_MEMSIZE)
{
-   struct rlimit rl;
+   int mib[2] = { CTL_HW, HW_MEMSIZE };
+   unsigned int namelen = sizeof(mib) / sizeof(mib[0]);
+   uint64_t size;
+   size_t len = sizeof(size);
 
-   /* Specifies the limit (in pages) of the process's resident set
-* (the number of virtual pages resident in RAM). This limit
-* only has effect in Linux 2.4.x, x  30, and there only
-* affects calls to madvise() specifying MADV_WILLNEED */
-   /* FIXME: this looks like a total wrong thing to check in any
-* case to me */
-   getrlimit(RLIMIT_RSS, rl);
-   _MT_npages = rl.rlim_cur / _MT_pagesize;
+   if (sysctl(mib, namelen, size, len, NULL, 0) = 0) {
+   _MT_npages = size / _MT_pagesize;
+   }
}
 #   else
 #error don't know how to get the amount of physical memory for your OS
-#   endif /* getrlimit */
+#   endif /* sysctl */
 #  endif /* sysconf */
 # endif/* GlobalMemoryStatus */
 #endif /* GlobalMemoryStatusEx */
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2010 - Merge heads.

2010-06-23 Thread Sjoerd Mullender
Changeset: 1ec5859c4994 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ec5859c4994
Modified Files:

Branch: Jun2010
Log Message:

Merge heads.


diffs (9 lines):

diff -r 90f0410e1611 -r 1ec5859c4994 .hgtags
--- a/.hgtags   Tue Jun 22 18:45:20 2010 +0200
+++ b/.hgtags   Wed Jun 23 09:34:35 2010 +0200
@@ -406,3 +406,5 @@
 e821c6a9dd33b30ccbb51376b6db7355cf12684e Jun2006_root
 d3db8bef1dd54bcfb335599338a374b4ca8975fa Jun2010_root
 659965ec908548fa64649bce37f84e245428ce7b Jun2010_1
+659965ec908548fa64649bce37f84e245428ce7b Jun2010_1
+d83c56c4bba705257e09846d7f7e23bf5bd96627 Jun2010_1
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list