Changeset: 9c51f3980cc6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9c51f3980cc6
Added Files:
        gdk/gdk_cand.h
        sql/test/BugTracker-2014/Tests/div_by_zero_in_return.Bug-3555.sql
        sql/test/BugTracker-2014/Tests/div_by_zero_in_return.Bug-3555.stable.err
        sql/test/BugTracker-2014/Tests/div_by_zero_in_return.Bug-3555.stable.out
Modified Files:
        clients/Tests/MAL-signatures_all.stable.out
        clients/Tests/MAL-signatures_fits_geom.stable.out
        clients/Tests/MAL-signatures_geom.stable.out
        clients/Tests/MAL-signatures_none.stable.out
        clients/Tests/SQL-dump_all.stable.out
        clients/Tests/SQL-dump_all.stable.out.oid32
        clients/Tests/SQL-dump_geom.stable.out
        clients/Tests/SQL-dump_geom.stable.out.32bit
        clients/Tests/SQL-dump_geom.stable.out.64bit.oid32
        clients/Tests/SQL-dump_none.stable.out
        clients/Tests/exports.stable.out
        clients/mapiclient/mclient.c
        gdk/Makefile.ag
        gdk/gdk_aggr.c
        gdk/gdk_atoms.c
        gdk/gdk_calc.c
        gdk/gdk_calc_private.h
        gdk/gdk_join.c
        gdk/gdk_search.c
        gdk/gdk_select.c
        gdk/gdk_ssort.c
        gdk/gdk_ssort_impl.h
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/pcre.mal
        sql/backends/monet5/bam/Tests/query1.5.sql
        sql/backends/monet5/bam/Tests/query1.5.stable.out
        sql/server/rel_dump.c
        sql/server/rel_optimizer.c
        sql/server/rel_psm.c
        sql/test/BugTracker-2014/Tests/orderby_on_constant.Bug-3554.sql
        sql/test/BugTracker-2014/Tests/orderby_on_constant.Bug-3554.stable.out
Branch: default
Log Message:

Merge with Oct2014 branch.


diffs (truncated from 2487 to 300 lines):

diff --git a/clients/Tests/MAL-signatures_all.stable.out 
b/clients/Tests/MAL-signatures_all.stable.out
--- a/clients/Tests/MAL-signatures_all.stable.out
+++ b/clients/Tests/MAL-signatures_all.stable.out
@@ -2330,6 +2330,10 @@ command algebra.groupby(gids:bat[:oid,:o
 address ALGgroupby;
 comment Produces a new BAT with groups identified by the head column. The 
result contains tail times the head value, ie the tail contains the result 
group sizes.
 
+command 
algebra.ilikesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address ILIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case insensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.ilikesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCREilike_join_pcre;
 function 
algebra.ilikesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
@@ -2382,6 +2386,10 @@ pattern algebra.leftjoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
+command 
algebra.likesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address LIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case sensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.likesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCRElike_join_pcre;
 function 
algebra.likesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out 
b/clients/Tests/MAL-signatures_fits_geom.stable.out
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out
@@ -2331,6 +2331,10 @@ command algebra.groupby(gids:bat[:oid,:o
 address ALGgroupby;
 comment Produces a new BAT with groups identified by the head column. The 
result contains tail times the head value, ie the tail contains the result 
group sizes.
 
+command 
algebra.ilikesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address ILIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case insensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.ilikesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCREilike_join_pcre;
 function 
algebra.ilikesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
@@ -2383,6 +2387,10 @@ pattern algebra.leftjoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
+command 
algebra.likesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address LIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case sensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.likesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCRElike_join_pcre;
 function 
algebra.likesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
diff --git a/clients/Tests/MAL-signatures_geom.stable.out 
b/clients/Tests/MAL-signatures_geom.stable.out
--- a/clients/Tests/MAL-signatures_geom.stable.out
+++ b/clients/Tests/MAL-signatures_geom.stable.out
@@ -2331,6 +2331,10 @@ command algebra.groupby(gids:bat[:oid,:o
 address ALGgroupby;
 comment Produces a new BAT with groups identified by the head column. The 
result contains tail times the head value, ie the tail contains the result 
group sizes.
 
+command 
algebra.ilikesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address ILIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case insensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.ilikesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCREilike_join_pcre;
 function 
algebra.ilikesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
@@ -2383,6 +2387,10 @@ pattern algebra.leftjoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
+command 
algebra.likesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address LIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case sensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.likesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCRElike_join_pcre;
 function 
algebra.likesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
diff --git a/clients/Tests/MAL-signatures_none.stable.out 
b/clients/Tests/MAL-signatures_none.stable.out
--- a/clients/Tests/MAL-signatures_none.stable.out
+++ b/clients/Tests/MAL-signatures_none.stable.out
@@ -2330,6 +2330,10 @@ command algebra.groupby(gids:bat[:oid,:o
 address ALGgroupby;
 comment Produces a new BAT with groups identified by the head column. The 
result contains tail times the head value, ie the tail contains the result 
group sizes.
 
+command 
algebra.ilikesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address ILIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case insensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.ilikesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCREilike_join_pcre;
 function 
algebra.ilikesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
@@ -2382,6 +2386,10 @@ pattern algebra.leftjoinPath(l:bat[:any,
 address ALGjoinPath;
 comment Routine to handle join paths.  The type analysis is rather tricky.
 
+command 
algebra.likesubjoin(l:bat[:oid,:str],r:bat[:oid,:str],sl:bat[:oid,:oid],sr:bat[:oid,:oid],esc:str)
 (X_6:bat[:oid,:oid],X_7:bat[:oid,:oid]) 
+address LIKEsubjoin;
+comment Join the string bat L with the pattern bat Rwith optional candidate 
lists SL and SR using pattern escape string ESCand doing a case sensitive 
match.The result is two aligned bats with oids of matching rows.
+
 command algebra.likesubselect(s:bat[:oid,:str],pat:bat[:oid,:str],esc:str) 
(l:bat[:oid,:oid],r:bat[:oid,:oid]) 
 address PCRElike_join_pcre;
 function 
algebra.likesubselect(b:bat[:oid,:str],cand:bat[:oid,:oid],pat:str,esc:str,anti:bit):bat[:oid,:oid];
diff --git a/clients/Tests/SQL-dump_all.stable.out 
b/clients/Tests/SQL-dump_all.stable.out
--- a/clients/Tests/SQL-dump_all.stable.out
+++ b/clients/Tests/SQL-dump_all.stable.out
@@ -57,9 +57,9 @@ Ready.
 SCHEMA  bam
 SCHEMA  json
 SCHEMA  tmp
+SCHEMA         bam
+SCHEMA         json
 SCHEMA         tmp
-SCHEMA         json
-SCHEMA         bam
 SYSTEM SCHEMA  sys
 SYSTEM TABLE  sys._columns
 SYSTEM TABLE  sys._tables
diff --git a/clients/Tests/SQL-dump_all.stable.out.oid32 
b/clients/Tests/SQL-dump_all.stable.out.oid32
--- a/clients/Tests/SQL-dump_all.stable.out.oid32
+++ b/clients/Tests/SQL-dump_all.stable.out.oid32
@@ -57,9 +57,9 @@ Ready.
 SCHEMA  bam
 SCHEMA  json
 SCHEMA  tmp
+SCHEMA         bam
+SCHEMA         json
 SCHEMA         tmp
-SCHEMA         json
-SCHEMA         bam
 SYSTEM SCHEMA  sys
 SYSTEM TABLE  sys._columns
 SYSTEM TABLE  sys._tables
diff --git a/clients/Tests/SQL-dump_geom.stable.out 
b/clients/Tests/SQL-dump_geom.stable.out
--- a/clients/Tests/SQL-dump_geom.stable.out
+++ b/clients/Tests/SQL-dump_geom.stable.out
@@ -56,8 +56,8 @@ Ready.
 
 SCHEMA  json
 SCHEMA  tmp
+SCHEMA         json
 SCHEMA         tmp
-SCHEMA         json
 SYSTEM SCHEMA  sys
 SYSTEM TABLE  sys._columns
 SYSTEM TABLE  sys._tables
diff --git a/clients/Tests/SQL-dump_geom.stable.out.32bit 
b/clients/Tests/SQL-dump_geom.stable.out.32bit
--- a/clients/Tests/SQL-dump_geom.stable.out.32bit
+++ b/clients/Tests/SQL-dump_geom.stable.out.32bit
@@ -52,8 +52,8 @@ Ready.
 
 SCHEMA  json
 SCHEMA  tmp
+SCHEMA         json
 SCHEMA         tmp
-SCHEMA         json
 SYSTEM SCHEMA  sys
 SYSTEM TABLE  sys._columns
 SYSTEM TABLE  sys._tables
diff --git a/clients/Tests/SQL-dump_geom.stable.out.64bit.oid32 
b/clients/Tests/SQL-dump_geom.stable.out.64bit.oid32
--- a/clients/Tests/SQL-dump_geom.stable.out.64bit.oid32
+++ b/clients/Tests/SQL-dump_geom.stable.out.64bit.oid32
@@ -56,8 +56,8 @@ Ready.
 
 SCHEMA  json
 SCHEMA  tmp
+SCHEMA         json
 SCHEMA         tmp
-SCHEMA         json
 SYSTEM SCHEMA  sys
 SYSTEM TABLE  sys._columns
 SYSTEM TABLE  sys._tables
diff --git a/clients/Tests/SQL-dump_none.stable.out 
b/clients/Tests/SQL-dump_none.stable.out
--- a/clients/Tests/SQL-dump_none.stable.out
+++ b/clients/Tests/SQL-dump_none.stable.out
@@ -56,8 +56,8 @@ Ready.
 
 SCHEMA  json
 SCHEMA  tmp
+SCHEMA         json
 SCHEMA         tmp
-SCHEMA         json
 SYSTEM SCHEMA  sys
 SYSTEM TABLE  sys._columns
 SYSTEM TABLE  sys._tables
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1312,6 +1312,7 @@ str IDentifier(str *retval, str *in);
 int IDfromString(str src, int *len, str *retval);
 str IDprelude(void);
 int IDtoString(str *retval, int *len, str handle);
+str ILIKEsubjoin(bat *r1, bat *r2, bat *lid, bat *rid, bat *slid, bat *srid, 
str *esc);
 str INET_comp_CS(bit *retval, inet *val1, inet *val2);
 str INET_comp_CSE(bit *retval, inet *val1, inet *val2);
 str INET_comp_CW(bit *retval, inet *val1, inet *val2);
@@ -1424,6 +1425,7 @@ int JSONtoString(str *s, int *len, json 
 str JSONunfold(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str JSONvalueArray(json *ret, json *arg);
 str JSONvalueTable(int *ret, json *j);
+str LIKEsubjoin(bat *r1, bat *r2, bat *lid, bat *rid, bat *slid, bat *srid, 
str *esc);
 char *M5OutOfMemory;
 str MACROprocessor(Client cntxt, MalBlkPtr mb, Symbol t);
 int MAL_MAXCLIENTS;
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2199,28 +2199,28 @@ doFile(Mapi mid, const char *file, int u
                                             *line && !(isascii((int) *line) && 
isspace((int) *line));
                                             line++) {
                                                switch (*line) {
-                                                       case 't':
-                                                               x |= MD_TABLE;
+                                               case 't':
+                                                       x |= MD_TABLE;
                                                        break;
-                                                       case 'v':
-                                                               x |= MD_VIEW;
+                                               case 'v':
+                                                       x |= MD_VIEW;
                                                        break;
-                                                       case 's':
-                                                               x |= MD_SEQ;
+                                               case 's':
+                                                       x |= MD_SEQ;
                                                        break;
-                                                       case 'f':
-                                                               x |= MD_FUNC;
+                                               case 'f':
+                                                       x |= MD_FUNC;
                                                        break;
-                                                       case 'n':
-                                                               x |= MD_SCHEMA;
+                                               case 'n':
+                                                       x |= MD_SCHEMA;
                                                        break;
-                                                       case 'S':
-                                                               wantsSystem = 1;
+                                               case 'S':
+                                                       wantsSystem = 1;
                                                        break;
-                                                       default:
-                                                               fprintf(stderr, 
"unknown sub-command for \\d: %c\n", *line);
-                                                               length = 0;
-                                                               line[1] = '\0';
+                                               default:
+                                                       fprintf(stderr, 
"unknown sub-command for \\d: %c\n", *line);
+                                                       length = 0;
+                                                       line[1] = '\0';
                                                        break;
                                                }
                                        }
@@ -2234,35 +2234,32 @@ doFile(Mapi mid, const char *file, int u
                                        /* lowercase the object, except for 
quoted parts */
                                        q = line;
                                        for (p = line; *p != '\0'; p++) {
-                                               switch (*p) {
-                                                       case '"':
-                                                               if (escaped) {
-                                                                       if (*(p 
+ 1) == '"') {
-                                                                               
/* SQL escape */
-                                                                               
*q++ = *p++;
-                                                                       } else {
-                                                                               
escaped = 0;
-                                                                       }
+                                               if (*p == '"') {
+                                                       if (escaped) {
+                                                               if (*(p + 1) == 
'"') {
+                                                                       /* SQL 
escape */
+                                                                       *q++ = 
*p++;
                                                                } else {
-                                                                       escaped 
= 1;
+                                                                       escaped 
= 0;
                                                                }
-                                                               break;
-                                                       default:
-                                                               if (!escaped) {
-                                                                       *q++ = 
tolower((int) *p);
-                                                                       if (*p 
== '*') {
-                                                                               
*p = '%';
-                                                                               
hasWildcard = 1;
-                                                                       } else 
if (*p == '?') {
-                                                                               
*p = '_';
-                                                                               
hasWildcard = 1;
-                                                                       } else 
if (*p == '.') {
-                                                                               
hasSchema = 1;
-                                                                       }
-                                                               } else {
-                                                                       *q++ = 
*p;
+                                                       } else {
+                                                               escaped = 1;
+                                                       }
+                                               } else {
+                                                       if (!escaped) {
+                                                               *q++ = 
tolower((int) *p);
+                                                               if (*p == '*') {
+                                                                       *p = 
'%';
+                                                                       
hasWildcard = 1;
+                                                               } else if (*p 
== '?') {
+                                                                       *p = 
'_';
+                                                                       
hasWildcard = 1;
+                                                               } else if (*p 
== '.') {
+                                                                       
hasSchema = 1;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to