Changeset: 8e9408b32251 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8e9408b32251
Modified Files:
sql/include/sql_catalog.h
sql/storage/sql_catalog.c
sql/storage/store.c
Branch: tempscs2os
Log Message:
rename _localtmps back to localtmps
diffs (166 lines):
diff --git a/sql/include/sql_catalog.h b/sql/include/sql_catalog.h
--- a/sql/include/sql_catalog.h
+++ b/sql/include/sql_catalog.h
@@ -324,7 +324,7 @@ typedef struct sql_trans {
sql_catalog *cat;
sql_schema *tmp; /* each session has its own tmp schema */
- struct objectset* _localtmps;
+ struct objectset* localtmps;
sql_allocator *sa; /* transaction allocator */
struct sql_trans *parent; /* multilevel transaction support */
diff --git a/sql/storage/sql_catalog.c b/sql/storage/sql_catalog.c
--- a/sql/storage/sql_catalog.c
+++ b/sql/storage/sql_catalog.c
@@ -142,7 +142,7 @@ schema_find_key(sql_trans *tr, sql_schem
if (!b && tr->tmp == s) {
struct os_iter oi;
- os_iterator(&oi, tr->_localtmps, tr, NULL);
+ os_iterator(&oi, tr->localtmps, tr, NULL);
for(sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) {
sql_table *t = (sql_table *) b;
sql_key *o = find_sql_key(t, name);
@@ -183,7 +183,7 @@ schema_find_idx(sql_trans *tr, sql_schem
if (!b && tr->tmp == s) {
struct os_iter oi;
- os_iterator(&oi, tr->_localtmps, tr, NULL);
+ os_iterator(&oi, tr->localtmps, tr, NULL);
for(sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) {
sql_table *t = (sql_table *) b;
sql_idx *o = find_sql_idx(t, name);
@@ -201,7 +201,7 @@ schema_find_idx_id(sql_trans *tr, sql_sc
if (!b && tr->tmp == s) {
struct os_iter oi;
- os_iterator(&oi, tr->_localtmps, tr, NULL);
+ os_iterator(&oi, tr->localtmps, tr, NULL);
for(sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) {
sql_table *t = (sql_table *) b;
node *o = ol_find_id(t->idxs, id);
@@ -228,14 +228,14 @@ find_sql_table(sql_trans *tr, sql_schema
sql_table *t = (sql_table*)os_find_name(s->tables, tr, tname);
if (!t && tr->tmp == s) {
- t = (sql_table*) os_find_name(tr->_localtmps, tr, tname);
+ t = (sql_table*) os_find_name(tr->localtmps, tr, tname);
return t;
}
if (t && isTempTable(t) && tr->tmp == s) {
assert(isGlobal(t));
- sql_table* lt = (sql_table*) os_find_name(tr->_localtmps, tr,
tname);
+ sql_table* lt = (sql_table*) os_find_name(tr->localtmps, tr,
tname);
if (lt)
return lt;
@@ -251,14 +251,14 @@ find_sql_table_id(sql_trans *tr, sql_sch
{
sql_table *t = (sql_table*)os_find_id(s->tables, tr, id);
if (!t && tr->tmp == s) {
- t = (sql_table*) os_find_id(tr->_localtmps, tr, id);
+ t = (sql_table*) os_find_id(tr->localtmps, tr, id);
return t;
}
if (t && isTempTable(t) && tr->tmp == s) {
assert(isGlobal(t));
- sql_table* lt = (sql_table*) os_find_id(tr->_localtmps, tr, id);
+ sql_table* lt = (sql_table*) os_find_id(tr->localtmps, tr, id);
if (lt)
return lt;
@@ -390,7 +390,7 @@ schema_find_trigger(sql_trans *tr, sql_s
if (!b && tr->tmp == s) {
struct os_iter oi;
- os_iterator(&oi, tr->_localtmps, tr, NULL);
+ os_iterator(&oi, tr->localtmps, tr, NULL);
for(sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) {
sql_table *t = (sql_table *) b;
sql_trigger *o = find_sql_trigger(t, name);
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -3074,7 +3074,7 @@ table_dup(sql_trans *tr, sql_table *ot,
t->sz = ot->sz;
ATOMIC_PTR_INIT(&t->data, NULL);
- if ((res = os_add(isLocalTemp(t) ? tr->_localtmps : t->s->tables, tr,
t->base.name, &t->base)))
+ if ((res = os_add(isLocalTemp(t) ? tr->localtmps : t->s->tables, tr,
t->base.name, &t->base)))
goto cleanup;
if (isPartitionedByExpressionTable(ot)) {
@@ -3587,7 +3587,7 @@ sql_trans_rollback(sql_trans *tr, bool c
sqlstore *store = tr->store;
if (!list_empty(tr->changes)) {
struct os_iter oi;
- os_iterator(&oi, tr->_localtmps, tr, NULL);
+ os_iterator(&oi, tr->localtmps, tr, NULL);
for(sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) {
sql_table *t = (sql_table *) b;
if (t->commit_action == CA_DROP && !b->deleted) {
@@ -3667,7 +3667,7 @@ sql_trans_destroy(sql_trans *tr)
if (!list_empty(tr->changes))
sql_trans_rollback(tr, false);
sqlstore *store = tr->store;
- os_destroy(tr->_localtmps, store);
+ os_destroy(tr->localtmps, store);
store_lock(store);
store_unlock(store);
MT_lock_destroy(&tr->lock);
@@ -3696,10 +3696,10 @@ sql_trans_create_(sqlstore *store, sql_t
}
if (!parent) {
- tr->_localtmps = os_new(tr->sa, (destroy_fptr) &table_destroy,
true, true, false, store);
+ tr->localtmps = os_new(tr->sa, (destroy_fptr) &table_destroy,
true, true, false, store);
}
else {
- tr->_localtmps = os_dup(parent->_localtmps);
+ tr->localtmps = os_dup(parent->localtmps);
}
store_lock(store);
@@ -3870,7 +3870,7 @@ sql_trans_commit(sql_trans *tr)
if (!list_empty(tr->changes)) {
struct os_iter oi;
- os_iterator(&oi, tr->_localtmps, tr, NULL);
+ os_iterator(&oi, tr->localtmps, tr, NULL);
for(sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) {
sql_table *t = (sql_table *) b;
if (t->commit_action == CA_DROP && !b->deleted) {
@@ -5553,8 +5553,8 @@ sql_trans_rename_table(sql_trans *tr, sq
return res;
} else {
assert(isTempTable(t));
- sql_base *b = os_find_id(tr->_localtmps, tr, t->base.id);
- if ((res = os_del(tr->_localtmps, tr, b->name, dup_base(b))))
+ sql_base *b = os_find_id(tr->localtmps, tr, t->base.id);
+ if ((res = os_del(tr->localtmps, tr, b->name, dup_base(b))))
return res;
}
@@ -5640,7 +5640,7 @@ sql_trans_create_table(sql_table **tres,
if (sz < 0)
t->sz = COLSIZE;
- if ((res = os_add(isGlobal(t)?s->tables:tr->_localtmps, tr,
t->base.name, &t->base)))
+ if ((res = os_add(isGlobal(t)?s->tables:tr->localtmps, tr,
t->base.name, &t->base)))
return res;
if (isUnloggedTable(t))
@@ -5880,7 +5880,7 @@ sql_trans_drop_table(sql_trans *tr, sql_
if (gt && (res = os_del(s->tables, tr, gt->base.name,
dup_base(>->base))))
return res;
- if (t != gt && (res =os_del(tr->_localtmps, tr, t->base.name,
dup_base(&t->base))))
+ if (t != gt && (res =os_del(tr->localtmps, tr, t->base.name,
dup_base(&t->base))))
return res;
sqlstore *store = tr->store;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]