Update of /cvsroot/monetdb/sql/src/storage/bat
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12154/src/storage/bat

Modified Files:
        bat_storage.mx 
Log Message:
propagated changes of Friday Jun 27 2008 - Saturday Jun 28 2008
from the SQL_2-24 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/06/27 - nielsnes:
        src/storage/bat/bat_storage.mx,1.16.2.4(SQL_2-24,Stable_DailyBuild-28)
fixed concurency bug. We use a special set op empty update bats, these need
to be replaced by new bats before inserts. That wasn't done correctly.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: bat_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bat/bat_storage.mx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- bat_storage.mx      22 Jun 2008 22:06:51 -0000      1.19
+++ bat_storage.mx      28 Jun 2008 09:32:05 -0000      1.20
@@ -1048,19 +1048,23 @@
        if (BUNlast(ups) > BUNfirst(ups)) {
                if (BUNlast(ups) > ups->batInserted && store_nr_active > 1) { 
                        BAT *cu = temp_descriptor(obat->ubid);
+
+                       if (isEUbat(cu)) {
+                               temp_destroy(obat->ubid);
+                               obat->ubid = temp_copy(cu->batCacheid, FALSE);
+                               bat_destroy(cu);
+                               cu = temp_descriptor(obat->ubid);
+                       }
                        copy_inserted(cu, ups);
                        bat_destroy(cu);
                }
                if (store_nr_active == 1) { /* flush all */
                        void_replace_bat(cur, ups, TRUE);
                        /* cleanup the old deltas */
-                       if (BUNfirst(ups) != ups->batInserted) { 
-                               BAT *cu = temp_descriptor(obat->ubid);
-                               bat_clear(cu);
-                               BATcommit(cu);
-                               bat_destroy(cu);
-                       }
-                       bat_clear(ups);
+                       temp_destroy(obat->ubid);
+                       obat->ubid = e_ubat(cur->ttype);
+                       temp_destroy(cbat->ubid);
+                       cbat->ubid = e_ubat(cur->ttype);
                } else {
                        BATcommit(ups);
                }


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to