MonetDB: Jan2014 - propagated changeset 8f619c2ff336 to Solaris ...

2014-08-07 Thread Stefan Manegold
Changeset: 42f2c9b9ea9e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=42f2c9b9ea9e
Modified Files:
sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Windows
Branch: Jan2014
Log Message:

propagated changeset 8f619c2ff336 to Solaris  Windows output


diffs (35 lines):

diff --git 
a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris 
b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
--- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
+++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
@@ -67,9 +67,9 @@ stderr of test 'overflow.SF-2853458` in 
 # 22:26:13   mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 
 # 22:26:13   
 
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
+MAPI  = (monetdb) /var/tmp/mtest-9389/.s.monetdb.34946
 QUERY = select cast(power(2,64) as bigint);
-ERROR = !overflow in conversion of 1.84467441e+19 to lng.
+ERROR = !overflow in conversion of 1.8446744073709552e+19 to lng.
 
 # 22:26:13   
 # 22:26:13   Done.
diff --git 
a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Windows 
b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Windows
--- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Windows
+++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Windows
@@ -67,12 +67,12 @@ stderr of test 'overflow.SF-2853458` in 
 # 22:26:13   mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 
 # 22:26:13   
 
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
+MAPI  = (monetdb) /var/tmp/mtest-9389/.s.monetdb.34946
 QUERY = select cast(power(2,63) as bigint);
-ERROR = !overflow in conversion of 9.22337204e+018 to lng.
-MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
+ERROR = !overflow in conversion of 9.2233720368547758e+018 to lng.
+MAPI  = (monetdb) /var/tmp/mtest-9389/.s.monetdb.34946
 QUERY = select cast(power(2,64) as bigint);
-ERROR = !overflow in conversion of 1.84467441e+019 to lng.
+ERROR = !overflow in conversion of 1.8446744073709552e+019 to lng.
 
 # 22:26:13   
 # 22:26:13   Done.
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: rdf - Check if a merging drops precision significantly

2014-08-07 Thread Minh-Duc Pham
Changeset: d4edd12320f1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4edd12320f1
Modified Files:
monetdb5/extras/rdf/rdfschema.c
Branch: rdf
Log Message:

Check if a merging drops precision significantly


diffs (99 lines):

diff --git a/monetdb5/extras/rdf/rdfschema.c b/monetdb5/extras/rdf/rdfschema.c
--- a/monetdb5/extras/rdf/rdfschema.c
+++ b/monetdb5/extras/rdf/rdfschema.c
@@ -1561,6 +1561,49 @@ CS* creatCS(oid csId, int freqIdx, int n
return cs; 
 }
 
+
+static 
+void getNumCombinedP(oid* arr1, oid* arr2, int m, int n, int *numCombineP){
+   
+   int i = 0, j = 0;
+   int pos = 0;
+
+   while( j  m  i  n )
+   {
+   if( arr1[j]  arr2[i] ){
+   pos++;
+   j++;
+   }
+   else if( arr1[j] == arr2[i] )
+   {
+   pos++;
+   j++;
+   i++;
+   }
+   else if( arr1[j]  arr2[i] ){
+   pos++;
+   i++;
+   }
+   }
+   if (j == m  i  n){
+   while (i  n){
+   pos++;
+   i++;
+   }   
+   } 
+
+   if (j  m  i == n){
+   while (j  m){
+   pos++;
+   j++;
+   }   
+   } 
+   
+   *numCombineP = pos; 
+
+   
+}
+
 static 
 void mergeOidSets(oid* arr1, oid* arr2, oid* mergeArr, int m, int n, int 
*numCombineP){

@@ -3964,6 +4007,32 @@ void freeLabelStat(LabelStat *labelStat)
 }
 #endif
 
+static
+char isSignificationPrecisionDrop(CS *cs1, CS *cs2){
+   int newSupport = 0;
+   int newFill = 0; 
+   float fillRatio1, fillRatio2, minFillRatio; 
+   float estimatedFillRatio = 0.0;
+   int numCombineP = 0;
+   
+   newSupport = cs1-support + cs2-support;
+   newFill = cs1-numFill + cs2-numFill; 
+   
+   getNumCombinedP(cs1-lstProp, cs2-lstProp, cs1-numProp, cs2-numProp, 
numCombineP);
+
+   fillRatio1 = (float) cs1-numFill / (float) (cs1-numProp * 
cs1-support); 
+   fillRatio2 = (float) cs2-numFill / (float) (cs2-numProp * 
cs2-support); 
+   minFillRatio = (fillRatio1  fillRatio2) ? fillRatio2 : fillRatio1;
+
+   estimatedFillRatio = (float) newFill / (float) (newSupport * 
numCombineP);
+
+   if ((minFillRatio / estimatedFillRatio)  2) return 1; 
+
+   return 0;
+   
+
+}
+
 static 
 void doMerge(CSset *freqCSset, int ruleNum, int freqId1, int freqId2, oid 
*mergecsId, CSlabel** labels, oid** ontmetadata, int ontmetadataCount, oid 
name, int isType, int isOntology, int isFK){
CS  *mergecs; 
@@ -3974,6 +4043,12 @@ void doMerge(CSset *freqCSset, int ruleN
 
cs1 = (freqCSset-items[freqId1]);
cs2 = (freqCSset-items[freqId2]);
+
+   if (isSignificationPrecisionDrop(cs1, cs2)){
+   printf(Merging freqCS %d and %d may significantly drop 
precision\n, freqId1, freqId2);
+   return;
+   }   
+
//Check whether these CS's belong to any mergeCS
if (cs1-parentFreqIdx == -1  cs2-parentFreqIdx == -1){  /* New 
merge */
mergecs = mergeTwoCSs(*cs1,*cs2, freqId1,freqId2, *mergecsId);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jan2014 - Possible fix for Bug #3513

2014-08-07 Thread Hannes Muehleisen
Changeset: 1ae0470d6038 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ae0470d6038
Modified Files:
gdk/gdk_storage.c
Branch: Jan2014
Log Message:

Possible fix for Bug #3513


Unterschiede (20 Zeilen):

diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -262,10 +262,12 @@ GDKextendf(int fd, size_t size, const ch
 int
 GDKextend(const char *fn, size_t size)
 {
-   int rt = -1, fd;
-
-   rt = -1;
-   if ((fd = open(fn, O_RDWR)) = 0) {
+   int fd, rt = -1, flags = O_RDWR;
+#ifdef WIN32
+   /* On Windows, open() fails if the file is bigger than 2^32 bytes 
without O_BINARY. */
+   flags |= O_BINARY;
+#endif
+   if ((fd = open(fn, flags)) = 0) {
rt = GDKextendf(fd, size, fn);
close(fd);
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jan2014 - Remove writing bla: to .gdk_lock file.

2014-08-07 Thread Sjoerd Mullender
Changeset: 077f26b22108 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=077f26b22108
Modified Files:
tools/merovingian/utils/database.c
Branch: Jan2014
Log Message:

Remove writing bla: to .gdk_lock file.
It doesn't seem to affect anything, despite the comment.
This fixes bug 3497.


diffs (20 lines):

diff --git a/tools/merovingian/utils/database.c 
b/tools/merovingian/utils/database.c
--- a/tools/merovingian/utils/database.c
+++ b/tools/merovingian/utils/database.c
@@ -132,16 +132,6 @@ char* db_create(char* dbname) {
free(dbfarm);
return(strdup(buf));
}
-   /* to all insanity, .gdk_lock is valid if it contains a
-* ':', which it does by pure coincidence of time having a
-* ':' in there twice... */
-   if (fwrite(bla:, 1, 4, f)  4) {
-   snprintf(buf, sizeof(buf), cannot write lock file: %s,
-   strerror(errno));
-   free(dbfarm);
-   fclose(f);
-   return(strdup(buf));
-   }
fclose(f);
 
/* generate a vault key */
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jan2014 - SQL-dump: approved stable output after change...

2014-08-07 Thread Stefan Manegold
Changeset: 64939b9031c6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=64939b9031c6
Modified Files:
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.32bit
clients/Tests/SQL-dump.stable.out.64bit.oid32
clients/Tests/SQL-dump_gsl.stable.out
clients/Tests/SQL-dump_gsl.stable.out.oid32
clients/Tests/SQL-dump_nogeom.stable.out
Branch: Jan2014
Log Message:

SQL-dump: approved stable output after changeset 8f619c2ff336


diffs (truncated from 1020 to 300 lines):

diff --git a/clients/Tests/SQL-dump.stable.out 
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -4258,86 +4258,86 @@ 4418826 arg_2 blob  0   0   2
 4419   827 resultblob  0   0   0
 4420   827 arg_1 blob  0   0   1
 4421   827 arg_2 blob  0   0   2
-4422   828 resultdouble53  0   0
-4423   828 arg_1 double53  0   1
-4424   828 arg_2 double53  0   2
-4425   829 resultdouble53  0   0
-4426   829 arg_1 double53  0   1
-4427   830 resultdouble53  0   0
-4428   830 arg_1 double53  0   1
-4429   831 resultdouble53  0   0
-4430   831 arg_1 double53  0   1
-4431   832 resultdouble53  0   0
-4432   832 arg_1 double53  0   1
-4433   833 resultdouble53  0   0
-4434   833 arg_1 double53  0   1
-4435   834 resultdouble53  0   0
-4436   834 arg_1 double53  0   1
-4437   835 resultdouble53  0   0
-4438   835 arg_1 double53  0   1
-4439   836 resultdouble53  0   0
-4440   836 arg_1 double53  0   1
-4441   837 resultdouble53  0   0
-4442   837 arg_1 double53  0   1
-4443   838 resultdouble53  0   0
-   838 arg_1 double53  0   1
-4445   838 arg_2 double53  0   2
-4446   839 resultdouble53  0   0
-4447   839 arg_1 double53  0   1
-4448   840 resultdouble53  0   0
-4449   840 arg_1 double53  0   1
-4450   841 resultdouble53  0   0
-4451   841 arg_1 double53  0   1
-4452   842 resultdouble53  0   0
-4453   842 arg_1 double53  0   1
-4454   843 resultdouble53  0   0
-4455   843 arg_1 double53  0   1
-4456   844 resultdouble53  0   0
-4457   844 arg_1 double53  0   1
-4458   845 resultdouble53  0   0
-4459   845 arg_1 double53  0   1
-4460   846 resultdouble53  0   0
-4461   846 arg_1 double53  0   1
-4462   847 resultreal  24  0   0
-4463   847 arg_1 real  24  0   1
-4464   847 arg_2 real  24  0   2
-4465   848 resultreal  24  0   0
-4466   848 arg_1 real  24  0   1
-4467   849 resultreal  24  0   0
-4468   849 arg_1 real  24  0   1
-4469   850 resultreal  24  0   0
-4470   850 arg_1 real  24  0   1
-4471   851 resultreal  24  0   0
-4472   851 arg_1 real  24  0   1
-4473   852 resultreal  24  0   0
-4474   852 arg_1 real  24  0   1
-4475   853 resultreal  24  0   0
-4476   853 arg_1 real  24  0   1
-4477   854 resultreal  24  0   0
-4478   854 arg_1 real  24  0   1
-4479   855 resultreal  24  0   0
-4480   855 arg_1 real  24  0   1
-4481   856 resultreal  24  0   0
-4482   856 arg_1 real  24  0   1
-4483   857 resultreal  24  0   0
-4484   857 arg_1 real  24  0   1
-4485   857 arg_2 real  24  0   2
-4486   858 resultreal  24  0   0
-4487   858 arg_1 real  24  0   1
-4488   859 resultreal  24  0   0
-4489   859 arg_1 real  24  0   1
-4490   860 resultreal  24  0   0
-4491   860 arg_1 real  24  0   1
-4492   861 resultreal  24  0   0
-4493   861 arg_1 real  24  0   1
-4494   862 resultreal  24  0   0
-4495   862 arg_1 real  24  0   1
-4496   863 resultreal  24  0   0
-4497   

MonetDB: default - approved shorted query quotes in error messag...

2014-08-07 Thread Stefan Manegold
Changeset: c6a34e826c82 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c6a34e826c82
Modified Files:
sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
sql/test/BugTracker/Tests/broken_join.SF-1373391.stable.err

sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err
Branch: default
Log Message:

approved shorted query quotes in error messages after changeset 82187f24d94e

... assuming these changes were / are intended; IMHO they are acceptable ...


diffs (92 lines):

diff --git a/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err 
b/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
--- a/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
+++ b/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
@@ -21,10 +21,7 @@ QUERY = select case i
 ERROR = !syntax error, unexpected FROM, expecting END in: select case i
 !when 0 then 'base table'
 !when 1 then 'system table'
-!when 2 then 'view'
-!when 3 then 'session temporary table'
-!when 4 then 'temporary table'
-!from
+!when 2 then 'v
 
 # 23:52:38   
 # 23:52:38   Done.
diff --git a/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err 
b/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
--- a/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
+++ b/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
@@ -89,12 +89,7 @@ QUERY = CREATE TABLE phpbb_attachments (
poster_id integer DEFAULT '0' NOT NULL ,
is_orphan LONG DEFAULT '1' NOT NULL ,
 ERROR = !type (long) unknown in: create table phpbb_attachments (
-!  attach_id integer default next value for 
sys.phpbb_attachments_seq,
-!  post_msg_id integer default '0' not null ,
-!  topic_id integer default '0' not null ,
-!  in_message smallint default '0' not null ,
-!  poster_id integer default '0' not null ,
-!  is_orphan long default
+!  attach_id integer default next value for sys
 MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
 QUERY = CREATE TABLE phpbb_attachments (
attach_id integer DEFAULT next value for 
sys.phpbb_attachments_seq,
diff --git a/sql/test/BugTracker/Tests/broken_join.SF-1373391.stable.err 
b/sql/test/BugTracker/Tests/broken_join.SF-1373391.stable.err
--- a/sql/test/BugTracker/Tests/broken_join.SF-1373391.stable.err
+++ b/sql/test/BugTracker/Tests/broken_join.SF-1373391.stable.err
@@ -28,42 +28,7 @@ QUERY = select urlid,clicktime from
 urls.suburl6x0=clicks.suburl6x0 and
 ERROR = !syntax error, unexpected ')', expecting SCOLON in: select 
urlid,clicktime from
 !(clicks left outer join urls on
-!urls.suburl0x0=clicks.suburl0x0 and
-!urls.suburl0x1=clicks.suburl0x1 and
-!urls.suburl1x0=clicks.suburl1x0 and
-!urls.suburl1x1=clicks.suburl1x1 and
-!urls.suburl2x0=clicks.suburl2x0 and
-!urls.suburl2x1=clicks.suburl2x1 and
-!urls.suburl3x0=clicks.suburl3x0 and
-!urls.suburl3x1=clicks.suburl3x1 and
-!urls.suburl4x0=clicks.suburl4x0 and
-!urls.suburl4x1=clicks.suburl4x1 and
-!urls.suburl5x0=clicks.suburl5x0 and
-!urls.suburl5x1=clicks.suburl5x1 and
-!urls.suburl6x0=clicks.suburl6x0 and
-!urls.suburl6x1=clicks.suburl6x1 and
-!urls.suburl7x0=clicks.suburl7x0 and
-!urls.suburl7x1=clicks.suburl7x1 and
-!urls.suburl8x0=clicks.suburl8x0 and
-!urls.suburl8x1=clicks.suburl8x1 and
-!urls.suburl9x0=clicks.suburl9x0 and
-!urls.suburl9x1=clicks.suburl9x1 and
-!urls.suburl10x0=clicks.suburl10x0 and
-!urls.suburl10x1=clicks.suburl10x1 and
-!urls.suburl11x0=clicks.suburl11x0 and
-!urls.suburl11x1=clicks.suburl11x1 and
-!urls.suburl12x0=clicks.suburl12x0 and
-!urls.suburl12x1=clicks.suburl12x1 and
-!urls.suburl13x0=clicks.suburl13x0 and
-!urls.suburl13x1=clicks.suburl13x1 and
-!urls.suburl14x0=clicks.suburl14x0 and
-!urls.suburl14x1=clicks.suburl14x1 and
-!urls.suburl15x0=clicks.suburl15x0 and
-!urls.suburl15x1=clicks.suburl15x1 and
-!urls.suburl16x0=clicks.suburl16x0 and
-!urls.suburl16x1=clicks.suburl16x1) where
-!clicktime'00:00:00' and clicktime'23:59
-!:59')
+!urls.suburl0x0=click
 
 # 14:15:47   
 # 14:15:47   Done.
diff --git 
a/sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err 
b/sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err
--- 
a/sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err
+++ 
b/sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err
@@ -22,8 +22,7 @@ ERROR = !syntax error, unexpected ORDER,

MonetDB: default - stethoscope--help: approved new output after ...

2014-08-07 Thread Stefan Manegold
Changeset: 02dbb2dd35bc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=02dbb2dd35bc
Modified Files:
clients/mapiclient/Tests/stethoscope--help.stable.err
Branch: default
Log Message:

stethoscope--help: approved new output after changeset 71e8959de2b9


diffs (20 lines):

diff --git a/clients/mapiclient/Tests/stethoscope--help.stable.err 
b/clients/mapiclient/Tests/stethoscope--help.stable.err
--- a/clients/mapiclient/Tests/stethoscope--help.stable.err
+++ b/clients/mapiclient/Tests/stethoscope--help.stable.err
@@ -17,7 +17,7 @@ stethoscope [options] [dbname] +[trace o
   -h | --host=hostname
   -? | --help
 
-The trace options (default 'ISTest'):
+The trace options (default 'ISTestn'):
   S = monitor start of instruction profiling
   a = aggregate clock ticks per instruction
   e = event counter
@@ -29,6 +29,7 @@ The trace options (default 'ISTest'):
   c = cpu statistics (utime,ctime,stime,cstime)
   m = rss memory as provided by OS (in MB)
   M = memory footprint of non-persistent objects
+  n = numa intra socket data flow
   r = block reads
   w = block writes
   b = bytes read/written
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - more fixes after changeset b62643655146: remo...

2014-08-07 Thread Stefan Manegold
Changeset: 801e0f6da5bb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=801e0f6da5bb
Modified Files:
monetdb5/mal/Tests/All
monetdb5/optimizer/Tests/All
Branch: default
Log Message:

more fixes after changeset b62643655146: remove deleted tests from All files


diffs (39 lines):

diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -134,7 +134,6 @@ tst256
 tst260
 tst2570
 # tst265 -- windowsum and slidingsum have been removed
-tst267
 # opens /tmp/MonetEvents, i.e. not on Windows:
 NOT_WIN32?tst270
 tst272
diff --git a/monetdb5/optimizer/Tests/All b/monetdb5/optimizer/Tests/All
--- a/monetdb5/optimizer/Tests/All
+++ b/monetdb5/optimizer/Tests/All
@@ -18,10 +18,7 @@ tst4630
 tst4700
 tst4701
 # tst4730 -- uses group.refine
-tst4800
-tst4801
 tst4820
-tst4900
 
 qep00
 qep01
@@ -81,13 +78,11 @@ CXerror1
 #the remainder are snippets used in the reference manual
 CMexample
 CRexample
-AEexample
 ARexample
 DCexample
 DCexample2
 ESexample
 FTexample
-GCexample
 GCexample01
 CXexample
 JPexample
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - limit_in_prepare.Bug-2552: re-aligned 32-bit ...

2014-08-07 Thread Stefan Manegold
Changeset: 5eec7ffbc4f3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5eec7ffbc4f3
Modified Files:

sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
Branch: default
Log Message:

limit_in_prepare.Bug-2552: re-aligned 32-bit output with default output


diffs (130 lines):

diff --git 
a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit 
b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
--- a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
+++ b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
@@ -16,12 +16,64 @@ stdout of test 'limit_in_prepare.Bug-255
 # MonetDB/SQL module v2.38.0 loaded
 
 Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 19_cluster.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 41_jsonstore.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 99_system.sql
 
+# 22:28:06   
+# 22:28:06   mclient -lsql -ftest -Eutf-8 -i -e 
--host=/var/tmp/mtest-10173 --port=36549
+# 22:28:06   
 
-# 08:45:11   
-# 08:45:11   mclient -lsql -ftest -i -e --host=alf --port=35663 
-# 08:45:11   
-
+#CREATE TABLE sys.tbls (
+#  idINTEGER,
+#  name  VARCHAR(1024),
+#  schema_id INTEGER,
+#  query VARCHAR(2048),
+#  type  SMALLINT,
+#  systemBOOLEAN,
+#  commit_action SMALLINT,
+#  readonly  BOOLEAN,
+#  temporary SMALLINT
+#);
+#COPY 40 RECORDS INTO sys.tbls FROM stdin USING DELIMITERS '\t','\n','';
+#2001  schemas   2000NULL0   true0   false   0
+#2007  types 2000NULL0   true0   false   0
+#2016  functions 2000NULL0   true0   false   0
+#2027  args  2000NULL0   true0   false   0
+#2036  sequences 2000NULL0   true0   false   0
+#2046  dependencies  2000NULL0   true0   false   0
+#2050  connections   2000NULL0   true0   false   0
+#2059  _tables   2000NULL0   true0   false   0
+#2068  _columns  2000NULL0   true0   false   0
+#2079  keys  2000NULL0   true0   false   0
+#2086  idxs  2000NULL0   true0   false   0
+[ 40   ]
+#create table rr (id int);
+#insert into rr values (1),(2),(3);
 [ 3]
 #prepare select * from rr limit ?;
 #prepare select * from rr limit ?;
@@ -43,20 +95,20 @@ Ready.
 % .prepare,.prepare,   .prepare,   .prepare,   .prepare,   
.prepare # table_name
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,str,str,str # type
-% 8,   4,  1,  0,  6,  13 # length
-[ varchar,   1024,   0,  , tables,   name  ]
-[ int,   32, 0,  , tables,   schema_id ]
-[ varchar,   2048,   0,  , tables,   query ]
-[ smallint,  16, 0,  , tables,   type  ]
-[ boolean,   1,  0,  , tables,   system]
-[ smallint,  16, 0,  , tables,   commit_action ]
-[ boolean,   1,  0,  , tables,   readonly  ]
-[ tinyint,   8,  0,  , tables,   temporary ]
-#exec  2 ();
-% .tables, .tables,.tables,.tables,.tables,
.tables,.tables,.tables # table_name
+% 8,   4,  1,  0,  4,  13 # length
+[ varchar,   1024,   0,  , tbls, name  ]
+[ int,   32, 0,  , tbls, schema_id ]
+[ varchar,   2048,   0,  , tbls, query ]
+[ smallint,  16, 0,  , tbls, type  ]
+[ boolean,   1,  0,  , tbls, system]
+[ smallint,  16, 0,  , tbls, commit_action ]
+[ boolean,   1,  0,  , tbls, readonly  ]
+[ smallint,  16, 0,  , tbls, temporary ]
+#exec  7 ();
+% sys.tbls,sys.tbls,   sys.tbls,   sys.tbls,   sys.tbls,   
sys.tbls,   sys.tbls,   sys.tbls # table_name
 % name,schema_id,  query,  type,   system, commit_action,  

MonetDB: default - fixed crash in manifold called functions with...

2014-08-07 Thread Niels Nes
Changeset: 4cda54f904b1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4cda54f904b1
Modified Files:
monetdb5/modules/mal/manifold.c
Branch: default
Log Message:

fixed crash in manifold called functions with external atoms


diffs (21 lines):

diff --git a/monetdb5/modules/mal/manifold.c b/monetdb5/modules/mal/manifold.c
--- a/monetdb5/modules/mal/manifold.c
+++ b/monetdb5/modules/mal/manifold.c
@@ -129,7 +129,7 @@ MANIFOLDjob(MULTItask *mut)
 {  int i;
char *p, *q;
char **args;
-   str y, msg= MAL_SUCCEED;
+   str y = NULL, msg= MAL_SUCCEED;
 
args = (char**) GDKzalloc(sizeof(char*) * mut-pci-argc);
if( args == NULL)
@@ -167,6 +167,8 @@ MANIFOLDjob(MULTItask *mut)
default:
msg= createException(MAL,mal.manifold,manifold call 
limitation );
}
+   if (ATOMextern(mut-args[0].type)  y) 
+   GDKfree(y); 
 bunins_failed:
GDKfree(args);
return msg;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - use subslice instead of slice

2014-08-07 Thread Niels Nes
Changeset: de3fbece100b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de3fbece100b
Modified Files:
monetdb5/optimizer/opt_pushselect.c
Branch: default
Log Message:

use subslice instead of slice


diffs (12 lines):

diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -468,7 +468,7 @@ OPTpushselectImplementation(Client cntxt
ValRecord cst;
 
/* slice the candidates */
-   setFunctionId(r, sliceRef);
+   setFunctionId(r, subsliceRef);
getArg(r, 0) = newTmpVariable(mb, 
newBatType(TYPE_oid, TYPE_oid));
getArg(r, 1) = getArg(s, 1); 
cst.vtype = getArgType(mb, r, 2);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - fixed problem in using firstn with group result

2014-08-07 Thread Niels Nes
Changeset: 978a2b87f602 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=978a2b87f602
Modified Files:
sql/backends/monet5/sql_gencode.c
Branch: default
Log Message:

fixed problem in using firstn with group result


diffs (26 lines):

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
@@ -1002,10 +1002,10 @@ static int
return -1;
c = k;
}
-   if (s-flag) {
-   int topn = 0, flag = s-flag, utopn = flag  2;
+   if (s-flag1) {
+   int topn = 0, flag = s-flag, grps = flag  2;
 
-   flag = 2;
+   flag = 1;
 
q = newStmt1(mb, calcRef, +);
q = pushArgument(mb, q, offset);
@@ -1015,7 +1015,7 @@ static int
topn = getDestVar(q);
 
q = newStmt(mb, algebraRef, firstnRef);
-   if (utopn)
+   if (grps) /* we need the groups for the next 
firstn */
q = pushReturn(mb, q, 
newTmpVariable(mb, TYPE_any));
q = pushArgument(mb, q, c);
if (p)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - merged

2014-08-07 Thread Niels Nes
Changeset: a95ebdfb2c99 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a95ebdfb2c99
Modified Files:
clients/mapiclient/Tests/stethoscope--help.stable.err
monetdb5/mal/Tests/All
monetdb5/optimizer/Tests/All

sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
Branch: default
Log Message:

merged


diffs (189 lines):

diff --git a/clients/mapiclient/Tests/stethoscope--help.stable.err 
b/clients/mapiclient/Tests/stethoscope--help.stable.err
--- a/clients/mapiclient/Tests/stethoscope--help.stable.err
+++ b/clients/mapiclient/Tests/stethoscope--help.stable.err
@@ -17,7 +17,7 @@ stethoscope [options] [dbname] +[trace o
   -h | --host=hostname
   -? | --help
 
-The trace options (default 'ISTest'):
+The trace options (default 'ISTestn'):
   S = monitor start of instruction profiling
   a = aggregate clock ticks per instruction
   e = event counter
@@ -29,6 +29,7 @@ The trace options (default 'ISTest'):
   c = cpu statistics (utime,ctime,stime,cstime)
   m = rss memory as provided by OS (in MB)
   M = memory footprint of non-persistent objects
+  n = numa intra socket data flow
   r = block reads
   w = block writes
   b = bytes read/written
diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -134,7 +134,6 @@ tst256
 tst260
 tst2570
 # tst265 -- windowsum and slidingsum have been removed
-tst267
 # opens /tmp/MonetEvents, i.e. not on Windows:
 NOT_WIN32?tst270
 tst272
diff --git a/monetdb5/optimizer/Tests/All b/monetdb5/optimizer/Tests/All
--- a/monetdb5/optimizer/Tests/All
+++ b/monetdb5/optimizer/Tests/All
@@ -18,10 +18,7 @@ tst4630
 tst4700
 tst4701
 # tst4730 -- uses group.refine
-tst4800
-tst4801
 tst4820
-tst4900
 
 qep00
 qep01
@@ -81,13 +78,11 @@ CXerror1
 #the remainder are snippets used in the reference manual
 CMexample
 CRexample
-AEexample
 ARexample
 DCexample
 DCexample2
 ESexample
 FTexample
-GCexample
 GCexample01
 CXexample
 JPexample
diff --git 
a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit 
b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
--- a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
+++ b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
@@ -16,12 +16,64 @@ stdout of test 'limit_in_prepare.Bug-255
 # MonetDB/SQL module v2.38.0 loaded
 
 Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 19_cluster.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 41_jsonstore.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 99_system.sql
 
+# 22:28:06   
+# 22:28:06   mclient -lsql -ftest -Eutf-8 -i -e 
--host=/var/tmp/mtest-10173 --port=36549
+# 22:28:06   
 
-# 08:45:11   
-# 08:45:11   mclient -lsql -ftest -i -e --host=alf --port=35663 
-# 08:45:11   
-
+#CREATE TABLE sys.tbls (
+#  idINTEGER,
+#  name  VARCHAR(1024),
+#  schema_id INTEGER,
+#  query VARCHAR(2048),
+#  type  SMALLINT,
+#  systemBOOLEAN,
+#  commit_action SMALLINT,
+#  readonly  BOOLEAN,
+#  temporary SMALLINT
+#);
+#COPY 40 RECORDS INTO sys.tbls FROM stdin USING DELIMITERS '\t','\n','';
+#2001  schemas   2000NULL0   true0   false   0
+#2007  types 2000NULL0   true0   false   0
+#2016  functions 2000NULL0   true0   false   0
+#2027  args  2000NULL0   true0   false   0
+#2036  sequences 2000NULL0   true0   false   0
+#2046  dependencies  2000NULL0   true0   false   0
+#2050  connections   2000NULL0   true0   false   0
+#2059  _tables   2000NULL0   true0   false   0
+#2068  _columns  2000NULL0   true0   false   0
+#2079  keys  2000NULL0   true0   false   0
+#2086  idxs  2000NULL0   true0   false   0
+[ 40   ]
+#create table rr (id int);
+#insert into rr values (1),(2),(3);
 [ 3]
 #prepare select * from rr limit ?;
 #prepare 

MonetDB: default - revert firstn/topn bogus fix.

2014-08-07 Thread Niels Nes
Changeset: 7fbe4711 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7fbe4711
Modified Files:
sql/backends/monet5/sql_gencode.c
Branch: default
Log Message:

revert firstn/topn bogus fix.


diffs (12 lines):

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
@@ -1005,7 +1005,7 @@ static int
if (s-flag1) {
int topn = 0, flag = s-flag, grps = flag  2;
 
-   flag = 1;
+   flag = 2;
 
q = newStmt1(mb, calcRef, +);
q = pushArgument(mb, q, offset);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - revert slice - subslice change...

2014-08-07 Thread Niels Nes
Changeset: ad4ca16ee973 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad4ca16ee973
Modified Files:
monetdb5/optimizer/opt_pushselect.c
Branch: default
Log Message:

revert slice - subslice change...


diffs (12 lines):

diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -468,7 +468,7 @@ OPTpushselectImplementation(Client cntxt
ValRecord cst;
 
/* slice the candidates */
-   setFunctionId(r, subsliceRef);
+   setFunctionId(r, sliceRef);
getArg(r, 0) = newTmpVariable(mb, 
newBatType(TYPE_oid, TYPE_oid));
getArg(r, 1) = getArg(s, 1); 
cst.vtype = getArgType(mb, r, 2);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: int128 - Merged with default branch.

2014-08-07 Thread Stefan Manegold
Changeset: 3694ea694fc6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3694ea694fc6
Added Files:
clients/R/MonetDB.R/man/dbTransaction.Rd
clients/R/MonetDB.R/man/monetdb_queryinfo.Rd
clients/R/MonetDB.R/man/mq.Rd
debian/libmonetdb5-server-bam.install
gdk/gdk_firstn.c
geom/BugTracker/Tests/copy_into_mbr.3492.modules
geom/BugTracker/Tests/copy_into_mbr.3492.sql
geom/BugTracker/Tests/copy_into_mbr.3492.stable.err
geom/BugTracker/Tests/copy_into_mbr.3492.stable.out
monetdb5/tests/gdkTests/Tests/firstn.mal
monetdb5/tests/gdkTests/Tests/firstn.stable.err
monetdb5/tests/gdkTests/Tests/firstn.stable.out
sql/backends/monet5/bam/85_bam.mal
sql/backends/monet5/bam/85_bam.sql
sql/backends/monet5/bam/BAMRecipe.pdf
sql/backends/monet5/bam/Makefile.ag
sql/backends/monet5/bam/Tests/All
sql/backends/monet5/bam/Tests/bam.py
sql/backends/monet5/bam/Tests/bam_export.SQL.py
sql/backends/monet5/bam/Tests/bam_loader_file.SQL.py
sql/backends/monet5/bam/Tests/bam_loader_file.stable.err
sql/backends/monet5/bam/Tests/bam_loader_file.stable.out
sql/backends/monet5/bam/Tests/bam_loader_files.SQL.py
sql/backends/monet5/bam/Tests/bam_loader_files.stable.err
sql/backends/monet5/bam/Tests/bam_loader_files.stable.out
sql/backends/monet5/bam/Tests/bam_loader_repos.SQL.py
sql/backends/monet5/bam/Tests/bam_loader_repos.stable.err
sql/backends/monet5/bam/Tests/bam_loader_repos.stable.out
sql/backends/monet5/bam/Tests/check_files.sql
sql/backends/monet5/bam/Tests/check_files.stable.err
sql/backends/monet5/bam/Tests/check_files.stable.out
sql/backends/monet5/bam/Tests/check_files_exact.sql
sql/backends/monet5/bam/Tests/check_files_exact.stable.err
sql/backends/monet5/bam/Tests/check_files_exact.stable.out
sql/backends/monet5/bam/Tests/drop_last_files.SQL.py
sql/backends/monet5/bam/Tests/drop_last_files.stable.err
sql/backends/monet5/bam/Tests/drop_last_files.stable.out
sql/backends/monet5/bam/Tests/files/file1.bam
sql/backends/monet5/bam/Tests/files/file2.sam
sql/backends/monet5/bam/Tests/files/queryname/file1.bam
sql/backends/monet5/bam/Tests/files/queryname/file2.sam
sql/backends/monet5/bam/Tests/query1.1.sql
sql/backends/monet5/bam/Tests/query1.1.stable.err
sql/backends/monet5/bam/Tests/query1.1.stable.out
sql/backends/monet5/bam/Tests/query1.2.sql
sql/backends/monet5/bam/Tests/query1.2.stable.err
sql/backends/monet5/bam/Tests/query1.2.stable.out
sql/backends/monet5/bam/Tests/query1.3.sql
sql/backends/monet5/bam/Tests/query1.3.stable.err
sql/backends/monet5/bam/Tests/query1.3.stable.out
sql/backends/monet5/bam/Tests/query1.4.sql
sql/backends/monet5/bam/Tests/query1.4.stable.err
sql/backends/monet5/bam/Tests/query1.4.stable.out
sql/backends/monet5/bam/Tests/query1.5.sql
sql/backends/monet5/bam/Tests/query1.5.stable.err
sql/backends/monet5/bam/Tests/query1.5.stable.out
sql/backends/monet5/bam/Tests/query1.6.sql
sql/backends/monet5/bam/Tests/query2.1.sql
sql/backends/monet5/bam/Tests/query2.1.stable.err
sql/backends/monet5/bam/Tests/query2.1.stable.out
sql/backends/monet5/bam/Tests/query2.10.sql
sql/backends/monet5/bam/Tests/query2.10.stable.err
sql/backends/monet5/bam/Tests/query2.10.stable.out
sql/backends/monet5/bam/Tests/query2.11.sql
sql/backends/monet5/bam/Tests/query2.11.stable.err
sql/backends/monet5/bam/Tests/query2.11.stable.out
sql/backends/monet5/bam/Tests/query2.12.sql
sql/backends/monet5/bam/Tests/query2.12.stable.err
sql/backends/monet5/bam/Tests/query2.12.stable.out
sql/backends/monet5/bam/Tests/query2.12.stable.out.int128
sql/backends/monet5/bam/Tests/query2.2.sql
sql/backends/monet5/bam/Tests/query2.2.stable.err
sql/backends/monet5/bam/Tests/query2.2.stable.out
sql/backends/monet5/bam/Tests/query2.2.stable.out.int128
sql/backends/monet5/bam/Tests/query2.3.sql
sql/backends/monet5/bam/Tests/query2.3.stable.err
sql/backends/monet5/bam/Tests/query2.3.stable.out
sql/backends/monet5/bam/Tests/query2.4.sql
sql/backends/monet5/bam/Tests/query2.4.stable.err
sql/backends/monet5/bam/Tests/query2.4.stable.out
sql/backends/monet5/bam/Tests/query2.5.sql
sql/backends/monet5/bam/Tests/query2.5.stable.err
sql/backends/monet5/bam/Tests/query2.5.stable.out
sql/backends/monet5/bam/Tests/query2.5.stable.out.int128
sql/backends/monet5/bam/Tests/query2.6.sql
sql/backends/monet5/bam/Tests/query2.6.stable.err

MonetDB: int128 - Merge with default branch.

2014-08-07 Thread Stefan Manegold
Changeset: 1d405c86ec19 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d405c86ec19
Modified Files:
monetdb5/modules/mal/manifold.c
monetdb5/optimizer/opt_pushselect.c
sql/backends/monet5/sql_gencode.c
Branch: int128
Log Message:

Merge with default branch.


diffs (44 lines):

diff --git a/monetdb5/modules/mal/manifold.c b/monetdb5/modules/mal/manifold.c
--- a/monetdb5/modules/mal/manifold.c
+++ b/monetdb5/modules/mal/manifold.c
@@ -136,7 +136,7 @@ MANIFOLDjob(MULTItask *mut)
 {  int i;
char *p, *q;
char **args;
-   str y, msg= MAL_SUCCEED;
+   str y = NULL, msg= MAL_SUCCEED;
 
args = (char**) GDKzalloc(sizeof(char*) * mut-pci-argc);
if( args == NULL)
@@ -174,6 +174,8 @@ MANIFOLDjob(MULTItask *mut)
default:
msg= createException(MAL,mal.manifold,manifold call 
limitation );
}
+   if (ATOMextern(mut-args[0].type)  y) 
+   GDKfree(y); 
 bunins_failed:
GDKfree(args);
return msg;
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
@@ -1006,8 +1006,8 @@ static int
return -1;
c = k;
}
-   if (s-flag) {
-   int topn = 0, flag = s-flag, utopn = flag  2;
+   if (s-flag1) {
+   int topn = 0, flag = s-flag, grps = flag  2;
 
flag = 2;
 
@@ -1019,7 +1019,7 @@ static int
topn = getDestVar(q);
 
q = newStmt(mb, algebraRef, firstnRef);
-   if (utopn)
+   if (grps) /* we need the groups for the next 
firstn */
q = pushReturn(mb, q, 
newTmpVariable(mb, TYPE_any));
q = pushArgument(mb, q, c);
if (p)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: int128 - Merged with default branch.

2014-08-07 Thread Stefan Manegold
Changeset: 94b992a46146 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=94b992a46146
Modified Files:
clients/mapiclient/Tests/stethoscope--help.stable.err
monetdb5/mal/Tests/All
monetdb5/optimizer/Tests/All
sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
sql/test/BugTracker-2009/Tests/rollback_bug.stable.err

sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
sql/test/BugTracker/Tests/broken_join.SF-1373391.stable.err

sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err
Branch: int128
Log Message:

Merged with default branch.


diffs (281 lines):

diff --git a/clients/mapiclient/Tests/stethoscope--help.stable.err 
b/clients/mapiclient/Tests/stethoscope--help.stable.err
--- a/clients/mapiclient/Tests/stethoscope--help.stable.err
+++ b/clients/mapiclient/Tests/stethoscope--help.stable.err
@@ -17,7 +17,7 @@ stethoscope [options] [dbname] +[trace o
   -h | --host=hostname
   -? | --help
 
-The trace options (default 'ISTest'):
+The trace options (default 'ISTestn'):
   S = monitor start of instruction profiling
   a = aggregate clock ticks per instruction
   e = event counter
@@ -29,6 +29,7 @@ The trace options (default 'ISTest'):
   c = cpu statistics (utime,ctime,stime,cstime)
   m = rss memory as provided by OS (in MB)
   M = memory footprint of non-persistent objects
+  n = numa intra socket data flow
   r = block reads
   w = block writes
   b = bytes read/written
diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -134,7 +134,6 @@ tst256
 tst260
 tst2570
 # tst265 -- windowsum and slidingsum have been removed
-tst267
 # opens /tmp/MonetEvents, i.e. not on Windows:
 NOT_WIN32?tst270
 tst272
diff --git a/monetdb5/optimizer/Tests/All b/monetdb5/optimizer/Tests/All
--- a/monetdb5/optimizer/Tests/All
+++ b/monetdb5/optimizer/Tests/All
@@ -18,10 +18,7 @@ tst4630
 tst4700
 tst4701
 # tst4730 -- uses group.refine
-tst4800
-tst4801
 tst4820
-tst4900
 
 qep00
 qep01
@@ -81,13 +78,11 @@ CXerror1
 #the remainder are snippets used in the reference manual
 CMexample
 CRexample
-AEexample
 ARexample
 DCexample
 DCexample2
 ESexample
 FTexample
-GCexample
 GCexample01
 CXexample
 JPexample
diff --git a/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err 
b/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
--- a/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
+++ b/sql/test/BugDay_2005-10-06_2.9.3/Tests/case.SF-929151.stable.err
@@ -21,10 +21,7 @@ QUERY = select case i
 ERROR = !syntax error, unexpected FROM, expecting END in: select case i
 !when 0 then 'base table'
 !when 1 then 'system table'
-!when 2 then 'view'
-!when 3 then 'session temporary table'
-!when 4 then 'temporary table'
-!from
+!when 2 then 'v
 
 # 23:52:38   
 # 23:52:38   Done.
diff --git a/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err 
b/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
--- a/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
+++ b/sql/test/BugTracker-2009/Tests/rollback_bug.stable.err
@@ -89,12 +89,7 @@ QUERY = CREATE TABLE phpbb_attachments (
poster_id integer DEFAULT '0' NOT NULL ,
is_orphan LONG DEFAULT '1' NOT NULL ,
 ERROR = !type (long) unknown in: create table phpbb_attachments (
-!  attach_id integer default next value for 
sys.phpbb_attachments_seq,
-!  post_msg_id integer default '0' not null ,
-!  topic_id integer default '0' not null ,
-!  in_message smallint default '0' not null ,
-!  poster_id integer default '0' not null ,
-!  is_orphan long default
+!  attach_id integer default next value for sys
 MAPI  = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225
 QUERY = CREATE TABLE phpbb_attachments (
attach_id integer DEFAULT next value for 
sys.phpbb_attachments_seq,
diff --git 
a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit 
b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
--- a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
+++ b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out.32bit
@@ -16,12 +16,64 @@ stdout of test 'limit_in_prepare.Bug-255
 # MonetDB/SQL module v2.38.0 loaded
 
 Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 19_cluster.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql 

MonetDB: default - SQL-dump: approved output according to recent...

2014-08-07 Thread Stefan Manegold
Changeset: 28a0ac609b70 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=28a0ac609b70
Modified Files:
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.32bit
clients/Tests/SQL-dump.stable.out.64bit.oid32
clients/Tests/SQL-dump_gsl.stable.out
clients/Tests/SQL-dump_gsl.stable.out.oid32
clients/Tests/SQL-dump_nogeom.stable.out
Branch: default
Log Message:

SQL-dump: approved output according to recent changes.


diffs (114 lines):

diff --git a/clients/Tests/SQL-dump.stable.out 
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -5575,12 +5575,12 @@ 519355337
 2088   55337
 2086   55337
 2090   55337
+2083   55337
+2079   55337
+2087   55337
 2103   55337
 2102   55337
 2104   55337
-2087   55337
-2083   55337
-2079   55337
 34 55337
 31 55337
 30 55337
diff --git a/clients/Tests/SQL-dump.stable.out.32bit 
b/clients/Tests/SQL-dump.stable.out.32bit
--- a/clients/Tests/SQL-dump.stable.out.32bit
+++ b/clients/Tests/SQL-dump.stable.out.32bit
@@ -5575,12 +5575,12 @@ 519355337
 2088   55337
 2086   55337
 2090   55337
+2083   55337
+2079   55337
+2087   55337
 2103   55337
 2102   55337
 2104   55337
-2087   55337
-2083   55337
-2079   55337
 34 55337
 31 55337
 30 55337
diff --git a/clients/Tests/SQL-dump.stable.out.64bit.oid32 
b/clients/Tests/SQL-dump.stable.out.64bit.oid32
--- a/clients/Tests/SQL-dump.stable.out.64bit.oid32
+++ b/clients/Tests/SQL-dump.stable.out.64bit.oid32
@@ -5575,12 +5575,12 @@ 519355337
 2088   55337
 2086   55337
 2090   55337
+2083   55337
+2079   55337
+2087   55337
 2103   55337
 2102   55337
 2104   55337
-2087   55337
-2083   55337
-2079   55337
 34 55337
 31 55337
 30 55337
diff --git a/clients/Tests/SQL-dump_gsl.stable.out 
b/clients/Tests/SQL-dump_gsl.stable.out
--- a/clients/Tests/SQL-dump_gsl.stable.out
+++ b/clients/Tests/SQL-dump_gsl.stable.out
@@ -5579,12 +5579,12 @@ 519355337
 2088   55337
 2086   55337
 2090   55337
+2083   55337
+2079   55337
+2087   55337
 2103   55337
 2102   55337
 2104   55337
-2087   55337
-2083   55337
-2079   55337
 34 55337
 31 55337
 30 55337
diff --git a/clients/Tests/SQL-dump_gsl.stable.out.oid32 
b/clients/Tests/SQL-dump_gsl.stable.out.oid32
--- a/clients/Tests/SQL-dump_gsl.stable.out.oid32
+++ b/clients/Tests/SQL-dump_gsl.stable.out.oid32
@@ -5579,12 +5579,12 @@ 519355337
 2088   55337
 2086   55337
 2090   55337
+2083   55337
+2079   55337
+2087   55337
 2103   55337
 2102   55337
 2104   55337
-2087   55337
-2083   55337
-2079   55337
 34 55337
 31 55337
 30 55337
diff --git a/clients/Tests/SQL-dump_nogeom.stable.out 
b/clients/Tests/SQL-dump_nogeom.stable.out
--- a/clients/Tests/SQL-dump_nogeom.stable.out
+++ b/clients/Tests/SQL-dump_nogeom.stable.out
@@ -5374,12 +5374,12 @@ 519355337
 2088   55337
 2086   55337
 2090   55337
+2083   55337
+2079   55337
+2087   55337
 2103   55337
 2102   55337
 2104   55337
-2087   55337
-2083   55337
-2079   55337
 34 55337
 31 55337
 30 55337
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - added test variants in case we have BAM suppo...

2014-08-07 Thread Stefan Manegold
Changeset: e62b65811c0a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e62b65811c0a
Added Files:
clients/Tests/MAL-signatures_bam.malC.src
clients/Tests/MAL-signatures_bam.stable.err
clients/Tests/MAL-signatures_bam.stable.out
clients/Tests/SQL-dump_bam.sql.src
clients/Tests/SQL-dump_bam.stable.err
clients/Tests/SQL-dump_bam.stable.out
clients/Tests/SQL-dump_bam.stable.out.oid32
sql/test/Tests/systemfunctions_bam.sql.src
sql/test/Tests/systemfunctions_bam.stable.err
sql/test/Tests/systemfunctions_bam.stable.out
sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566_bam.sql.src

sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566_bam.stable.err

sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566_bam.stable.out
sql/test/leaks/Tests/check0_bam.sql.src
sql/test/leaks/Tests/check0_bam.stable.err
sql/test/leaks/Tests/check0_bam.stable.out
sql/test/leaks/Tests/check1_bam.sql.src
sql/test/leaks/Tests/check1_bam.stable.err
sql/test/leaks/Tests/check1_bam.stable.out
sql/test/leaks/Tests/check2_bam.sql.src
sql/test/leaks/Tests/check2_bam.stable.err
sql/test/leaks/Tests/check2_bam.stable.out
sql/test/leaks/Tests/check3_bam.sql.src
sql/test/leaks/Tests/check3_bam.stable.err
sql/test/leaks/Tests/check3_bam.stable.out
sql/test/leaks/Tests/check4_bam.sql.src
sql/test/leaks/Tests/check4_bam.stable.err
sql/test/leaks/Tests/check4_bam.stable.out
sql/test/leaks/Tests/check5_bam.sql.src
sql/test/leaks/Tests/check5_bam.stable.err
sql/test/leaks/Tests/check5_bam.stable.out
sql/test/leaks/Tests/drop3_bam.sql.src
sql/test/leaks/Tests/drop3_bam.stable.err
sql/test/leaks/Tests/drop3_bam.stable.out
sql/test/leaks/Tests/select1_bam.sql.src
sql/test/leaks/Tests/select1_bam.stable.err
sql/test/leaks/Tests/select1_bam.stable.out
sql/test/leaks/Tests/select2_bam.sql.src
sql/test/leaks/Tests/select2_bam.stable.err
sql/test/leaks/Tests/select2_bam.stable.out
sql/test/leaks/Tests/temp1_bam.sql.src
sql/test/leaks/Tests/temp1_bam.stable.err
sql/test/leaks/Tests/temp1_bam.stable.out
sql/test/leaks/Tests/temp2_bam.sql.src
sql/test/leaks/Tests/temp2_bam.stable.err
sql/test/leaks/Tests/temp2_bam.stable.out
sql/test/leaks/Tests/temp3_bam.sql.src
sql/test/leaks/Tests/temp3_bam.stable.err
sql/test/leaks/Tests/temp3_bam.stable.out
Modified Files:
clients/Tests/All
sql/test/Tests/All
sql/test/leaks/Tests/All
Branch: default
Log Message:

added test variants in case we have BAM support, i.e., HAVE_SAMTOOLS

these are adapted copies of the GSL variants,
since in our testing farm,
we only have samtools, if we also have gsl
(i.e., on Fedora Linux)


diffs (truncated from 63604 to 300 lines):

diff --git a/clients/Tests/All b/clients/Tests/All
--- a/clients/Tests/All
+++ b/clients/Tests/All
@@ -1,8 +1,10 @@
 exports
 
HAVE_GEOMHAVE_CFITSIO!HAVE_SPHINXCLIENT!HAVE_GSL!HAVE_SAMTOOLS?MAL-signatures
 
HAVE_GEOMHAVE_CFITSIO!HAVE_SPHINXCLIENTHAVE_GSL!HAVE_SAMTOOLS?MAL-signatures_gsl
+HAVE_GEOMHAVE_CFITSIO!HAVE_SPHINXCLIENTHAVE_GSLHAVE_SAMTOOLS?MAL-signatures_bam
 
HAVE_GEOMHAVE_CFITSIOHAVE_SPHINXCLIENT!HAVE_GSL!HAVE_SAMTOOLS?MAL-signatures_sphinxclient
 
HAVE_GEOM!HAVE_CFITSIO!HAVE_SPHINXCLIENT!HAVE_GSL!HAVE_SAMTOOLS?MAL-signatures_nocfitsio
 HAVE_GEOM!HAVE_GSL!HAVE_SAMTOOLS?SQL-dump
 HAVE_GEOMHAVE_GSL!HAVE_SAMTOOLS?SQL-dump_gsl
+HAVE_GEOMHAVE_GSLHAVE_SAMTOOLS?SQL-dump_bam
 !HAVE_GEOM!HAVE_GSL!HAVE_SAMTOOLS?SQL-dump_nogeom
diff --git a/clients/Tests/MAL-signatures_bam.malC.src 
b/clients/Tests/MAL-signatures_bam.malC.src
new file mode 100644
--- /dev/null
+++ b/clients/Tests/MAL-signatures_bam.malC.src
@@ -0,0 +1,1 @@
+$RELSRCDIR/MAL-signatures.malC
diff --git a/clients/Tests/MAL-signatures_bam.stable.err 
b/clients/Tests/MAL-signatures_bam.stable.err
new file mode 100644
--- /dev/null
+++ b/clients/Tests/MAL-signatures_bam.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'MAL-signatures_bam` in directory 'clients` itself:
+
+
+# 14:24:10   
+# 14:24:10   mserver5 --debug=10 --set gdk_nr_threads=0 --set 
mapi_open=true --set mapi_port=31236 --set 
mapi_usock=/var/tmp/mtest-21213/.s.monetdb.31236 --set monet_prompt= 
--forcemito --set mal_listing=2 
--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_clients --set 
mal_listing=2
+# 14:24:10   
+
+# builtin opt  gdk_dbpath = 
/ufs/sjoerd/Monet-candidate/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = yes
+# builtin opt  monet_prompt = 
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 5
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin 

MonetDB: default - more fixes after changeset b62643655146: remo...

2014-08-07 Thread Stefan Manegold
Changeset: dd3344a13cf3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd3344a13cf3
Modified Files:
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
Branch: default
Log Message:

more fixes after changeset b62643655146: remove array.mal from Windows 
installers;

... hopefully correctly  completely ...


diffs (86 lines):

diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj 
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -735,12 +735,6 @@
 }
 Entry
 {
-MsmKey = 8:_C0E29F8AC9F24979BE47B588DB609178
-OwnerKey = 8:_UNDEFINED
-MsmSig = 8:_UNDEFINED
-}
-Entry
-{
 MsmKey = 8:_C2680DB1FF1445FF812EF932F12A7345
 OwnerKey = 8:_UNDEFINED
 MsmSig = 8:_UNDEFINED
@@ -3406,26 +3400,6 @@
 IsDependency = 11:FALSE
 IsolateTo = 8:
 }
-
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C0E29F8AC9F24979BE47B588DB609178
-{
-SourcePath = 8:lib\\monetdb5\\array.mal
-TargetName = 8:array.mal
-Tag = 8:
-Folder = 8:_B593DAA0787744D6A44D17884E0C3951
-Condition = 8:
-Transitive = 11:FALSE
-Vital = 11:TRUE
-ReadOnly = 11:FALSE
-Hidden = 11:FALSE
-System = 11:FALSE
-Permanent = 11:FALSE
-SharedLegacy = 11:FALSE
-PackageAs = 3:1
-Register = 3:1
-Exclude = 11:FALSE
-IsDependency = 11:FALSE
-IsolateTo = 8:
-}
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C2680DB1FF1445FF812EF932F12A7345
 {
 SourcePath = 8:lib\\monetdb5\\sql_aggr_sht.mal
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj 
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -735,12 +735,6 @@
 }
 Entry
 {
-MsmKey = 8:_C0E29F8AC9F24979BE47B588DB609178
-OwnerKey = 8:_UNDEFINED
-MsmSig = 8:_UNDEFINED
-}
-Entry
-{
 MsmKey = 8:_C2680DB1FF1445FF812EF932F12A7345
 OwnerKey = 8:_UNDEFINED
 MsmSig = 8:_UNDEFINED
@@ -3406,26 +3400,6 @@
 IsDependency = 11:FALSE
 IsolateTo = 8:
 }
-
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C0E29F8AC9F24979BE47B588DB609178
-{
-SourcePath = 8:lib\\monetdb5\\array.mal
-TargetName = 8:array.mal
-Tag = 8:
-Folder = 8:_B593DAA0787744D6A44D17884E0C3951
-Condition = 8:
-Transitive = 11:FALSE
-Vital = 11:TRUE
-ReadOnly = 11:FALSE
-Hidden = 11:FALSE
-System = 11:FALSE
-Permanent = 11:FALSE
-SharedLegacy = 11:FALSE
-PackageAs = 3:1
-Register = 3:1
-Exclude = 11:FALSE
-IsDependency = 11:FALSE
-IsolateTo = 8:
-}
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C2680DB1FF1445FF812EF932F12A7345
 {
 SourcePath = 8:lib\\monetdb5\\sql_aggr_sht.mal
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: int128 - Merge with default branch.

2014-08-07 Thread Stefan Manegold
Changeset: 79c8d19b2098 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=79c8d19b2098
Added Files:
clients/Tests/MAL-signatures_bam.malC.src
clients/Tests/MAL-signatures_bam.stable.err
clients/Tests/MAL-signatures_bam.stable.out
clients/Tests/SQL-dump_bam.sql.src
clients/Tests/SQL-dump_bam.stable.err
clients/Tests/SQL-dump_bam.stable.out
clients/Tests/SQL-dump_bam.stable.out.oid32
sql/test/Tests/systemfunctions_bam.sql.src
sql/test/Tests/systemfunctions_bam.stable.err
sql/test/Tests/systemfunctions_bam.stable.out
sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566_bam.sql.src

sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566_bam.stable.err

sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566_bam.stable.out
sql/test/leaks/Tests/check0_bam.sql.src
sql/test/leaks/Tests/check0_bam.stable.err
sql/test/leaks/Tests/check0_bam.stable.out
sql/test/leaks/Tests/check1_bam.sql.src
sql/test/leaks/Tests/check1_bam.stable.err
sql/test/leaks/Tests/check1_bam.stable.out
sql/test/leaks/Tests/check2_bam.sql.src
sql/test/leaks/Tests/check2_bam.stable.err
sql/test/leaks/Tests/check2_bam.stable.out
sql/test/leaks/Tests/check3_bam.sql.src
sql/test/leaks/Tests/check3_bam.stable.err
sql/test/leaks/Tests/check3_bam.stable.out
sql/test/leaks/Tests/check4_bam.sql.src
sql/test/leaks/Tests/check4_bam.stable.err
sql/test/leaks/Tests/check4_bam.stable.out
sql/test/leaks/Tests/check5_bam.sql.src
sql/test/leaks/Tests/check5_bam.stable.err
sql/test/leaks/Tests/check5_bam.stable.out
sql/test/leaks/Tests/drop3_bam.sql.src
sql/test/leaks/Tests/drop3_bam.stable.err
sql/test/leaks/Tests/drop3_bam.stable.out
sql/test/leaks/Tests/select1_bam.sql.src
sql/test/leaks/Tests/select1_bam.stable.err
sql/test/leaks/Tests/select1_bam.stable.out
sql/test/leaks/Tests/select2_bam.sql.src
sql/test/leaks/Tests/select2_bam.stable.err
sql/test/leaks/Tests/select2_bam.stable.out
sql/test/leaks/Tests/temp1_bam.sql.src
sql/test/leaks/Tests/temp1_bam.stable.err
sql/test/leaks/Tests/temp1_bam.stable.out
sql/test/leaks/Tests/temp2_bam.sql.src
sql/test/leaks/Tests/temp2_bam.stable.err
sql/test/leaks/Tests/temp2_bam.stable.out
sql/test/leaks/Tests/temp3_bam.sql.src
sql/test/leaks/Tests/temp3_bam.stable.err
sql/test/leaks/Tests/temp3_bam.stable.out
Modified Files:
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
clients/Tests/All
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.32bit
clients/Tests/SQL-dump.stable.out.64bit.oid32
clients/Tests/SQL-dump_gsl.stable.out
clients/Tests/SQL-dump_gsl.stable.out.oid32
clients/Tests/SQL-dump_nogeom.stable.out
sql/test/Tests/All
sql/test/leaks/Tests/All
Branch: int128
Log Message:

Merge with default branch.


diffs (truncated from 63804 to 300 lines):

diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj 
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -735,12 +735,6 @@
 }
 Entry
 {
-MsmKey = 8:_C0E29F8AC9F24979BE47B588DB609178
-OwnerKey = 8:_UNDEFINED
-MsmSig = 8:_UNDEFINED
-}
-Entry
-{
 MsmKey = 8:_C2680DB1FF1445FF812EF932F12A7345
 OwnerKey = 8:_UNDEFINED
 MsmSig = 8:_UNDEFINED
@@ -3406,26 +3400,6 @@
 IsDependency = 11:FALSE
 IsolateTo = 8:
 }
-
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C0E29F8AC9F24979BE47B588DB609178
-{
-SourcePath = 8:lib\\monetdb5\\array.mal
-TargetName = 8:array.mal
-Tag = 8:
-Folder = 8:_B593DAA0787744D6A44D17884E0C3951
-Condition = 8:
-Transitive = 11:FALSE
-Vital = 11:TRUE
-ReadOnly = 11:FALSE
-Hidden = 11:FALSE
-System = 11:FALSE
-Permanent = 11:FALSE
-SharedLegacy = 11:FALSE
-PackageAs = 3:1
-Register = 3:1
-Exclude = 11:FALSE
-IsDependency = 11:FALSE
-IsolateTo = 8:
-}
 
{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C2680DB1FF1445FF812EF932F12A7345
 {
 SourcePath = 8:lib\\monetdb5\\sql_aggr_sht.mal
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj 
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -735,12 +735,6 @@
   

MonetDB: int128 - approved int128 bam output

2014-08-07 Thread Stefan Manegold
Changeset: d15349f4b01f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d15349f4b01f
Added Files:
clients/Tests/MAL-signatures_bam.stable.out.int128
clients/Tests/SQL-dump_bam.stable.out.int128
clients/Tests/SQL-dump_bam.stable.out.oid32.int128
sql/test/leaks/Tests/check0_bam.stable.out.int128
sql/test/leaks/Tests/check1_bam.stable.out.int128
sql/test/leaks/Tests/check2_bam.stable.out.int128
sql/test/leaks/Tests/check3_bam.stable.out.int128
sql/test/leaks/Tests/check4_bam.stable.out.int128
sql/test/leaks/Tests/check5_bam.stable.out.int128
sql/test/leaks/Tests/drop3_bam.stable.out.int128
sql/test/leaks/Tests/select1_bam.stable.out.int128
sql/test/leaks/Tests/select2_bam.stable.out.int128
sql/test/leaks/Tests/temp1_bam.stable.out.int128
sql/test/leaks/Tests/temp2_bam.stable.out.int128
sql/test/leaks/Tests/temp3_bam.stable.out.int128
Branch: int128
Log Message:

approved int128 bam output


diffs (truncated from 74602 to 300 lines):

diff --git a/clients/Tests/MAL-signatures_bam.stable.out.int128 
b/clients/Tests/MAL-signatures_bam.stable.out.int128
new file mode 100644
--- /dev/null
+++ b/clients/Tests/MAL-signatures_bam.stable.out.int128
@@ -0,0 +1,53689 @@
+stdout of test 'MAL-signatures_bam` in directory 'clients` itself:
+
+
+# 14:24:10   
+# 14:24:10   mserver5 --debug=10 --set gdk_nr_threads=0 --set 
mapi_open=true --set mapi_port=31236 --set 
mapi_usock=/var/tmp/mtest-21213/.s.monetdb.31236 --set monet_prompt= 
--forcemito --set mal_listing=2 
--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_clients --set 
mal_listing=2
+# 14:24:10   
+
+# MonetDB 5 server v11.17.0
+# This is an unreleased version
+# Serving database 'mTests_clients', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 15.591 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:31236/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21213/.s.monetdb.31236
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 14:24:10   
+# 14:24:10   mclient -lmal -ftest -Eutf-8 -i -e 
--host=/var/tmp/mtest-21213 --port=31236
+# 14:24:10   
+
+#?*)
+command aggr.avg(b:bat[:oid,:hge],g:bat[:oid,:oid],e:bat[:oid,:any_1]) 
(X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) 
+address AGGRavg23_dbl;
+comment Grouped tail average on hge, also returns count
+
+command aggr.avg(b:bat[:oid,:hge],e:bat[:oid,:any_1]) 
(X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) 
+address AGGRavg22_dbl;
+comment Grouped tail average on hge, also returns count
+
+command 
aggr.avg(b:bat[:oid,:hge],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] 
+address AGGRavg13_dbl;
+comment Grouped tail average on hge
+
+command aggr.avg(b:bat[:oid,:hge],e:bat[:oid,:any_1]):bat[:oid,:dbl] 
+address AGGRavg12_dbl;
+comment Grouped tail average on hge
+
+command aggr.avg(b:bat[:oid,:dbl],g:bat[:oid,:oid],e:bat[:oid,:any_1]) 
(X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) 
+address AGGRavg23_dbl;
+comment Grouped tail average on dbl, also returns count
+
+command aggr.avg(b:bat[:oid,:dbl],e:bat[:oid,:any_1]) 
(X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) 
+address AGGRavg22_dbl;
+comment Grouped tail average on dbl, also returns count
+
+command 
aggr.avg(b:bat[:oid,:dbl],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] 
+address AGGRavg13_dbl;
+comment Grouped tail average on dbl
+
+command aggr.avg(b:bat[:oid,:dbl],e:bat[:oid,:any_1]):bat[:oid,:dbl] 
+address AGGRavg12_dbl;
+comment Grouped tail average on dbl
+
+command aggr.avg(b:bat[:oid,:flt],g:bat[:oid,:oid],e:bat[:oid,:any_1]) 
(X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) 
+address AGGRavg23_dbl;
+comment Grouped tail average on flt, also returns count
+
+command aggr.avg(b:bat[:oid,:flt],e:bat[:oid,:any_1]) 
(X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) 
+address AGGRavg22_dbl;
+comment Grouped tail average on flt, also returns count
+
+command 
aggr.avg(b:bat[:oid,:flt],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] 
+address AGGRavg13_dbl;
+comment Grouped tail average on flt
+
+command aggr.avg(b:bat[:oid,:flt],e:bat[:oid,:any_1]):bat[:oid,:dbl] 
+address AGGRavg12_dbl;
+comment Grouped tail average on flt
+
+command aggr.avg(b:bat[:oid,:lng],g:bat[:oid,:oid],e:bat[:oid,:any_1]) 
(X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) 
+address AGGRavg23_dbl;
+comment Grouped tail average on lng, also returns count
+
+command aggr.avg(b:bat[:oid,:lng],e:bat[:oid,:any_1]) 
(X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) 
+address AGGRavg22_dbl;
+comment Grouped tail average on lng, also returns count
+
+command 
aggr.avg(b:bat[:oid,:lng],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] 

MonetDB: mosaic - Add a compression bit to the heaps

2014-08-07 Thread Martin Kersten
Changeset: 2ab81ec5203c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ab81ec5203c
Modified Files:
gdk/gdk.h
gdk/gdk_bat.c
Branch: mosaic
Log Message:

Add a compression bit to the heaps
Als be aware that property checking on compressed heaps are not valid.


diffs (68 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -717,12 +717,14 @@ typedef struct {
 
unsigned int copied:1,  /* a copy of an existing map. */
  hashash:1,/* the string heap contains hash values */
- forcemap:1;  /* force STORE_MMAP even if heap exists */
+ forcemap:1,  /* force STORE_MMAP even if heap exists */
+ compressed:1; /* compress heaps */
storage_t storage;  /* storage mode (mmap/malloc). */
storage_t newstorage;   /* new desired storage mode at re-allocation. */
bte dirty;  /* specific heap dirty marker */
bte farmid; /* id of farm where heap is located */
bat parentid;   /* cache id of VIEW parent bat */
+   BUN count;  /* decompression count */
 } Heap;
 
 typedef struct {
@@ -1743,7 +1745,8 @@ gdk_export void GDKqsort_rev(void *h, vo
if ((col)-seq == oid_nil) {\
(col)-nonil = (b)-batCount == 0;  \
(col)-nil = !(col)-nonil; \
-   (col)-revsorted = 1;   \
+   if( !(col)-heap.compressed) \
+   (col)-revsorted = 1;   
\
(col)-key = (b)-batCount = 1;\
(col)-dense = 0;   \
} else {\
@@ -1751,11 +1754,13 @@ gdk_export void GDKqsort_rev(void *h, vo
(col)-nonil = 1;   \
(col)-nil = 0; \
(col)-key = 1; \
-   (col)-revsorted = (b)-batCount = 1;  \
+   if( !(col)-heap.compressed) \
+   (col)-revsorted = (b)-batCount = 1;  
\
}   \
-   (col)-sorted = 1;  \
+   if( !(col)-heap.compressed) \
+   (col)-sorted = 1;  
\
} else if ((b)-batCount = 1) {\
-   if (BATatoms[(col)-type].linear) { \
+   if( !(col)-heap.compressed   
BATatoms[(col)-type].linear) { \
(col)-sorted = 1;  \
(col)-revsorted = 1;   \
}   \
@@ -1782,7 +1787,7 @@ gdk_export void GDKqsort_rev(void *h, vo
(col)-seq = sqbs;  \
}   \
}   \
-   if (!BATatoms[(col)-type].linear) {\
+   if( !(col)-heap.compressed  !BATatoms[(col)-type].linear) { 
\
(col)-sorted = 0;  \
(col)-revsorted = 0;   \
}   \
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -2853,7 +2853,8 @@ BATassertHeadProps(BAT *b)
}
 
PROPDEBUG { /* only do a scan if property checking is requested */
-   if (b-hsorted || b-hrevsorted || !b-hkey) {
+   // not a good moment to test sortedness
+   if( !b-H-heap.compressed  (b-hsorted || b-hrevsorted || 
!b-hkey) ){
/* if sorted (either way), or we don't have to
 * prove uniqueness, we can do a simple
 * scan */
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Framework for chunk-based compressions

2014-08-07 Thread Martin Kersten
Changeset: 8c7be52d8968 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c7be52d8968
Added Files:
monetdb5/modules/mal/mosaic.c
monetdb5/modules/mal/mosaic.h
monetdb5/modules/mal/mosaic.mal
monetdb5/modules/mal/mosaic_none.c
monetdb5/modules/mal/mosaic_rle.c
Modified Files:
monetdb5/modules/mal/mal_init.mal
Branch: mosaic
Log Message:

Framework for chunk-based compressions
Initial phase in compression for heaps based on none/runlengthencoding


diffs (truncated from 1414 to 300 lines):

diff --git a/monetdb5/modules/mal/mal_init.mal 
b/monetdb5/modules/mal/mal_init.mal
--- a/monetdb5/modules/mal/mal_init.mal
+++ b/monetdb5/modules/mal/mal_init.mal
@@ -103,6 +103,7 @@ include txtsim;
 include tokenizer;
 include zorder;
 
+include mosaic;
 # include logger;
 include transaction;
 
diff --git a/monetdb5/modules/mal/mosaic.c b/monetdb5/modules/mal/mosaic.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/mosaic.c
@@ -0,0 +1,815 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the License); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an AS IS
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2014 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
+/*
+ * (c) 2014 author Martin Kersten
+ * Adaptive compression scheme to reduce the storage footprint for stable 
persistent data.
+*/
+
+#include monetdb_config.h
+#include mosaic.h
+#include mtime.h
+#include math.h
+#include opt_prelude.h
+#include algebra.h
+
+//#define _DEBUG_MOSAIC_
+
+/* do not invest in compressing BATs smaller than this */
+#define MIN_INPUT_COUNT 1
+
+/* The compressor kinds currently hardwired */
+#define MOSAIC_METHODS 7
+#define MOSAIC_NONE 0  // no compression at all
+#define MOSAIC_RLE  1  // use run-length encoding
+#define MOSAIC_FRONT2  // use front compression for =4 byte 
fields
+#define MOSAIC_DELTATA3// use delta encoding
+#define MOSAIC_BITMAPS  4  // use limited set of bitmaps
+#define MOSAIC_RANGE5  // use linear model 
+#define MOSAIC_GUASSIAN 6  // use guassian model fitting
+
+#define MOSAIC_BITS 48 // maximum number of elements to 
compress
+
+//Compression should have a significant reduction to apply.
+#define COMPRESS_THRESHOLD 50   //percent
+
+/*
+ * The header is reserved for meta information, e.g. oid indices.
+ * The block header encodes the information needed for the chunk decompressor
+ */
+typedef struct MOSAICHEADER{
+   int mosaicversion;
+   oid index[1000];
+   lng offset[1000];
+} * MosaicHeader;
+
+typedef struct MOSAICBLOCK{
+   lng tag:4,  // method applied in chunk
+   cnt:MOSAIC_BITS;// compression specific information
+} *MosaicBlk; 
+
+#define MosaicHdrSize  sizeof(struct MOSAICHEADER)
+#define MosaicBlkSize  sizeof(struct MOSAICBLOCK)
+
+#define wordaligned(X,SZ) \
+   X = ((char*)X) + (SZ) +  ((SZ) % sizeof(int)? sizeof(int) - 
(SZ)%sizeof(int) : 0)
+
+
+typedef struct MOSTASK{
+   int type;   // one of the permissible types
+   BUN elm;// elements left to compress
+   char *srcheap;  // start in source heap
+   char *dstheap;  // start of the destination heap
+   char *src, *compressed;// read pointer into source, write pointer into 
destination
+   MosaicBlk hdr;  // current block header
+
+   // The competing compression scheme leave the number of elements and 
compressed size
+   lng elements[MOSAIC_METHODS];   
+   lng xsize[MOSAIC_METHODS];  
+   lng time[MOSAIC_METHODS];   
+   // collect compression statistics for the particular task
+   lng timing[MOSAIC_METHODS];
+   lng winners[MOSAIC_METHODS];
+   int percentage[MOSAIC_METHODS]; // compression size for the last batch 
0..100 percent
+} *MOStask;
+
+/* we keep a condensed OID index anchored to the compressed blocks */
+
+typedef struct MOSINDEX{
+   lng offset; // header location within compressed heap
+   lng nullcnt;// number of nulls encountered
+   ValRecord low,hgh; // zone value markers for fix-length types
+} *mosaicindex;
+
+/* Run through a column to produce a compressed version */
+
+/* simple include the details of the hardwired compressors */
+#include mosaic_none.c
+#include mosaic_rle.c
+
+#ifdef 

MonetDB: mosaic - Add mosaic

2014-08-07 Thread Martin Kersten
Changeset: 0be511297a08 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0be511297a08
Modified Files:
monetdb5/optimizer/optimizer.mal
Branch: mosaic
Log Message:

Add mosaic


diffs (18 lines):

diff --git a/monetdb5/optimizer/optimizer.mal b/monetdb5/optimizer/optimizer.mal
--- a/monetdb5/optimizer/optimizer.mal
+++ b/monetdb5/optimizer/optimizer.mal
@@ -283,6 +283,14 @@ pattern optimizer.mitosis(mod:str, fcn:s
 address OPTwrapper
 comment Modify the plan to exploit parallel processing on multiple cores;
 
+#opt_mosaic.mal
+
+pattern optimizer.mosaic():str
+address OPTwrapper;
+pattern optimizer.mosaic(mod:str, fcn:str):str
+address OPTwrapper
+comment Modify the plan to exploit compressed storage;
+
 #opt_multiplex.mal
 pattern optimizer.multiplex():void
 address OPTwrapper
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Add (de)compress command

2014-08-07 Thread Martin Kersten
Changeset: 133d16b386d6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=133d16b386d6
Modified Files:
sql/backends/monet5/sql.c
sql/backends/monet5/sql.h
sql/backends/monet5/sql.mal
Branch: mosaic
Log Message:

Add (de)compress command


diffs (165 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -43,6 +43,7 @@
 #include cluster.h
 #include opt_pipes.h
 #include clients.h
+#include mosaic.h
 #ifdef HAVE_RAPTOR
 # include rdf.h
 #endif
@@ -3882,6 +3883,123 @@ SQLargRecord(Client cntxt, MalBlkPtr mb,
 }
 
 /*
+ * Table (de-)compression schemes
+ */
+str
+SQLcompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
+{
+   str *sch = (str *) getArgReference(stk, pci, 1);
+   str *tbl = (str *) getArgReference(stk, pci, 2);
+   sql_trans *tr;
+   sql_schema *s;
+   sql_table *t;
+   sql_column *c;
+   mvc *m = NULL;
+   str msg;
+   bat bid;
+   BAT *b;
+   node *o;
+
+   if ((msg = getSQLContext(cntxt, mb, m, NULL)) != NULL)
+   return msg;
+   if ((msg = checkSQLContext(cntxt)) != NULL)
+   return msg;
+   s = mvc_bind_schema(m, *sch);
+   if (s == NULL)
+   throw(SQL, sql.compress, 3F000!Schema missing);
+   t = mvc_bind_table(m, s, *tbl);
+   if (t == NULL)
+   throw(SQL, sql.compress, 42S02!Table missing);
+   if ( !t-readonly)
+   throw(SQL, sql.compress, !Table must be read only);
+   tr = m-session-tr;
+   t-base.wtime = s-base.wtime = tr-wtime = tr-wstime;
+   t-base.rtime = s-base.rtime = tr-rtime = tr-stime;
+
+   for (o = t-columns.set-h; o; o = o-next) {
+   sql_delta *d;
+   c = o-data;
+   b = store_funcs.bind_col(tr, c, 0);
+   if (b == NULL)
+   throw(SQL, sql.compress, Can not access descriptor);
+   msg =MOScompressInternal(cntxt, bid, b-batCacheid,0);
+   BBPreleaseref(b-batCacheid);
+   if (msg) 
+   return msg;
+   d = c-data;
+   if (d-bid)
+   BBPdecref(d-bid, TRUE);
+   if (d-ibid)
+   BBPdecref(d-ibid, TRUE);
+   d-bid = bid;
+   d-ibase = 0;
+   d-ibid = 0;/* use the insert bat */
+   c-base.wtime = tr-wstime;
+   c-base.rtime = tr-stime;
+   }
+   /* bat was cleared */
+   t-cleared = 1;
+   return MAL_SUCCEED;
+}
+
+str
+SQLdecompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
+{
+   str *sch = (str *) getArgReference(stk, pci, 1);
+   str *tbl = (str *) getArgReference(stk, pci, 2);
+   sql_trans *tr;
+   sql_schema *s;
+   sql_table *t;
+   sql_column *c;
+   mvc *m = NULL;
+   str msg;
+   bat bid;
+   BAT *b;
+   node *o;
+
+   if ((msg = getSQLContext(cntxt, mb, m, NULL)) != NULL)
+   return msg;
+   if ((msg = checkSQLContext(cntxt)) != NULL)
+   return msg;
+   s = mvc_bind_schema(m, *sch);
+   if (s == NULL)
+   throw(SQL, sql.decompress, 3F000!Schema missing);
+   t = mvc_bind_table(m, s, *tbl);
+   if (t == NULL)
+   throw(SQL, sql.decompress, 42S02!Table missing);
+   if ( !t-readonly)
+   throw(SQL, sql.compress, !Table must be read only);
+   tr = m-session-tr;
+   t-base.wtime = s-base.wtime = tr-wtime = tr-wstime;
+   t-base.rtime = s-base.rtime = tr-rtime = tr-stime;
+
+   for (o = t-columns.set-h; o; o = o-next) {
+   sql_delta *d;
+   c = o-data;
+   b = store_funcs.bind_col(tr, c, 0);
+   if (b == NULL)
+   throw(SQL, sql.decompress, Can not access 
descriptor);
+   msg =MOSdecompressInternal(cntxt, bid, b-batCacheid);
+   BBPreleaseref(b-batCacheid);
+   if (msg)
+   return msg;
+   d = c-data;
+   if (d-bid)
+   BBPdecref(d-bid, TRUE);
+   if (d-ibid)
+   BBPdecref(d-ibid, TRUE);
+   d-bid = bid;
+   d-ibase = 0;
+   d-ibid = 0;/* use the insert bat */
+   c-base.wtime = tr-wstime;
+   c-base.rtime = tr-stime;
+   }
+   /* bat was cleared */
+   t-cleared = 1;
+   return MAL_SUCCEED;
+}
+
+/*
  * The table is searched for all columns and they are
  * re-clustered on the hash value over the  primary key.
  * Initially the first column
diff --git a/sql/backends/monet5/sql.h b/sql/backends/monet5/sql.h
--- a/sql/backends/monet5/sql.h
+++ b/sql/backends/monet5/sql.h
@@ -130,6 +130,8 @@ sql5_export str mvc_restart_seq(Client c
 sql5_export str zero_or_one(ptr ret, int 

MonetDB: mosaic - The SQL mosaic interface script

2014-08-07 Thread Martin Kersten
Changeset: b9ca0f5ac916 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9ca0f5ac916
Added Files:
sql/scripts/18_compress.sql
Branch: mosaic
Log Message:

The SQL mosaic interface script


diffs (31 lines):

diff --git a/sql/scripts/18_compress.sql b/sql/scripts/18_compress.sql
new file mode 100644
--- /dev/null
+++ b/sql/scripts/18_compress.sql
@@ -0,0 +1,26 @@
+-- The contents of this file are subject to the MonetDB Public License
+-- Version 1.1 (the License); you may not use this file except in
+-- compliance with the License. You may obtain a copy of the License at
+-- http://www.monetdb.org/Legal/MonetDBLicense
+--
+-- Software distributed under the License is distributed on an AS IS
+-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+-- License for the specific language governing rights and limitations
+-- under the License.
+--
+-- The Original Code is the MonetDB Database System.
+--
+-- The Initial Developer of the Original Code is CWI.
+-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+-- Copyright August 2008-2014 MonetDB B.V.
+-- All Rights Reserved.
+
+-- Compression is defined for read only tables  only!
+-- Upon a call, an attempt is made to reduce storage footprint
+
+create procedure compress(sys string, tab string)
+   external name sql.compress;
+
+create procedure decompress(sys string, tab string)
+   external name sql.decompress;
+
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Introduction of the mosaic optimizer

2014-08-07 Thread Martin Kersten
Changeset: dd91548a9cdc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd91548a9cdc
Added Files:
monetdb5/optimizer/opt_mosaic.c
monetdb5/optimizer/opt_mosaic.h
Modified Files:
monetdb5/optimizer/Makefile.ag
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_support.h
monetdb5/optimizer/opt_wrapper.c
Branch: mosaic
Log Message:

Introduction of the mosaic optimizer
It should be run in the tail of the pipeline,
since that would benefit normal algebraic optimizations,
such as the select/join stuff.


diffs (truncated from 349 to 300 lines):

diff --git a/monetdb5/optimizer/Makefile.ag b/monetdb5/optimizer/Makefile.ag
--- a/monetdb5/optimizer/Makefile.ag
+++ b/monetdb5/optimizer/Makefile.ag
@@ -52,6 +52,7 @@ lib_optimizer = {
opt_json.c opt_json.h \
opt_mergetable.c opt_mergetable.h \
opt_mitosis.c opt_mitosis.h \
+   opt_mosaic.c opt_mosaic.h \
opt_multiplex.c opt_multiplex.h \
opt_octopus.c opt_octopus.h \
opt_pipes.c opt_pipes.h \
diff --git a/monetdb5/optimizer/opt_mosaic.c b/monetdb5/optimizer/opt_mosaic.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/optimizer/opt_mosaic.c
@@ -0,0 +1,125 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the License); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an AS IS
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2014 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
+/* (c) M. Kersten
+ * Pass relevant algebra operations through the mosaic library.
+ * It should only look at direct use of persistent readonly columns.
+ * This can be recognized by observing the various components being accessed.
+ */
+#include monetdb_config.h
+#include opt_mosaic.h
+#include mosaic.h
+#include mtime.h
+
+/* #define _DEBUG_MOSAIC_*/
+
+static int OPTmosaicType(MalBlkPtr mb, InstrPtr pci, int idx)
+{  int type;
+   switch(type = getArgType(mb,pci,idx)){
+   case TYPE_bte:
+   case TYPE_sht:
+   case TYPE_int:
+   case TYPE_lng:
+   case TYPE_flt:
+   case TYPE_dbl:
+   return 1;
+   default:
+   if( type == TYPE_timestamp)
+   return 1;
+   }
+   return 0;
+}
+int 
+OPTmosaicImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci)
+{
+   InstrPtr p,q, *old;
+int limit,i,j, k, target=0;
+   char *check;
+
+   check = GDKzalloc(mb-vsize);
+   if ( check == NULL)
+   return 0;
+
+   limit = mb-stop;
+   old = mb-stmt;
+   if ( newMalBlkStmt(mb, mb-ssize)  0)
+   return 0;
+
+   (void) cntxt;
+   (void) pci;
+   (void) stk;
+
+   // pre-scan to identify all potentially compressed columns
+for( i=1; i  mb-stop; i++){
+p = old[i];
+if ( getModuleId(p) == sqlRef  getFunctionId(p) == bindRef  
getVarConstant(mb,getArg(p,5)).val.ival == 0  OPTmosaicType(mb,p,0)){
+   check[getArg(p,0)] = 1;
+   } else
+if ( getModuleId(p) == sqlRef  getFunctionId(p) == bindRef  
getVarConstant(mb,getArg(p,5)).val.ival != 0){
+   // locate the corresponding base column and turn it off
+   for( k= i-1; k0; k--){
+   q = getInstrPtr(mb,k);
+   if ( getArg(q,2) == getArg(p,2)  getArg(q,3) 
== getArg(p,3)  getArg(q,4) == getArg(p,4))
+   check[getArg(q,0)] = 0;
+   }
+   } else
+if ( getModuleId(p) == algebraRef  (getFunctionId(p) == subselectRef 
|| getFunctionId(p) == thetasubselectRef)  check[getArg(p,1)] ) 
+/* ok */;
+   else
+if ( getModuleId(p) == algebraRef  getFunctionId(p) == 
leftfetchjoinRef  check[getArg(p,2)])
+/* ok */;
+   else
+if ( getModuleId(p) == algebraRef  getFunctionId(p) == joinRef  
(check[getArg(p,2)] || check[getArg(p,1)]))
+/* ok */;
+   else
+   for(j= p-retc; jp-argc; j++)
+   if( check[getArg(p,j)] )
+   check[getArg(p,j)] = -1;
+}
+   // actual conversion
+for( i=0; i  limit; 

MonetDB: mosaic - Additional mosaic tests

2014-08-07 Thread Martin Kersten
Changeset: 23c462e5486f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=23c462e5486f
Added Files:
monetdb5/modules/mal/Tests/mosaic_mix.mal
monetdb5/modules/mal/Tests/mosaic_mix.stable.err
monetdb5/modules/mal/Tests/mosaic_mix.stable.out
monetdb5/modules/mal/Tests/mosaic_none.mal
monetdb5/modules/mal/Tests/mosaic_none.stable.err
monetdb5/modules/mal/Tests/mosaic_none.stable.out
monetdb5/modules/mal/Tests/mosaic_rle.mal
monetdb5/modules/mal/Tests/mosaic_rle.stable.err
monetdb5/modules/mal/Tests/mosaic_rle.stable.out
sql/test/mosaic/Tests/All
sql/test/mosaic/Tests/compression.sql
sql/test/mosaic/Tests/warnings.sql
sql/test/mosaic/Tests/warnings.stable.err
sql/test/mosaic/Tests/warnings.stable.out
Modified Files:
monetdb5/modules/mal/Makefile.ag
monetdb5/modules/mal/Tests/All
sql/scripts/Makefile.ag
Branch: mosaic
Log Message:

Additional mosaic tests


diffs (truncated from 1779 to 300 lines):

diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -17,6 +17,7 @@
 
 INCLUDES = ../../mal ../atoms ../kernel \
../../../clients/mapilib \
+   ../../../monetdb5/optimizer \
../../../common/options \
../../../common/stream \
../../../common/utils \
@@ -60,6 +61,7 @@ lib_mal = {
zorder.c zorder.h \
sample.c sample.h \
json_util.c json_util.h \
+   mosaic.c mosaic.h \
calc.c batcalc.c
 }
 
@@ -75,7 +77,7 @@ headers_mal = {
mal_mapi.mal sabaoth.mal remote.mal  \
txtsim.mal recycle.mal \
cluster.mal trader.mal \
-   tokenizer.mal zorder.mal sample.mal json_util.mal \
+   tokenizer.mal zorder.mal sample.mal json_util.mal mosaic.mal \
calc.mal batcalc.mal batmtime.mal querylog.mal sysmon.mal
 }
 
@@ -83,7 +85,7 @@ EXTRA_DIST = batExtensions.mal iterator.
groupby.mal mal_init.mal manual.mal mkey.mal manifold.mal pcre.mal \
profiler.mal recycle.mal remote.mal sabaoth.mal trader.mal \
transaction.mal txtsim.mal tablet.mal tablet.h sample.mal json_util.mal 
\
-   mal_mapi.mal mat.mal tokenizer.mal calc.mal \
-   batcalc.mal batmtime.mal querylog.mal sysmon.mal
+   mal_mapi.mal mat.mal tokenizer.mal calc.mal 
+   batcalc.mal batmtime.mal querylog.mal sysmon.mal mosaic.mal
 
 EXTRA_DIST_DIR = Tests
diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All
--- a/monetdb5/modules/mal/Tests/All
+++ b/monetdb5/modules/mal/Tests/All
@@ -9,7 +9,6 @@ inspect00
 inspect05
 inspect10
 #inspect40 word size problems on different platforms
-
 register00
 
 mserver00
@@ -18,13 +17,13 @@ qgram
 
 groupby00
 
+
 imprints
 
 call00
 callstring
 callfunction
 
-
 #ascii_io2 needs work
 
 mat
@@ -67,7 +66,10 @@ zorder
 
 manifold
 manifoldstr
-#manifoldaggr
+
+mosaic_none
+mosaic_rle
+mosaic_mix
 
 #HAVE_RAPTOR?rdf
 
diff --git a/monetdb5/modules/mal/Tests/mosaic_mix.mal 
b/monetdb5/modules/mal/Tests/mosaic_mix.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_mix.mal
@@ -0,0 +1,102 @@
+# OID list compressions
+
+o := 19531025:int;
+
+b:= bat.new(:oid,:int);
+bat.append(b,0);
+bat.append(b,1);
+bat.append(b,2);
+bat.append(b,3);
+bat.append(b,5);
+bat.append(b,7);
+bat.append(b,70);
+bat.append(b,188);
+bat.append(b,190);
+bat.append(b,192);
+bat.append(b,);
+bat.append(b,50);
+bat.append(b,49);
+bat.append(b,50);
+bat.append(b,50);
+bat.append(b,48);
+bat.append(b,1003);
+bat.append(b,1002);
+bat.append(b,1001);
+bat.append(b,1000);
+bat.append(b,95);
+bat.append(b,99);
+bat.append(b,96);
+bat.append(b,98);
+bat.append(b,97);
+bat.append(b,94);
+bat.append(b,90);
+bat.append(b,93);
+bat.append(b,91);
+bat.append(b,92);
+bat.append(b,1140);
+bat.append(b,1130);
+bat.append(b,1120);
+bat.append(b,1110);
+bat.append(b,1100);
+bat.append(b,1250);
+bat.append(b,1260);
+bat.append(b,1270);
+bat.append(b,1280);
+bat.append(b,1290);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,o);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);
+bat.append(b,9);

MonetDB: mosaic - Simplified test case

2014-08-07 Thread Martin Kersten
Changeset: 6c3716c9bb81 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c3716c9bb81
Modified Files:
sql/backends/monet5/sql.c
Branch: mosaic
Log Message:

Simplified test case
This should be a safe test to play around with the BATs.


diffs (39 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -3918,11 +3918,16 @@ SQLcompress(Client cntxt, MalBlkPtr mb, 
 
for (o = t-columns.set-h; o; o = o-next) {
sql_delta *d;
+   BAT *bn;
c = o-data;
b = store_funcs.bind_col(tr, c, 0);
if (b == NULL)
throw(SQL, sql.compress, Can not access descriptor);
-   msg =MOScompressInternal(cntxt, bid, b-batCacheid,0);
+   // simplified test case
+   bn = BATcopy(b,b-htype, b-ttype,0,TRANSIENT);
+   BBPkeepref(bn-batCacheid);
+   bid = bn-batCacheid;
+   //msg =MOScompressInternal(cntxt, bid, b-batCacheid,0);
BBPreleaseref(b-batCacheid);
if (msg) 
return msg;
@@ -3975,11 +3980,16 @@ SQLdecompress(Client cntxt, MalBlkPtr mb
 
for (o = t-columns.set-h; o; o = o-next) {
sql_delta *d;
+   BAT *bn;
c = o-data;
b = store_funcs.bind_col(tr, c, 0);
if (b == NULL)
throw(SQL, sql.decompress, Can not access 
descriptor);
-   msg =MOSdecompressInternal(cntxt, bid, b-batCacheid);
+   // simplified test case
+   bn = BATcopy(b,b-htype, b-ttype,0,TRANSIENT);
+   BBPkeepref(bn-batCacheid);
+   bid = bn-batCacheid;
+   //msg =MOSdecompressInternal(cntxt, bid, b-batCacheid);
BBPreleaseref(b-batCacheid);
if (msg)
return msg;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list