Changeset: 01b915119119 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=01b915119119 Modified Files: gdk/gdk_heap.c gdk/gdk_storage.c sql/storage/bat/bat_storage.c sql/storage/store.c Branch: default Log Message:
Merge with Nov2019 diffs (137 lines): diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -61,7 +61,7 @@ HEAPcreatefile(int farmid, size_t *maxsz fn = path; } /* round up to mulitple of GDK_mmap_pagesize */ - fd = GDKfdlocate(NOFARM, fn, "wxb", NULL); + fd = GDKfdlocate(NOFARM, fn, "wb", NULL); if (fd >= 0) { close(fd); base = GDKload(NOFARM, fn, NULL, *maxsz, maxsz, STORE_MMAP); @@ -417,7 +417,7 @@ GDKupgradevarheap(BAT *b, var_t v, bool const char *base = b->theap.base; /* first save heap in file with extra .tmp extension */ - if ((fd = GDKfdlocate(b->theap.farmid, b->theap.filename, "wxb", "tmp")) < 0) + if ((fd = GDKfdlocate(b->theap.farmid, b->theap.filename, "wb", "tmp")) < 0) return GDK_FAIL; while (size > 0) { ret = write(fd, base, (unsigned) MIN(1 << 30, size)); diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -212,8 +212,6 @@ GDKfdlocate(int farmid, const char *nme, if (strchr(mode, 'w')) { flags |= O_WRONLY | O_CREAT; - if (strchr(mode, 'x')) - flags |= O_EXCL; } else if (!strchr(mode, '+')) { flags |= O_RDONLY; } else { 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 @@ -42,7 +42,6 @@ timestamp_dbat( sql_dbat *d, int ts) return d; } - static BAT * delta_bind_del(sql_dbat *bat, int access) { @@ -1539,7 +1538,6 @@ log_create_col(sql_trans *tr, sql_column return log_create_delta( c->data, c->t->bootstrap?0:LOG_COL, c->base.id); } - static int snapshot_create_col(sql_trans *tr, sql_column *c) { @@ -1656,7 +1654,6 @@ load_dbat(sql_dbat *bat, int bid) } } - static int create_del(sql_trans *tr, sql_table *t) { @@ -2246,7 +2243,6 @@ gtr_update_dbat(sql_trans *tr, sql_dbat return ok; } - static int gtr_update_table(sql_trans *tr, sql_table *t, int *tchanges) { @@ -2795,17 +2791,17 @@ update_table(sql_trans *tr, sql_table *f oc->null = cc->null; oc->unique = cc->unique; if (cc->storage_type && (!oc->storage_type || strcmp(cc->storage_type, oc->storage_type) != 0)) - oc->storage_type = sa_strdup(tr->sa, cc->storage_type); + oc->storage_type = sa_strdup(tr->parent->sa, cc->storage_type); if (!cc->storage_type) oc->storage_type = NULL; if (cc->def && (!oc->def || strcmp(cc->def, oc->def) != 0)) - oc->def = sa_strdup(tr->sa, cc->def); + oc->def = sa_strdup(tr->parent->sa, cc->def); if (!cc->def) oc->def = NULL; if (isRenamed(cc)) { /* apply possible renaming */ list_hash_delete(oc->t->columns.set, oc, NULL); - oc->base.name = sa_strdup(tr->sa, cc->base.name); + oc->base.name = sa_strdup(tr->parent->sa, cc->base.name); if (!list_hash_add(oc->t->columns.set, oc, NULL)) ok = LOG_ERR; setRenamedFlag(oc); /* propagate the change to the upper transaction */ diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -4176,7 +4176,7 @@ rollforward_update_table(sql_trans *tr, if (ok == LOG_OK && isRenamed(ft)) { /* apply possible renaming */ list_hash_delete(tt->s->tables.set, tt, NULL); - tt->base.name = sa_strdup(tr->sa, ft->base.name); + tt->base.name = sa_strdup(tr->parent->sa, ft->base.name); if (!list_hash_add(tt->s->tables.set, tt, NULL)) ok = LOG_ERR; setRenamedFlag(tt); /* propagate the change to the upper transaction */ @@ -4266,7 +4266,7 @@ rollforward_update_schema(sql_trans *tr, if (apply && ok == LOG_OK && isRenamed(fs)) { /* apply possible renaming */ list_hash_delete(tr->schemas.set, ts, NULL); - ts->base.name = sa_strdup(tr->sa, fs->base.name); + ts->base.name = sa_strdup(tr->parent->sa, fs->base.name); if (!list_hash_add(tr->schemas.set, ts, NULL)) ok = LOG_ERR; setRenamedFlag(ts); /* propagate the change to the upper transaction */ @@ -4464,7 +4464,7 @@ reset_column(sql_trans *tr, sql_column * /* apply possible renaming -> transaction rollbacks or when it starts, inherit from the previous transaction */ if ((tr->status == 1 && isRenamed(fc)) || isRenamed(pfc)) { list_hash_delete(fc->t->columns.set, fc, NULL); - fc->base.name = sa_strdup(tr->sa, pfc->base.name); + fc->base.name = sa_strdup(tr->parent->sa, pfc->base.name); if (!list_hash_add(fc->t->columns.set, fc, NULL)) return LOG_ERR; } @@ -4531,7 +4531,7 @@ reset_table(sql_trans *tr, sql_table *ft /* apply possible renaming -> transaction rollbacks or when it starts, inherit from the previous transaction */ if ((tr->status == 1 && isRenamed(ft)) || isRenamed(pft)) { list_hash_delete(ft->s->tables.set, ft, NULL); - ft->base.name = sa_strdup(tr->sa, pft->base.name); + ft->base.name = sa_strdup(tr->parent->sa, pft->base.name); if (!list_hash_add(ft->s->tables.set, ft, NULL)) ok = LOG_ERR; } @@ -4590,7 +4590,7 @@ reset_schema(sql_trans *tr, sql_schema * /* apply possible renaming -> transaction rollbacks or when it starts, inherit from the previous transaction */ if ((tr->status == 1 && isRenamed(fs)) || isRenamed(pfs)) { list_hash_delete(tr->schemas.set, fs, NULL); - fs->base.name = sa_strdup(tr->sa, pfs->base.name); + fs->base.name = sa_strdup(tr->parent->sa, pfs->base.name); if (!list_hash_add(tr->schemas.set, fs, NULL)) ok = LOG_ERR; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list