Changeset: 3bf48c07e37d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3bf48c07e37d
Modified Files:
sql/backends/monet5/sql_optimizer.c
sql/backends/monet5/sql_scenario.c
Branch: data-vaults
Log Message:
Merge with default
diffs (75 lines):
diff --git a/sql/backends/monet5/sql_optimizer.c
b/sql/backends/monet5/sql_optimizer.c
--- a/sql/backends/monet5/sql_optimizer.c
+++ b/sql/backends/monet5/sql_optimizer.c
@@ -128,16 +128,36 @@ addOptimizers(Client c, MalBlkPtr mb, ch
addtoMalBlkHistory(mb, "getStatistics");
}
+static str
+sqlJIToptimizer(Client c, MalBlkPtr mb, backend *be)
+{
+ str msg;
+ str pipe = getSQLoptimizer(be->mvc);
+
+ addOptimizers(c, mb, pipe);
+ msg = optimizeMALBlock(c, mb);
+ if (msg)
+ return msg;
+
+ /* time to execute the optimizers */
+ if (c->debug)
+ optimizerCheck(c, mb, "sql.baseline", -1, 0);
+#ifdef _SQL_OPTIMIZER_DEBUG
+ mnstr_printf(GDKout, "End Optimize Query\n");
+ printFunction(GDKout, mb, 0, LIST_MAL_ALL);
+#endif
+ return MAL_SUCCEED;
+}
+
str
optimizeQuery(Client c)
{
MalBlkPtr mb;
backend *be;
- str msg = 0, pipe;
+ str msg = 0;
be = (backend *) c->sqlcontext;
assert(be && be->mvc); /* SQL clients should always have their state
set */
- pipe = getSQLoptimizer(be->mvc);
trimMalBlk(c->curprg->def);
c->blkmode = 0;
@@ -164,19 +184,7 @@ optimizeQuery(Client c)
}
return NULL;
}
- addOptimizers(c, mb, pipe);
- msg = optimizeMALBlock(c, mb);
- if (msg)
- return msg;
-
- /* time to execute the optimizers */
- if (c->debug)
- optimizerCheck(c, mb, "sql.baseline", -1, 0);
-#ifdef _SQL_OPTIMIZER_DEBUG
- mnstr_printf(GDKout, "End Optimize Query\n");
- printFunction(GDKout, mb, 0, LIST_MAL_ALL);
-#endif
- return NULL;
+ return sqlJIToptimizer(c,mb,be);
}
void
diff --git a/sql/backends/monet5/sql_scenario.c
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1315,7 +1315,7 @@ recompilequery:
MSresetInstructions(c->curprg->def, oldstop);
freeVariables(c, c->curprg->def, c->glb, oldvtop);
c->curprg->def->errors = 0;
- msg = createException(PARSE, "SQLparser", "Semantic
errors");
+ msg = createException(PARSE, "SQLparser",
"M0M27!Semantic errors");
}
}
finalize:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list