Changeset: aa2346fd7ad3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa2346fd7ad3
Modified Files:
monetdb5/mal/Tests/tst161.stable.err
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_parser.c
monetdb5/mal/mal_resolve.c
monetdb5/modules/atoms/xml.c
monetdb5/modules/mal/wlc.c
monetdb5/optimizer/opt_evaluate.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_remap.c
monetdb5/optimizer/opt_remoteQueries.c
sql/backends/monet5/sql_statement.c
sql/storage/bat/bat_storage.c
Branch: gdk_tracer
Log Message:
merged with default
diffs (124 lines):
diff --git a/monetdb5/mal/Tests/tst161.stable.err
b/monetdb5/mal/Tests/tst161.stable.err
--- a/monetdb5/mal/Tests/tst161.stable.err
+++ b/monetdb5/mal/Tests/tst161.stable.err
@@ -42,7 +42,6 @@ QUERY = # testing definition of new atom
z:= mytype.l();
io.print(z);
ERROR = !TypeException:mytype.l[0]:constant coercion error from int to mytype
- !TypeException:mytype.l[0]:improper variable id
# 13:20:34 >
# 13:20:34 > "Done."
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -876,7 +876,7 @@ term(Client cntxt, MalBlkPtr curBlk, Ins
setVarUDFtype(curBlk, cstidx);
} else {
cstidx = defConstant(curBlk, tpe, &cst);
- if( cstidx < 0)
+ if (cstidx < 0)
return 3;
setPolymorphic(*curInstr, tpe, FALSE);
setVarUDFtype(curBlk, cstidx);
@@ -884,7 +884,7 @@ term(Client cntxt, MalBlkPtr curBlk, Ins
}
} else if (cst.vtype != getVarType(curBlk, cstidx)) {
cstidx = defConstant(curBlk, cst.vtype, &cst);
- if( cstidx < 0)
+ if (cstidx < 0)
return 3;
setPolymorphic(*curInstr, cst.vtype, FALSE);
free = 0;
@@ -901,12 +901,12 @@ term(Client cntxt, MalBlkPtr curBlk, Ins
if (tpe < 0)
return 3;
cstidx = defConstant(curBlk, tpe, &cst);
- if( cstidx >=0){
- setPolymorphic(*curInstr, tpe, FALSE);
- if (flag)
- setVarUDFtype(curBlk, cstidx);
- *curInstr = pushArgument(curBlk, *curInstr,
cstidx);
- }
+ if (cstidx < 0)
+ return 3;
+ setPolymorphic(*curInstr, tpe, FALSE);
+ if (flag)
+ setVarUDFtype(curBlk, cstidx);
+ *curInstr = pushArgument(curBlk, *curInstr, cstidx);
return ret;
}
} else if ((i = idLength(cntxt))) {
@@ -1763,7 +1763,7 @@ part3:
void
parseMAL(Client cntxt, Symbol curPrg, int skipcomments, int lines)
{
- int cntrl = 0, k;
+ int cntrl = 0;
/*Symbol curPrg= cntxt->curprg;*/
char c;
int inlineProp =0, unsafeProp = 0, sealedProp = 0;
@@ -1818,12 +1818,14 @@ parseMAL(Client cntxt, Symbol curPrg, in
freeInstruction(curInstr);
continue;
}
- k = defConstant(curBlk, TYPE_str, &cst);
- if( k >= 0){
- getArg(curInstr, 0) = k;
- clrVarConstant(curBlk, getArg(curInstr,
0));
- setVarDisabled(curBlk, getArg(curInstr,
0));
+ int cstidx = defConstant(curBlk, TYPE_str,
&cst);
+ if (cstidx < 0) {
+ freeInstruction(curInstr);
+ continue;
}
+ getArg(curInstr, 0) = cstidx;
+ clrVarConstant(curBlk, getArg(curInstr, 0));
+ setVarDisabled(curBlk, getArg(curInstr, 0));
pushInstruction(curBlk, curInstr);
}
echoInput(cntxt);
diff --git a/monetdb5/modules/atoms/xml.c b/monetdb5/modules/atoms/xml.c
--- a/monetdb5/modules/atoms/xml.c
+++ b/monetdb5/modules/atoms/xml.c
@@ -820,5 +820,9 @@ str XMLprelude(void *ret) {
(void) ret;
return MAL_SUCCEED; /* to not break init */
}
+str XMLepilogue(void *ret) {
+ (void)ret;
+ return MAL_SUCCEED;
+}
#endif
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -2087,7 +2087,8 @@ clear_dbat(sql_trans *tr, sql_dbat *bat)
}
if (bat->dbid) {
BAT *b = temp_descriptor(bat->dbid);
- if(b && !isEbat(b)) {
+
+ if (b && !isEbat(b)) {
sz += BATcount(b);
bat_clear(b);
BATcommit(b);
@@ -2927,7 +2928,7 @@ tr_log_delta( sql_trans *tr, sql_delta *
cbat->ibase ||
BATcount(ins) <= SNAPSHOT_MINSIZE))
ok = log_bat(bat_logger, ins, cbat->name, tpe, id);
- if (ok == GDK_SUCCEED && ATOMIC_GET(&store_nr_active) == 1 &&
+ if (ok == GDK_SUCCEED &&
!cbat->ibase && BATcount(ins) > SNAPSHOT_MINSIZE) {
/* log new snapshot */
if ((ok = logger_add_bat(bat_logger, ins, cbat->name,
tpe, id)) == GDK_SUCCEED)
@@ -3060,7 +3061,7 @@ tr_snapshot_bat( sql_trans *tr, sql_delt
assert(ATOMIC_GET(&store_nr_active)>0);
(void)tr;
- if (ATOMIC_GET(&store_nr_active) == 1 && !cbat->ibase && cbat->cnt >
SNAPSHOT_MINSIZE) {
+ if (!cbat->ibase && cbat->cnt > SNAPSHOT_MINSIZE) {
BAT *ins = temp_descriptor(cbat->ibid);
if(ins) {
/* any inserts */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list