Update of /cvsroot/monetdb/sql/src/storage/bat
In directory 
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1972/src/storage/bat

Modified Files:
        bat_storage.mx 
Log Message:

A sequence of group new and derives is now closed with a group.done (does
the last step ie a group.new or derive).
This makes the code in merge table a bit cleaner (more could be done later)

sql.bind and append/update/delete now have an extra (first) argument,
making them safe to use in the dataflow (ie solved using variable dependencies)
(BREAKS octopus !)

Implemented read only tables. Use 
ALTER TABLE x SET READ ONLY; 
(cannot be reverted currently)

fixed bug in limit/offset handling, now we have 64 bit wrd instead of int.

The new read only required schema changes, ie backup/restore your db.
We therefor claimed some more oid's for internal functions.



Index: bat_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bat/bat_storage.mx,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- bat_storage.mx      31 Jan 2010 12:45:21 -0000      1.52
+++ bat_storage.mx      27 Feb 2010 19:28:13 -0000      1.53
@@ -1220,12 +1220,14 @@
 {
        int ok = LOG_OK;
        BAT *ups, *ins, *cur;
+       int cleared = 0;
 
        (void)tr;
        assert(store_nr_active>0);
 
        /* for cleared tables the bid is reset */
        if (cbat->bid == 0) {
+               cleared = 1;
                cbat->bid = obat->bid;
                temp_dup(cbat->bid);
        }
@@ -1233,7 +1235,7 @@
        cur = temp_descriptor(obat->bid);
        ins = temp_descriptor(cbat->ibid);
        /* any inserts */
-       if (BUNlast(ins) > BUNfirst(ins)) {
+       if (BUNlast(ins) > BUNfirst(ins) || cleared) {
                if (BUNlast(ins) > ins->batInserted && (store_nr_active > 1 || 
cluster)) { 
                        BAT *ci = temp_descriptor(obat->ibid);
 
@@ -1282,7 +1284,7 @@
 
        ups = temp_descriptor(cbat->ubid);
        /* any updates */
-       if (BUNlast(ups) > BUNfirst(ups)) {
+       if (BUNlast(ups) > BUNfirst(ups) || cleared ) {
                if ((BUNlast(ups) > ups->batInserted || BATdirty(ups)) && 
(store_nr_active > 1 || cluster)) { 
                        BAT *cu = temp_descriptor(obat->ubid);
 


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to