Changeset: 5fe74f010042 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5fe74f010042
Modified Files:
        sql/storage/bat/bat_storage.c
Branch: Jul2021
Log Message:

small fix. ie only append or replace


diffs (20 lines):

diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -1318,11 +1318,12 @@ cs_update_bat( sql_trans *tr, column_sto
        } else if (is_new || cs->cleared) {
                BAT *b = temp_descriptor(cs->bid);
 
-               if (b == NULL)
+               if (b == NULL) {
                        res = LOG_ERR;
-               else if (BATcount(b)==0 && BATappend(b, updates, NULL, true) != 
GDK_SUCCEED) /* alter add column */
-                       res = LOG_ERR;
-               else if (BATreplace(b, otids, updates, true) != GDK_SUCCEED)
+               } else if (BATcount(b)==0) {
+                       if (BATappend(b, updates, NULL, true) != GDK_SUCCEED) 
/* alter add column */
+                               res = LOG_ERR;
+               } else if (BATreplace(b, otids, updates, true) != GDK_SUCCEED)
                        res = LOG_ERR;
                BBPcold(b->batCacheid);
                bat_destroy(b);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to