Changeset: 8b70394a346b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b70394a346b Modified Files: sql/storage/bat/bat_storage.c sql/storage/bat/bat_table.c Branch: newstorage Log Message:
wokring on bat_table.c code. bug appears when re-login after re-starting a session. diffs (98 lines): 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 @@ -1272,7 +1272,7 @@ static int create_col(sql_trans *tr, sql_column *c) { int ok = LOG_OK; - int type = c->type.type->localtype; + int type = ATOMtype(c->type.type->localtype); sql_delta *bat = c->data; BAT *b; @@ -2372,24 +2372,26 @@ tr_update_tsbats(sql_trans *tr, sql_time bat_destroy(insb); bat_destroy(delb); - /*if(fts) { - oinsb = temp_descriptor(fts->insbid); + /*oinsb = temp_descriptor(fts->insbid); odelb = temp_descriptor(fts->delbid); BATloop(oinsb, p, q) { - int curIns; - curIns = *(int*)Tloc(oinsb, p) * (-1); - + int curIns, curDel; + + curIns = *(int*)Tloc(insb, p) * (-1); if (curIns == tr->btime) - *(int*)Tloc(oinsb,p) = curIns; + *(int*)Tloc(insb, p) = curIns; + + curDel = *(int*)Tloc(delb,p) * (-1); + if (curDel == tr->btime) + *(int*)Tloc(insb, p) = curDel; } - fts->insbid = 0; - fts->delbid = 0; - bat_destroy(oinsb); bat_destroy(odelb); - }*/ + + fts->insbid = 0; + fts->delbid = 0;*/ if(1) { BUN p,q; @@ -2425,7 +2427,7 @@ update_table(sql_trans *tr, sql_table *f if (ft->cleared) { if (store_nr_active == 1) { //(void)store_funcs.clear_del(tr->parent, tt); - (void)store_funcs.clear_timestamps(tr->parent, tt); + //(void)store_funcs.clear_timestamps(tr->parent, tt); for (n = tt->columns.set->h; n; n = n->next) (void)store_funcs.clear_col(tr->parent, n->data); if (tt->idxs.set) diff --git a/sql/storage/bat/bat_table.c b/sql/storage/bat/bat_table.c --- a/sql/storage/bat/bat_table.c +++ b/sql/storage/bat/bat_table.c @@ -60,6 +60,7 @@ delta_full_bat_(sql_trans *tr, sql_colum t = BATsemijoin(b,s); bat_destroy(b); b = t; //t = BATsemijoin(i,s); bat_destroy(i); i = t; t = BATsemijoin(u,s); bat_destroy(u); u = t; + return t; } if (BATcount(u)) { res = BATkdiff(b,u); bat_destroy(b); b = res; @@ -68,12 +69,24 @@ delta_full_bat_(sql_trans *tr, sql_colum } bat_destroy(u); - vbuns = BATnew(TYPE_void, ATOMtype(c->type.type->localtype), BATcount(b)); + vbuns = BATnew(TYPE_void, ATOMtype(b->ttype), BATcount(b)); vbuns->H->seq = 0; vbuns->T->seq = 0; - vbuns->H->revsorted = 0; - vbuns->T->revsorted = 0; - vbuns->T->sorted = 0; + + vbuns->H->nil = 0; + vbuns->T->nil = 0; + //vbuns->H->nonil = b->H->nonil; + vbuns->T->nonil = b->T->nonil; + + vbuns->H->revsorted = b->H->revsorted; + vbuns->T->revsorted = b->T->revsorted; + vbuns->H->sorted = b->H->sorted; + vbuns->T->sorted = b->T->sorted; + vbuns->H->key = b->H->key; + vbuns->T->key = b->T->key; + //vbuns->H->dense = b->H->dense; + vbuns->T->dense = FALSE; + ip = (int *) Tloc(ins, BUNfirst(ins)); dp = (int *) Tloc(del, BUNfirst(del)); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list