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

Fix for when data is appended to a table and quickly deleted.


diffs (13 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
@@ -3461,7 +3461,8 @@ log_segments(sql_trans *tr, segments *se
        lock_table(tr->store, id);
        for (segment *seg = segs->h; seg; seg=ATOMIC_PTR_GET(&seg->next)) {
                unlock_table(tr->store, id);
-               if (seg->ts == tr->tid && seg->end-seg->start) {
+               if (seg->ts == tr->tid && seg->end-seg->start &&
+                       (ATOMIC_PTR_GET(&seg->next) || !seg->deleted || seg->ts 
!= seg->oldts)) {
                        if (log_segment(tr, seg, id) != LOG_OK) {
                                return LOG_ERR;
                        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to