Changeset: 70891487dea2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=70891487dea2
Modified Files:
sql/backends/monet5/Makefile.ag
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_bpm.c
sql/backends/monet5/sql_bpm.h
sql/backends/monet5/sql_bpm.mal
sql/backends/monet5/sql_optimizer.c
sql/backends/monet5/sql_scenario.c
sql/storage/Makefile.ag
sql/storage/bpm/Makefile.ag
sql/storage/bpm/bpm_distribution.c
sql/storage/bpm/bpm_distribution.h
sql/storage/bpm/bpm_logger.c
sql/storage/bpm/bpm_logger.h
sql/storage/bpm/bpm_storage.c
sql/storage/bpm/bpm_storage.h
sql/storage/bpm/bpm_table.c
sql/storage/bpm/bpm_table.h
sql/storage/sql_storage.h
Branch: Aug2011
Log Message:
Bat Partition Manager (BPM) is history.
It wasn't used. It wasn't even initialized.
diffs (truncated from 2689 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
@@ -46,13 +46,11 @@
sql_optimizer.c \
sql_result.mx \
sql_readline.c \
- sql_emptyset.c \
- sql_bpm.c
+ sql_emptyset.c
LIBS = ../../server/libsqlserver \
../../storage/libstore \
../../storage/bat/libbatstore \
../../storage/restrict/librestrictstore \
- ../../storage/bpm/libbpmstore \
../../common/libsqlcommon \
HAVE_RAPTOR?../../../monetdb5/extras/rdf/librdf \
../../../monetdb5/tools/libmonetdb5 \
@@ -72,7 +70,6 @@
# ../../storage/libstore \
# ../../storage/bat/libbatstore \
# ../../storage/restrict/librestrictstore \
-# ../../storage/bpm/libbpmstore \
# ../../common/libsqlcommon \
# ../../../monetdb5/tools/libmonetdb5 \
# ../../../gdk/libbat \
@@ -88,7 +85,6 @@
# ../../storage/libstore \
# ../../storage/bat/libbatstore \
# ../../storage/restrict/librestrictstore \
-# ../../storage/bpm/libbpmstore \
# ../../common/libsqlcommon \
# ../../../monetdb5/tools/libmonetdb5 \
# ../../../gdk/libbat \
@@ -100,7 +96,7 @@
headers_mal = {
HEADERS = mal
DIR = libdir/monetdb5
- SOURCES = sql.mx sql_bpm.mal
+ SOURCES = sql.mx
}
headers_autoload = {
@@ -109,5 +105,5 @@
SOURCES = 40_sql.mal
}
-EXTRA_DIST = 40_sql.mal sql_bpm.mal sql_bpm.h sql_emptyset.h sql_gencode.h
sql_optimizer.h sql_scenario.h sql_user.h sql_readline.h
+EXTRA_DIST = 40_sql.mal sql_emptyset.h sql_gencode.h sql_optimizer.h
sql_scenario.h sql_user.h sql_readline.h
EXTRA_DIST_DIR = Tests
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -1091,9 +1091,6 @@
sql.prelude();
-include sql_bpm;
-
-
@h
#ifndef _SQL_H
#define _SQL_H
diff --git a/sql/backends/monet5/sql_bpm.c b/sql/backends/monet5/sql_bpm.c
deleted file mode 100644
--- a/sql/backends/monet5/sql_bpm.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * The contents of this file are subject to the MonetDB Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * 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-July 2008 CWI.
- * Copyright August 2008-2011 MonetDB B.V.
- * All Rights Reserved.
- */
-
-/*
- * @f sql_bpm
- */
-#include <monetdb_config.h>
-#include <sql_bpm.h>
-#include <sql_mem.h>
-#include <sql_mvc.h>
-#include <sql.h>
-#include <mal_exception.h>
-#include <bpm/bpm_storage.h>
-#include <bat/bat_utils.h>
-#include <mal_mapi.h>
-
-static BAT *
-mat_bind(mvc *m, char *sname, char *tname, char *cname, int access, int part)
-{
- sql_schema *s = mvc_bind_schema(m, sname);
- sql_table *t = mvc_bind_table(m, s, tname);
- sql_column *c = mvc_bind_column(m, t, cname);
- sql_bpm *p = c->data;
-
- if (p->nr <= part) {
- return NULL;
- } else {
- if (access == RD_UPD){
- assert(p->parts[part].ubid);
- return temp_descriptor(p->parts[part].ubid);
- }
- assert(p->parts[part].bid);
- return temp_descriptor(p->parts[part].bid);
- }
-}
-
-/* str mat_bind_wrap(int *bid, str *sname, str *tname, str *cname, int
*access, int *part); */
-str
-mat_bind_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- BAT *b = NULL;
- mvc *m = NULL;
- str msg = getContext(cntxt, mb, &m, NULL);
- int *bid = (int *)getArgReference(stk, pci, 0);
- str *sname = (str *)getArgReference(stk, pci, 1);
- str *tname = (str *)getArgReference(stk, pci, 2);
- str *cname = (str *)getArgReference(stk, pci, 3);
- int *access = (int *)getArgReference(stk, pci, 4);
- int *part = (int *)getArgReference(stk, pci, 5);
-
- if (msg)
- return msg;
- b = mat_bind(m, *sname, *tname, *cname, *access, *part);
- if (b) {
- BBPkeepref( *bid = b->batCacheid);
- return MAL_SUCCEED;
- }
- throw(SQL, "mat.bind", "limitation in transaction scope");
-}
-
-static BAT *
-mat_bind_idxbat(mvc *m, char *sname, char *cname, int access, int part)
-{
- sql_schema *s = mvc_bind_schema(m, sname);
- sql_idx *i = mvc_bind_idx(m, s, cname);
- sql_bpm *p = i->data;
-
- if (p->nr <= part) {
- return NULL;
- } else {
- if (access == RD_UPD)
- return temp_descriptor(p->parts[part].ubid);
- return temp_descriptor(p->parts[part].bid);
- }
-}
-
-/* str mat_bind_idxbat_wrap(int *bid, str *sname, str *tname, str *cname, int
*access, int *part); */
-str
-mat_bind_idxbat_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- BAT *b = NULL;
- mvc *m = NULL;
- str msg = getContext(cntxt, mb, &m, NULL);
- int *bid = (int *)getArgReference(stk, pci, 0);
- str *sname = (str *)getArgReference(stk, pci, 1);
- str *tname = (str *)getArgReference(stk, pci, 2);
- str *cname = (str *)getArgReference(stk, pci, 3);
- int *access = (int *)getArgReference(stk, pci, 4);
- int *part = (int *)getArgReference(stk, pci, 5);
-
- if (msg)
- return msg;
- (void)tname;
- b = mat_bind_idxbat(m, *sname, *cname, *access, *part);
- if (b) {
- BBPkeepref( *bid = b->batCacheid);
- return MAL_SUCCEED;
- }
- throw(SQL, "mat.bind", "limitation in transaction scope");
-}
-
-/* str Cparts(int *d, str *sname, str *tname, str *cname, int *access, int
*parts); */
-str
-Cparts(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- mvc *m = NULL;
- str msg = getContext(cntxt, mb, &m, NULL);
- sql_schema *s;
- sql_table *t;
- sql_column *c;
- sql_bpm *p;
- int err = 0;
- int *d = (int *)getArgReference(stk, pci, 0);
- str *sname = (str *)getArgReference(stk, pci, 1);
- str *tname = (str *)getArgReference(stk, pci, 2);
- str *cname = (str *)getArgReference(stk, pci, 3);
- int *parts = (int *)getArgReference(stk, pci, 5);
-
- (void)d;
- if (msg)
- return msg;
-
- s = mvc_bind_schema(m, *sname);
- t = mvc_bind_table(m, s, *tname);
- c = mvc_bind_column(m, t, *cname);
- if (c) {
- p = c->data;
- } else {
- sql_idx *i = mvc_bind_idx(m, s, *cname);
- p = i->data;
- }
- err = *parts != (p->nr);
- if (!err)
- return MAL_SUCCEED;
- throw(OPTIMIZER, "mal.assert", "parts changed");
-}
-
-str
-mat_dummy(void)
-{
- throw(OPTIMIZER, "mat.dummy", "not optimized away");
-}
-
-static void
-inc_parts(sql_table *t)
-{
- node *n;
-
- if (isTempTable(t) || isView(t))
- return ;
- for (n=t->columns.set->h; n; n = n->next) {
- /*sql_column *c = n->data;
- if (c->data && !bpm_add_partition(c->data))
- return;*/
- }
- if (t->idxs.set) for (n=t->idxs.set->h; n; n = n->next) {
- /*sql_idx *i = n->data;
- if (i->data && !bpm_add_partition(i->data))
- return;*/
- }
-}
-
-/* str inc_parts_wrap(int *d, str *sname, str *tname); */
-str
-inc_parts_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- mvc *m = NULL;
- str msg = getContext(cntxt, mb, &m, NULL);
- sql_schema *s;
- sql_table *t;
- str *sname = (str *)getArgReference(stk, pci, 1);
- str *tname = (str *)getArgReference(stk, pci, 2);
-
- if (msg)
- return msg;
-
- s = mvc_bind_schema(m, *sname);
- if (active_store_type != store_bpm)
- throw(SQL, "mat.inc_parts",
- "currently no bpm store support available");
- if (!s)
- throw(SQL, "mat.inc_parts", "%s",
- sql_message("schema %s unknown", *sname));
- t = mvc_bind_table(m, s, *tname);
- if (!t)
- throw(SQL, "mat.inc_parts", "%s",
- sql_message("table %s unknown", *tname));
- inc_parts(t);
- return MAL_SUCCEED;
-}
-
-str
-send_part(sql_column *col, int part, BAT *b, str *conn)
-{
-/* str tmp = NULL, ident = "romulo";
- connection c;
- sql_bpm *bpm = col->data;*/
-
- (void)col;
- (void)part;
- (void)b;
- (void)conn;
- /* lookup conn */
-/*
- if ((tmp= RMTfindconn(&c, *conn)) != MAL_SUCCEED)
- throw(SQL, "mat.send_part", "%s", tmp);
-*/
-
- /*send the fragment to the remote site*/
-/*
- if ((tmp = RMTinternalput(&ident, c->mconn, newBatType(b->H->type,
b->T->type), &b->batCacheid)) != MAL_SUCCEED)
- throw(SQL, "mat.send_part", "%s", tmp);
-
-*/
- /*store the information about the fragment location*/
- /*if (!bpm_set_part_location(bpm, part, *conn, ident))
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list