Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4477/src/backends/monet5
Modified Files:
sql_bpm.mx sql_optimizer.mx sql_scenario.mx sql_user.mx
Log Message:
we can now support select count(*) from bla; on bpm storage.
(bpm storage can be enabled by setting sql_debug=16)
Adding parts is done by
call inc_parts('sys','lineitem');
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.283
retrieving revision 1.284
diff -u -d -r1.283 -r1.284
--- sql_scenario.mx 6 Nov 2007 23:29:39 -0000 1.283
+++ sql_scenario.mx 12 Nov 2007 20:11:03 -0000 1.284
@@ -222,10 +222,11 @@
MTIMEtimezone(&tz, &gmt);
(void) tz;
- if (mvc_init(FALSE, store_bat, 0) < 0)
- throw(SQL, "SQLinit", "Catalogue initialization failed");
if (debug_str)
SQLdebug = strtol(debug_str,NULL,10);
+ if (((SQLdebug&16)!=0 && mvc_init(FALSE, store_bpm, 0) < 0) ||
+ ((SQLdebug&16)==0 && mvc_init(FALSE, store_bat, 0) < 0))
+ throw(SQL, "SQLinit", "Catalogue initialization failed");
SQLinitialized = TRUE;
if (!GDKembedded && MT_create_thread(&sqllogthread, (void (*)(void *))
mvc_logmanager, NULL) < 0) {
throw(SQL, "SQLinit", "Starting log manager failed");
Index: sql_user.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_user.mx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- sql_user.mx 6 Nov 2007 23:30:43 -0000 1.34
+++ sql_user.mx 12 Nov 2007 20:11:03 -0000 1.35
@@ -333,7 +333,7 @@
str username = NULL;
str err = NULL;
- if (m->debug)
+ if (m->debug&1)
fprintf(stderr, "monet5_user_get_def_schema " OIDFMT "\n",
user);
if ((err = AUTHresolveUser(&username, &user)) != MAL_SUCCEED) {
Index: sql_optimizer.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_optimizer.mx,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- sql_optimizer.mx 6 Nov 2007 15:42:27 -0000 1.163
+++ sql_optimizer.mx 12 Nov 2007 20:11:03 -0000 1.164
@@ -395,6 +395,7 @@
oid low = 0, high = 1;
low = bpm->parts[off+i].hlow;
+ assert(low != (oid)-1);
high = bpm->parts[off+i].hhgh;
q = newInstruction(mb, ASSIGNsymbol);
setModuleId(q, matRef);
@@ -402,16 +403,17 @@
d = getArg(q,0) = newTmpVariable(mb,
tpe);
for(j=p->retc; j<p->argc; j++)
q = pushArgument(mb, q,
getArg(p,j));
- pushInt(mb, q, i);
+ q = pushInt(mb, q, i);
pushInstruction(mb,q);
q = newInstruction(mb, ASSIGNsymbol);
- d = getArg(q,0) = newTmpVariable(mb,
TYPE_void);
setModuleId(q, matRef);
setFunctionId(q, hrangeRef);
+ getArg(q,0) = newTmpVariable(mb,
TYPE_void);
q = pushArgument(mb, q, d);
q = pushOid(mb, q, low);
q = pushOid(mb, q, high);
+ pushInstruction(mb,q);
}
q = newInstruction(mb, ASSIGNsymbol);
setModuleId(q,matRef);
Index: sql_bpm.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_bpm.mx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sql_bpm.mx 6 Nov 2007 15:43:02 -0000 1.1
+++ sql_bpm.mx 12 Nov 2007 20:11:02 -0000 1.2
@@ -28,7 +28,7 @@
comment "Bind the idx bat, tname.idx
with specific accsess modes";
-command hrange(low:oid, high:oid):void
+command hrange(b:bat[:oid,:any_1], low:oid, high:oid):void
address mat_dummy
comment "pass the horizontal range to the optimizers (dummy function)";
@@ -154,7 +154,8 @@
err = *parts != (p->nr-p->ins);
else
err = *parts != (p->ins);
- if (!err)
+ /* HACK ALERT */
+ if (!err || *access == RD_UPD)
return MAL_SUCCEED;
throw(OPTIMIZER, "mal.assert", "parts changed");
}
@@ -174,13 +175,13 @@
return ;
for (n=t->columns.set->h; n; n = n->next) {
sql_column *c = n->data;
- if (c->data)
- bpm_add_partition(c->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);
+ if (i->data && !bpm_add_partition(i->data))
+ return;
}
}
@@ -197,6 +198,9 @@
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",
sql_message("schema %s unknown", *sname));
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins