Changeset: 9421de86bc91 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9421de86bc91
Removed Files:
sql/storage/restrict/restrict_logger.c
sql/storage/restrict/restrict_logger.h
sql/storage/restrict/restrict_storage.c
sql/storage/restrict/restrict_storage.h
sql/storage/restrict/restrict_table.c
sql/storage/restrict/restrict_table.h
Modified Files:
sql/backends/monet5/Makefile.ag
Branch: default
Log Message:
cleanup of restricted (was allready disabled)
diffs (truncated from 1631 to 300 lines):
diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag
--- a/sql/backends/monet5/Makefile.ag
+++ b/sql/backends/monet5/Makefile.ag
@@ -68,7 +68,6 @@ lib__sql = {
# LIBS = ../../server/libsqlserver \
# ../../storage/libstore \
# ../../storage/bat/libbatstore \
-# ../../storage/restrict/librestrictstore \
# ../../common/libsqlcommon \
# ../../../monetdb5/tools/libmonetdb5 \
# ../../../gdk/libbat \
@@ -83,7 +82,6 @@ lib__sql = {
# ../../server/libsqlserver \
# ../../storage/libstore \
# ../../storage/bat/libbatstore \
-# ../../storage/restrict/librestrictstore \
# ../../common/libsqlcommon \
# ../../../monetdb5/tools/libmonetdb5 \
# ../../../gdk/libbat \
diff --git a/sql/storage/restrict/restrict_logger.c
b/sql/storage/restrict/restrict_logger.c
deleted file mode 100644
--- a/sql/storage/restrict/restrict_logger.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2008-2015 MonetDB B.V.
- */
-
-#include "monetdb_config.h"
-#include "restrict_logger.h"
-
-logger *restrict_logger = NULL;
-
-static int
-bl_create(int debug, const char *logdir, int catalog_version)
-{
- if (restrict_logger)
- return LOG_ERR;
- restrict_logger = logger_create(debug, "sql", logdir, catalog_version,
NULL, NULL, 0);
- if (restrict_logger)
- return LOG_OK;
- return LOG_ERR;
-}
-
-static void
-bl_destroy(void)
-{
- logger *l = restrict_logger;
-
- restrict_logger = NULL;
- if (l) {
- logger_exit(l);
- logger_destroy(l);
- }
-}
-
-static int
-bl_restart(void)
-{
- if (restrict_logger)
- return logger_restart(restrict_logger);
- return LOG_OK;
-}
-
-static int
-bl_cleanup(void)
-{
- if (restrict_logger)
- return logger_cleanup(restrict_logger, 0);
- return LOG_OK;
-}
-
-static int
-bl_changes(void)
-{
- return (int) MIN(logger_changes(restrict_logger), GDK_int_max);
-}
-
-static int
-ro_restart(void)
-{
- assert(0);
- return LOG_OK;
-}
-
-static int
-ro_cleanup(void)
-{
- assert(0);
- return LOG_OK;
-}
-
-static int
-ro_changes(void)
-{
- int c = (int) MIN(logger_changes(restrict_logger), GDK_int_max);
- assert(c==0);
- return c;
-}
-
-static int
-bl_get_sequence(int seq, lng *id)
-{
- return logger_sequence(restrict_logger, seq, id);
-}
-
-static int
-bl_log_isnew(void)
-{
- if (BATcount(restrict_logger->catalog_bid) > 10) {
- return 0;
- }
- return 1;
-}
-
-static int
-bl_tstart(void)
-{
- return log_tstart(restrict_logger);
-}
-
-static int
-bl_tend(void)
-{
- return log_tend(restrict_logger);
-}
-
-static int
-bl_sequence(int seq, lng id)
-{
- return log_sequence(restrict_logger, seq, id);
-}
-
-static int
-ro_tstart(void)
-{
- assert(0);
- return 0;
-}
-
-static int
-ro_tend(void)
-{
- assert(0);
- return 0;
-}
-
-static int
-ro_sequence(int seq, lng id)
-{
- assert(0);
- (void)seq;
- (void)id;
- return 0;
-}
-
-int
-su_logger_init( logger_functions *lf )
-{
- lf->create = bl_create;
- lf->destroy = bl_destroy;
- lf->restart = bl_restart;
- lf->cleanup = bl_cleanup;
- lf->changes = bl_changes;
- lf->get_sequence = bl_get_sequence;
- lf->log_isnew = bl_log_isnew;
- lf->log_tstart = bl_tstart;
- lf->log_tend = bl_tend;
- lf->log_sequence = bl_sequence;
- return LOG_OK;
-}
-
-int
-ro_logger_init( logger_functions *lf )
-{
- lf->create = bl_create;
- lf->destroy = bl_destroy;
- lf->restart = ro_restart;
- lf->cleanup = ro_cleanup;
- lf->changes = ro_changes;
- lf->get_sequence = bl_get_sequence;
- lf->log_isnew = bl_log_isnew;
- lf->log_tstart = ro_tstart;
- lf->log_tend = ro_tend;
- lf->log_sequence = ro_sequence;
- return LOG_OK;
-}
-
-int
-suro_logger_init( logger_functions *lf )
-{
- return ro_logger_init(lf);
-}
diff --git a/sql/storage/restrict/restrict_logger.h
b/sql/storage/restrict/restrict_logger.h
deleted file mode 100644
--- a/sql/storage/restrict/restrict_logger.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2008-2015 MonetDB B.V.
- */
-
-#ifndef RESTRICT_LOGGER_H
-#define RESTRICT_LOGGER_H
-
-#include "sql_storage.h"
-#include <gdk_logger.h>
-
-extern logger *restrict_logger;
-
-extern int su_logger_init( logger_functions *lf );
-extern int ro_logger_init( logger_functions *lf );
-extern int suro_logger_init( logger_functions *lf );
-
-#endif /*RESTRICT_LOGGER_H */
diff --git a/sql/storage/restrict/restrict_storage.c
b/sql/storage/restrict/restrict_storage.c
deleted file mode 100644
--- a/sql/storage/restrict/restrict_storage.c
+++ /dev/null
@@ -1,1022 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2008-2015 MonetDB B.V.
- */
-
-#include "monetdb_config.h"
-#include "restrict_storage.h"
-#include <bat/bat_utils.h>
-#include <sql_string.h>
-
-#define SNAPSHOT_MINSIZE (1024)
-
-static BAT *
-bind_col(sql_trans *tr, sql_column *c, int access)
-{
- BAT *b;
- sql_bat *bat = c->data;
-
-#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);
- 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;
-
-#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);
- i->base.rtime = i->t->base.rtime = i->t->s->base.rtime = tr->rtime =
tr->stime;
- return b;
-}
-
-static BAT *
-bind_del(sql_trans *tr, sql_table *t, int access)
-{
- BAT *b;
- sql_bat *bat = t->data;
-
-#ifdef NDEBUG
- (void) access; /* satisfy compiler */
-#endif
- assert(access == RD_INS);
- b = temp_descriptor(bat->bid);
- assert(b);
- t->s->base.rtime = t->base.rtime = tr->stime;
- return b;
-}
-
-/* we could have an unsafe mode which simply forgets the old values */
-static void
-update_bat( sql_bat *bat, BAT *rids, BAT *updates, int isnew)
-{
- BAT *b;
- BAT *upd = BATleftfetchjoin(BATmirror(rids), updates, BATcount(rids));
-
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list