Changeset: e4e0262bd167 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e4e0262bd167 Branch: default Log Message:
merged diffs (217 lines): diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c --- a/monetdb5/optimizer/opt_pipes.c +++ b/monetdb5/optimizer/opt_pipes.c @@ -34,7 +34,6 @@ static struct pipeline { char *name; - const char *status; /* "stable" or "experimental" */ char **def; /* NULL terminated list of optimizers */ bool builtin; } pipes[MAXOPTPIPES] = { @@ -45,7 +44,6 @@ static struct pipeline { * (see tools/mserver/mserver5.1) accordingly! */ {"minimal_pipe", - "stable", (char *[]) { "inline", "remap", @@ -55,14 +53,13 @@ static struct pipeline { "dict", "multiplex", "generator", + "profiler", "garbageCollector", - "profiler", NULL, }, true, }, {"minimal_fast", - "stable", (char *[]) { "minimalfast", NULL, @@ -75,7 +72,6 @@ static struct pipeline { * tools/mserver/mserver5.1) accordingly! */ {"default_pipe", - "stable", (char *[]) { "inline", "remap", @@ -105,14 +101,13 @@ static struct pipeline { "candidates", "deadcode", "postfix", + "profiler", "garbageCollector", - "profiler", NULL, }, true, }, {"default_fast", - "stable", (char *[]) { "defaultfast", NULL, @@ -130,7 +125,6 @@ static struct pipeline { * (see tools/mserver/mserver5.1) accordingly! */ {"no_mitosis_pipe", - "stable", (char *[]) { "inline", "remap", @@ -157,8 +151,8 @@ static struct pipeline { "candidates", "deadcode", "postfix", + "profiler", "garbageCollector", - "profiler", NULL, }, true, @@ -174,7 +168,6 @@ static struct pipeline { * (see tools/mserver/mserver5.1) accordingly! */ {"sequential_pipe", - "stable", (char *[]) { "inline", "remap", @@ -202,8 +195,8 @@ static struct pipeline { "candidates", "deadcode", "postfix", + "profiler", "garbageCollector", - "profiler", NULL, }, true, @@ -213,7 +206,7 @@ static struct pipeline { * settings! */ /* sentinel */ - {NULL, NULL, NULL, false, }, + {NULL, NULL, false, }, }; #include "optimizer_private.h" @@ -239,6 +232,8 @@ validatePipe(struct pipeline *pipe) for (i = 0; pipe->def[i]; i++) { const char *fname = pipe->def[i]; + if (garbage) + throw(MAL, "optimizer.validate", SQLSTATE(42000) "'garbageCollector' should be used as the last one\n"); if (strcmp(fname, "deadcode") == 0) deadcode = true; else if (strcmp(fname, "remap") == 0) @@ -301,7 +296,6 @@ addPipeDefinition(Client cntxt, const ch oldpipe = pipes[i]; pipes[i] = (struct pipeline) { .name = GDKstrdup(name), - .status = "experimental", }; if(pipes[i].name == NULL) goto bailout; @@ -413,7 +407,7 @@ getPipeCatalog(bat *nme, bat *def, bat * } if (BUNappend(b, pipes[i].name, false) != GDK_SUCCEED || BUNappend(bn, buf, false) != GDK_SUCCEED || - BUNappend(bs, pipes[i].status, false) != GDK_SUCCEED) { + BUNappend(bs, pipes[i].builtin ? "stable" : "experimental", false) != GDK_SUCCEED) { BBPreclaim(b); BBPreclaim(bn); BBPreclaim(bs); 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 @@ -157,7 +157,7 @@ static int return -1; } symbackup = c->curprg; - memcpy(&bebackup, be, sizeof(backend)); /* backup current backend */ + bebackup = *be; /* backup current backend */ backend_reset(be); int nargs; @@ -289,7 +289,7 @@ cleanup: else SQLremoveQueryFromCache(c); } - memcpy(be, &bebackup, sizeof(backend)); + *be = bebackup; c->curprg = symbackup; return res; } @@ -1103,7 +1103,7 @@ backend_dumpproc(backend *be, Client c, const char *sql_private_module = putName(sql_private_module_name); symbackup = c->curprg; - memcpy(&bebackup, be, sizeof(backend)); /* backup current backend */ + bebackup = *be; /* backup current backend */ backend_reset(be); if (m->params) @@ -1180,7 +1180,7 @@ cleanup: else SQLremoveQueryFromCache(c); } - memcpy(be, &bebackup, sizeof(backend)); + *be = bebackup; c->curprg = symbackup; return res; } @@ -1466,7 +1466,7 @@ backend_create_sql_func(backend *be, sql (void) snprintf(befname, IDLENGTH, "f_" LLFMT, store_function_counter(m->store)); TRC_INFO(SQL_PARSER, "Mapping SQL name '%s' to MAL name '%s'\n", f->base.name, befname); symbackup = c->curprg; - memcpy(&bebackup, be, sizeof(backend)); /* backup current backend */ + bebackup = *be; /* backup current backend */ backend_reset(be); nargs = (f->res && f->type == F_UNION ? list_length(f->res) : 1) + (f->vararg && ops ? list_length(ops) : f->ops ? list_length(f->ops) : 0); @@ -1621,7 +1621,7 @@ cleanup: } _DELETE(fimp); } - memcpy(be, &bebackup, sizeof(backend)); + *be = bebackup; c->curprg = symbackup; return res; } diff --git a/sql/test/Tests/setoptimizer.test b/sql/test/Tests/setoptimizer.test --- a/sql/test/Tests/setoptimizer.test +++ b/sql/test/Tests/setoptimizer.test @@ -29,22 +29,22 @@ query TTT nosort select * from optimizers() ---- minimal_pipe -optimizer.inline();optimizer.remap();optimizer.emptybind();optimizer.deadcode();optimizer.for();optimizer.dict();optimizer.multiplex();optimizer.generator();optimizer.garbageCollector();optimizer.profiler(); +optimizer.inline();optimizer.remap();optimizer.emptybind();optimizer.deadcode();optimizer.for();optimizer.dict();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.garbageCollector(); stable minimal_fast optimizer.minimalfast(); stable default_pipe -optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.deadcode();optimizer.pushselect();optimizer.aliases();optimizer.for();optimizer.dict();optimizer.mitosis();optimizer.mergetable();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.matpack();optimizer.reorder();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.garbageCollector();optimizer.profiler(); +optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.deadcode();optimizer.pushselect();optimizer.aliases();optimizer.for();optimizer.dict();optimizer.mitosis();optimizer.mergetable();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.matpack();optimizer.reorder();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.profiler();optimizer.garbageCollector(); stable default_fast optimizer.defaultfast(); stable no_mitosis_pipe -optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.deadcode();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.matpack();optimizer.reorder();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.garbageCollector();optimizer.profiler(); +optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.deadcode();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.matpack();optimizer.reorder();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.profiler();optimizer.garbageCollector(); stable sequential_pipe -optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.deadcode();optimizer.pushselect();optimizer.aliases();optimizer.for();optimizer.dict();optimizer.mergetable();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.matpack();optimizer.reorder();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.garbageCollector();optimizer.profiler(); +optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.deadcode();optimizer.pushselect();optimizer.aliases();optimizer.for();optimizer.dict();optimizer.mergetable();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.matpack();optimizer.reorder();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.profiler();optimizer.garbageCollector(); stable statement ok _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org