Update of /cvsroot/monetdb/sql/src/storage/restrict
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19756/src/storage/restrict
Modified Files:
restrict_storage.mx
Log Message:
the relational version now does use the hash indices on selects
U restrict_storage.mx
Index: restrict_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/restrict/restrict_storage.mx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- restrict_storage.mx 14 May 2008 20:03:20 -0000 1.3
+++ restrict_storage.mx 14 May 2008 20:18:30 -0000 1.4
@@ -11,7 +11,7 @@
@' The Original Code is the MonetDB Database System.
@'
@' The Initial Developer of the Original Code is CWI.
-@' Portions created by CWI are Copyright (C) 1997-2007 CWI.
+@' Portions created by CWI are Copyright (C) 1997-2008 CWI.
@' All Rights Reserved.
@f restrict_storage
@@ -49,33 +49,35 @@
bind_col(sql_trans *tr, sql_column *c, int access)
{
sql_bat *bat = c->data;
- BAT *b = temp_descriptor(bat->bid);
+ BAT *b;
- assert(b);
- bat_set_access(b, BAT_READ);
- b->batDirty |= 2;
- c->base.rtime = c->t->base.rtime = c->t->s->base.rtime = tr->rtime =
tr->stime;
#ifdef NDEBUG
(void) access; /* satisfy compiler */
#endif
assert(access != RD_UPD && access != RD_INS);
+ b = temp_descriptor(bat->bid);
+ assert(b);
+ bat_set_access(b, BAT_READ);
+ b->batDirty |= 2;
+ c->base.rtime = c->t->base.rtime = c->t->s->base.rtime = tr->rtime =
tr->stime;
return b;
}
static BAT *
bind_idx(sql_trans *tr, sql_idx * i, int access)
{
+ BAT *b;
sql_bat *bat = i->data;
- BAT *b = temp_descriptor(bat->bid);
- assert(b);
- bat_set_access(b, BAT_READ);
- b->batDirty |= 2;
- i->base.rtime = i->t->base.rtime = i->t->s->base.rtime = tr->rtime =
tr->stime;
#ifdef NDEBUG
(void) access; /* satisfy compiler */
#endif
assert(access != RD_UPD && access != RD_INS);
+ b = temp_descriptor(bat->bid);
+ assert(b);
+ bat_set_access(b, BAT_READ);
+ b->batDirty |= 2;
+ i->base.rtime = i->t->base.rtime = i->t->s->base.rtime = tr->rtime =
tr->stime;
return b;
}
@@ -118,6 +120,7 @@
bat_destroy(u);
bat_destroy(r);
}
+ b->batDirty |= 2;
void_replace_bat(b, upd, TRUE);
bat_destroy(b);
}
@@ -362,7 +365,7 @@
bat_destroy(b);
}
}
- if (ni->type == unique &&
+ if (ni->type == hash_idx &&
ni->key != NULL && list_length(ni->key->columns)==1) {
sql_kc *c = ni->columns->h->data;
BAT *b = bind_col(tr->parent, c->c, RDONLY);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins