Changeset: ea436074a631 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ea436074a631 Modified Files: monetdb5/modules/mal/Tests/All monetdb5/modules/mal/mal_init.mx Branch: sciql Log Message:
Merge with default branch. diffs (truncated from 31579 to 300 lines): diff --git a/gdk/gdk_bbp.mx b/gdk/gdk_bbp.mx --- a/gdk/gdk_bbp.mx +++ b/gdk/gdk_bbp.mx @@ -902,8 +902,8 @@ if (BBPsize >= BBPlimit) BBPextend(BATMARGIN, FALSE); } - if (src == 0) - assert(BBP[bid].cache == NULL); /* no duplicates in BBP.dir */ + if (src == 0 && BBP[bid].cache != NULL) + GDKfatal("BBPinit: duplicate entry in BBP.dir."); bs = GDKzalloc(sizeof(BATstore)); if (bs == NULL) GDKfatal("BBPinit: cannot allocate memory for BATstore."); @@ -1155,16 +1155,20 @@ @- In a distributed version of MonetDB, it would be nice to easily share the BATs with other server instances. Although concurrency control issues should be handled -with care, it can avoid excessive communiction costs. The BBPimportEntry creates -a BATdescriptor using symbolic links to its source. Presummably this would lead -to a transparant behavior. +with care, it can avoid excessive communication costs. The BBPimportEntry creates +a BATdescriptor using symbolic links to its source. Presumably this would lead +to a transparent behavior. @= linkHeap - lstat(@3, &st); + if (lstat(@3, &st) < 0) { + GDKerror("BBPimportEntry: file '%s' does not exist.\n", @3); + BBPdestroy(bn); + return 0; + } GDKfilepath(path, BATDIR, BBP_physical(bn->batCacheid), "@4"); GDKcreatedir(path); IODEBUG mnstr_printf(GDKerr, "#symlink %s ->%s\n", @3, path); if (symlink(@3, path) < 0) { - GDKerror("attach.bind:cannot link '%s' -> '%s'\n", path, @3); + GDKerror("BBPimportEntry: cannot link '%s' -> '%s'\n", path, @3); BBPdestroy(bn); return 0; } @@ -1174,15 +1178,23 @@ GDKfree(bn->@1->@2.filename); bn->@1->@2.filename = 0; } - HEAPload(&bn->@1->@2, BBP_physical(bn->batCacheid), "@4", TRUE); + if (HEAPload(&bn->@1->@2, BBP_physical(bn->batCacheid), "@4", TRUE) < 0) { + GDKerror("BBPimportEntry: cannot read heap file '%s'\n", @3); + BBPdestroy(bn); + return 0; + } @= linkvHeap - lstat(@2, &st); + if (lstat(@2, &st) < 0) { + GDKerror("BBPimportEntry: file '%s' does not exist.\n", @2); + BBPdestroy(bn); + return 0; + } GDKfilepath(path, BATDIR, BBP_physical(bn->batCacheid), "@3"); GDKcreatedir(path); IODEBUG mnstr_printf(GDKerr, "#symlink %s ->%s\n", @2, path); if (symlink(@2, path) < 0) { - GDKerror("attach.bind:cannot link '%s' -> '%s'\n", path, @2); + GDKerror("BBPimportEntry: cannot link '%s' -> '%s'\n", path, @2); BBPdestroy(bn); return 0; } @@ -1195,7 +1207,11 @@ GDKfree(bn->@1->vheap->filename); bn->@1->vheap->filename = 0; } - HEAPload(bn->@1->vheap, BBP_physical(bn->batCacheid), "@3", TRUE); + if (HEAPload(bn->@1->vheap, BBP_physical(bn->batCacheid), "@3", TRUE) < 0) { + GDKerror("BBPimportEntry: cannot read heap file '%s'\n", @2); + BBPdestroy(bn); + return 0; + } @c bat @@ -1221,6 +1237,10 @@ int BBPlimit; IODEBUG mnstr_printf(GDKerr,"#importEntry %s\n",nme); + if (strlen(nme) >= sizeof(bbpdir)) { + GDKerror("BBPimportEntry: file name too long\n"); + return 0; + } strcpy(bbpdir,nme); s= strstr(bbpdir,BATDIR); if (s == 0) diff --git a/monetdb5/mal/mal_debugger.mx b/monetdb5/mal/mal_debugger.mx --- a/monetdb5/mal/mal_debugger.mx +++ b/monetdb5/mal/mal_debugger.mx @@ -1379,8 +1379,13 @@ i = BBPindex(b); if (i != 0){ printBATelm(out, i, size, first); - } else + } else { + i = atoi(b); + if ( i || *b == '0') + printStackElm(out, mb, stk->stk + i, i, size, first); + else mnstr_printf(out, "%s Symbol not found\n", "#mdb "); + } continue; } if (isaBatType(getVarType(mb,i)) && upper =='p'){ @@ -1435,7 +1440,7 @@ InstrPtr q; lstng= LIST_MAL_DEBUG | LIST_MAL_UDF | LIST_MAL_LNR; - if ( *b=='L') lstng |= LIST_MAL_PROPS | LIST_MAL_DETAIL; + if ( *b=='L') lstng |= LIST_MAL_DETAIL; skipWord(cntxt, b); if (*b != 0) { MalBlkPtr m= mdbLocateMalBlk(cntxt,mb,b,out); @@ -1858,6 +1863,8 @@ str nme, nmeOnStk; VarPtr n = getVar(mb, index); + if ( !isVarUsed(mb,index) ) + return; printStackHdr(f,mb,v,index); if (v && v->vtype == TYPE_bat){ @@ -1883,7 +1890,7 @@ if (strcmp(nmeOnStk, nme) && strncmp(nmeOnStk,"BAT",3)) mnstr_printf(f,"!%s ",nmeOnStk); mnstr_printf(f, " %s", (isVarConstant(mb,index)? " constant" : "")); - mnstr_printf(f, " %s", (isVarUsed(mb,index) ? "": " not used" )); + /* mnstr_printf(f, " %s", (isVarUsed(mb,index) ? "": " not used" ));*/ mnstr_printf(f, " %s", (isVarTypedef(mb,index) ? " type variable" : "")); if ( getEndOfLife(mb,index)) mnstr_printf(f," eolife=%d ", getEndOfLife(mb,index)); diff --git a/monetdb5/mal/mal_instruction.mx b/monetdb5/mal/mal_instruction.mx --- a/monetdb5/mal/mal_instruction.mx +++ b/monetdb5/mal/mal_instruction.mx @@ -2789,8 +2789,10 @@ MalProp *p = mb->prps+v->prps[i]; char *nme = PropertyName(p->idx); - if (!first) + if (!first) { *s++ = ','; + *s++ = ' '; + } if (p->var) { VarPtr v = getVar(mb, p->var); char *op = PropertyOperatorString((prop_op_t)p->op); 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 @@ -34,6 +34,7 @@ remote06 remote08 remote09 +remote11 # needs Merovingian and aims at SQL #remote88 #remote89 diff --git a/monetdb5/modules/mal/Tests/remote11.mal b/monetdb5/modules/mal/Tests/remote11.mal new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/remote11.mal @@ -0,0 +1,15019 @@ +# let connect figure out itself how to connect to the running db +uri := sabaoth.getLocalConnectionURI(); + +# create a persistent connecton to ourself +conn1:str := remote.connect(uri, "monetdb", "monetdb"); + +b := bat.new(:oid, :str); +b := bat.insert(b, nil:oid, "blithely final dolphins solve-- blithely blithe packages nag blith"); +b := bat.insert(b, nil:oid, "quickly regular depend"); +b := bat.insert(b, nil:oid, "deposits alongside of the dependencies are slowly about "); +b := bat.insert(b, nil:oid, "final requests detect slyly across the blithely bold pinto beans. eve"); +b := bat.insert(b, nil:oid, "even deposits cajole furiously. quickly spe"); +b := bat.insert(b, nil:oid, "ironically bold asymptotes sleep blithely beyond the regular, clos"); +b := bat.insert(b, nil:oid, "ironic, regular deposits are. ironic foxes sl"); +b := bat.insert(b, nil:oid, "slyly final foxes are slyly. packag"); +b := bat.insert(b, nil:oid, "packages maintain about the deposits; foxes hang after "); +b := bat.insert(b, nil:oid, "quickly express asymptotes use. carefully final packages sleep f"); +b := bat.insert(b, nil:oid, "fluffily regular pinto beans "); +b := bat.insert(b, nil:oid, "carefully ironic accounts nag"); +b := bat.insert(b, nil:oid, "express requests ar"); +b := bat.insert(b, nil:oid, "slyly quick pinto beans detect flu"); +b := bat.insert(b, nil:oid, "furiously unusual pinto beans above the furiously ironic asymptot"); +b := bat.insert(b, nil:oid, "final deposits nag. blithely special deposits a"); +b := bat.insert(b, nil:oid, "furiously even platelets boost ironic theodolites. even "); +b := bat.insert(b, nil:oid, "ironic requests are quickly about the carefully unusual a"); +b := bat.insert(b, nil:oid, "regular, bold foxes across the even requests detect a"); +b := bat.insert(b, nil:oid, "stealthy decoys nag; furiously"); +b := bat.insert(b, nil:oid, "carefully regular theodolites exce"); +b := bat.insert(b, nil:oid, "blithely unusual pack"); +b := bat.insert(b, nil:oid, "furiously ironic dolphins sleep slyly. carefully special notornis cajole c"); +b := bat.insert(b, nil:oid, "carefully regular accounts "); +b := bat.insert(b, nil:oid, "carefully even packages believe sly"); +b := bat.insert(b, nil:oid, "carefully even dinos sleep blithely. regular, bold deposits"); +b := bat.insert(b, nil:oid, "carefully regular theodolites may believe unu"); +b := bat.insert(b, nil:oid, "regular deposits sleep closely regular, regular packages. carefully si"); +b := bat.insert(b, nil:oid, "blithely ironic accounts lose slyly about the pending, regular accounts"); +b := bat.insert(b, nil:oid, "unusual deposits dazzle furiously blithely regular pinto beans. pending foxes"); +b := bat.insert(b, nil:oid, "carefully ironic deposits are quickly blithely even"); +b := bat.insert(b, nil:oid, "carefully special e"); +b := bat.insert(b, nil:oid, "slyly bold dolphins cajole c"); +b := bat.insert(b, nil:oid, "slyly final accounts among"); +b := bat.insert(b, nil:oid, "special courts wake blithely accordin"); +b := bat.insert(b, nil:oid, "ironic platelets according to the evenly regula"); +b := bat.insert(b, nil:oid, "slyly silent deposits haggle carefully fluffi"); +b := bat.insert(b, nil:oid, "silently even deposits wake about the fluff"); +b := bat.insert(b, nil:oid, "accounts cajole. final, pending dependencies a"); +b := bat.insert(b, nil:oid, "unusual dependencie"); +b := bat.insert(b, nil:oid, "ironic, even attainments cajole closely"); +b := bat.insert(b, nil:oid, "instructions nag slyly. fluffily ironic sau"); +b := bat.insert(b, nil:oid, "carefully express pinto beans serve carefully final as"); +b := bat.insert(b, nil:oid, "fluffily unusual requests al"); +b := bat.insert(b, nil:oid, "furiously enticing accounts cajole sometimes. slyly express plat"); +b := bat.insert(b, nil:oid, "bold dependencies wake furiously regula"); +b := bat.insert(b, nil:oid, "express warhorses wake carefully furiously ironic deposits. c"); +b := bat.insert(b, nil:oid, "silent requests above the furiously even pinto beans sleep bl"); +b := bat.insert(b, nil:oid, "slyly blithe instructions cajole carefully ironic, fina"); +b := bat.insert(b, nil:oid, "carefully dogged excuses use abou"); +b := bat.insert(b, nil:oid, "ironic, final notornis are fluffily across the carefull"); +b := bat.insert(b, nil:oid, "even deposits wake "); +b := bat.insert(b, nil:oid, "theodolites above the furiously regular deposits sleep blithely abo"); +b := bat.insert(b, nil:oid, "deposits haggle carefully after the furiously fi"); +b := bat.insert(b, nil:oid, "unusual, regular requests c"); +b := bat.insert(b, nil:oid, "quickly final accounts use even requests. ironic ac"); +b := bat.insert(b, nil:oid, "blithely express cou"); +b := bat.insert(b, nil:oid, "even, ironic theodolites detect fluffily final instructions-- fi"); +b := bat.insert(b, nil:oid, "asymptotes are special, special requests. spec"); +b := bat.insert(b, nil:oid, "blithely ironic requests boost pending theodolites. even deposits affix fluf"); +b := bat.insert(b, nil:oid, "blithely thin requests along the fluffily regular packages e"); +b := bat.insert(b, nil:oid, "ironic, silent tithes wake carefully until the even theodolites. special"); +b := bat.insert(b, nil:oid, "express requests use always at the unusual deposits. silently final acc"); +b := bat.insert(b, nil:oid, "special dependencies boost furiously. pendin"); +b := bat.insert(b, nil:oid, "final, regular packages nag furiously fluffily f"); +b := bat.insert(b, nil:oid, "regularly ironic grouches against the quickly express p"); +b := bat.insert(b, nil:oid, "ironic packages haggle among the furiously brave deposits. final, final d"); +b := bat.insert(b, nil:oid, "quickly special ideas against the furiously final accounts affix deposits. sl"); +b := bat.insert(b, nil:oid, "final accounts nag fluffily about"); +b := bat.insert(b, nil:oid, "express, regular theodolites wake special instructions. slyly express "); +b := bat.insert(b, nil:oid, "fluffily final ideas use quickly slyly final foxes? fluffily express dolphi"); +b := bat.insert(b, nil:oid, "quickly ruthless instructions cajole "); +b := bat.insert(b, nil:oid, "slyly express excuses d"); +b := bat.insert(b, nil:oid, "pending instructions against the furiously express d"); +b := bat.insert(b, nil:oid, "express requests according to the carefully regular deposits run"); +b := bat.insert(b, nil:oid, "furiously special theodolites wake blith"); +b := bat.insert(b, nil:oid, "regular instructions grow bold, u"); +b := bat.insert(b, nil:oid, "idly ironic deposits must have to haggle deposits. blithel"); +b := bat.insert(b, nil:oid, "doggedly final requests nag carefull"); +b := bat.insert(b, nil:oid, "carefully silent ideas do solve final, express instructions. quickly final p"); +b := bat.insert(b, nil:oid, "quickly silent requests affix sl"); +b := bat.insert(b, nil:oid, "carefully unusual pinto beans lose carefully. even instructions ac"); +b := bat.insert(b, nil:oid, "even, regular instructions"); +b := bat.insert(b, nil:oid, "regular theodolites boost quickly along the ironic, quick realms."); +b := bat.insert(b, nil:oid, "carefully fluffy forges about the express, ir"); +b := bat.insert(b, nil:oid, "regular theodolites was car"); +b := bat.insert(b, nil:oid, "fluffily ironic deposits across the ironically regular ideas are "); +b := bat.insert(b, nil:oid, "regular, regular pinto beans haggle sly"); +b := bat.insert(b, nil:oid, "even ideas haggle excuses? slyly ironic packages wake alongside of the qu"); +b := bat.insert(b, nil:oid, "quickly special packages inside the slyly unusual pain"); +b := bat.insert(b, nil:oid, "carefully even instructio"); +b := bat.insert(b, nil:oid, "fluffily pending theo"); +b := bat.insert(b, nil:oid, "carefully bold theodolites cajole f"); +b := bat.insert(b, nil:oid, "deposits sublate carefully at t"); +b := bat.insert(b, nil:oid, "furiously final foxes are. regular,"); +b := bat.insert(b, nil:oid, "regular packages haggle furiously; idle requests wake carefu"); +b := bat.insert(b, nil:oid, "asymptotes wake silent, silent"); +b := bat.insert(b, nil:oid, "quickly pending instructions unwind furiously theodolites. final package"); +b := bat.insert(b, nil:oid, "blithely even accounts according to the even packag"); +b := bat.insert(b, nil:oid, "accounts wake against the braids. silent accounts snooze slyly blithely ironi"); +b := bat.insert(b, nil:oid, "pending, bold packages boost blithely final package"); +b := bat.insert(b, nil:oid, "blithely even pinto beans against the ironic packages boost qu"); +b := bat.insert(b, nil:oid, "furiously special deposits wake blithely. qu"); +b := bat.insert(b, nil:oid, "excuses boost permanently around the carefully pe"); +b := bat.insert(b, nil:oid, "pending, regular pinto beans after the final, express accounts boost"); +b := bat.insert(b, nil:oid, "quiet, bold ideas a"); +b := bat.insert(b, nil:oid, "accounts sleep quickly slyly bo"); +b := bat.insert(b, nil:oid, "slyly final deposits sublate after the quickly pending deposits"); +b := bat.insert(b, nil:oid, "ironic, even account"); +b := bat.insert(b, nil:oid, "carefully even packages use"); +b := bat.insert(b, nil:oid, "blithely unusual dugouts play quickly along the blithely regular theo"); +b := bat.insert(b, nil:oid, "furiously even requests nag carefully. "); +b := bat.insert(b, nil:oid, "final, express requests sleep permanent requests. spe"); +b := bat.insert(b, nil:oid, "deposits wake regular, ironic instructions. bli"); +b := bat.insert(b, nil:oid, "final foxes nag. regul"); +b := bat.insert(b, nil:oid, "theodolites should n"); +b := bat.insert(b, nil:oid, "furiously even deposits use inside the excuses."); +b := bat.insert(b, nil:oid, "fluffily final accounts after the special, ironic pinto "); +b := bat.insert(b, nil:oid, "even instructions hagg"); +b := bat.insert(b, nil:oid, "final accounts poach carefully. quickly final platelets boost quickly even ide"); +b := bat.insert(b, nil:oid, "ruthlessly ironic packages nag furiously across the slyly regula"); +b := bat.insert(b, nil:oid, "blithely regular as"); +b := bat.insert(b, nil:oid, "bold theodolites sl"); +b := bat.insert(b, nil:oid, "fluffily even deposits run foxes; regular packages afte"); +b := bat.insert(b, nil:oid, "regular, bold asymptotes sleep boldly. carefu"); +b := bat.insert(b, nil:oid, "quickly final foxes across the expre"); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list