Changeset: a285247b8f85 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a285247b8f85 Modified Files: sql/backends/monet5/sql.c sql/backends/monet5/sql.h sql/backends/monet5/sql.mal Branch: leftmart Log Message:
removed sql level direct call to create orderidx diffs (77 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -4527,48 +4527,6 @@ SQLargRecord(Client cntxt, MalBlkPtr mb, return MAL_SUCCEED; } -/* Experimental code for dealing with oid indices */ -str -SQLorderidx(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) -{ - str *sch = getArgReference_str(stk, pci, 1); - str *tbl = getArgReference_str(stk, pci, 2); - str *col = getArgReference_str(stk, pci, 3); - sql_trans *tr; - sql_schema *s; - sql_table *t; - sql_column *c; - mvc *m = NULL; - BAT *b; - str msg = MAL_SUCCEED; - - if ((msg = getSQLContext(cntxt, mb, &m, NULL)) != NULL) - return msg; - if ((msg = checkSQLContext(cntxt)) != NULL) - return msg; - s = mvc_bind_schema(m, *sch); - if (s == NULL) - throw(SQL, "sql.orderidx", "3F000!Schema missing"); - t = mvc_bind_table(m, s, *tbl); - if (t == NULL) - throw(SQL, "sql.orderidx", "42S02!Table missing"); - c = mvc_bind_column(m, t, *col); - if (c == NULL) - throw(SQL, "sql.orderidx", "42S02!Column missing"); - tr = m->session->tr; - t->base.wtime = s->base.wtime = tr->wtime = tr->wstime; - t->base.rtime = s->base.rtime = tr->rtime = tr->stime; - mnstr_printf(cntxt->fdout, "#About to create the oid index on %s.%s.%s\n", *sch, *tbl, *col); - b = store_funcs.bind_col(tr, c, RDONLY); - if (b == NULL) - throw(SQL,"sql.orderidx","Can not access descriptor"); - msg = OIDXcreateImplementation(cntxt,newBatType(TYPE_oid, b->ttype), b, -1); - /* b->dirty should be set here, right? the bat descriptor has changed */ - /* b->torderidx.o is the index bat */ - BBPunfix(b->batCacheid); - return msg; -} - /* * Vacuum cleaning tables * Shrinking and re-using space to vacuum clean the holes in the relations. diff --git a/sql/backends/monet5/sql.h b/sql/backends/monet5/sql.h --- a/sql/backends/monet5/sql.h +++ b/sql/backends/monet5/sql.h @@ -133,7 +133,6 @@ sql5_export str SQLdrop_hash(Client cntx sql5_export str SQLnewDictionary(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); sql5_export str SQLdropDictionary(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); sql5_export str SQLargRecord(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); -sql5_export str SQLorderidx(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); sql5_export str SQLoptimizersUpdate(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); sql5_export str month_interval_str(int *ret, const str *s, const int *ek, const int *sk); sql5_export str second_interval_str(lng *res, const str *s, const int *ek, const int *sk); diff --git a/sql/backends/monet5/sql.mal b/sql/backends/monet5/sql.mal --- a/sql/backends/monet5/sql.mal +++ b/sql/backends/monet5/sql.mal @@ -593,10 +593,6 @@ command batcalc.hash( b:bat[:oid,:any_1] pattern calc.rotate_xor_hash(h:wrd, nbits:int, v:any_1) :wrd address MKEYrotate_xor_hash; command batcalc.rotate_xor_hash(h:bat[:oid,:wrd], nbits:int, b:bat[:oid,:any_1]) :bat[:oid,:int] address MKEYbulk_rotate_xor_hash; -pattern orderidx(sch:str,tab:str,col:str) -address SQLorderidx -comment "Create an ordered oid index on a particular column"; - command sql.dec_round( v:bte, r:bte ) :bte address bte_dec_round_wrap comment "round off the value v to nearests multiple of r"; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list