Changeset: 70d748aa24b4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/70d748aa24b4
Modified Files:
        gdk/gdk_logger.c
Branch: ustr
Log Message:

Widen distinct string column to full width when it was created by the WAL.


diffs (20 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1095,6 +1095,16 @@ la_bat_create_ustr(logger *lg, logaction
                 * tvkey property was lost */
                u->tvkey = true;
        }
+       /* in case the distinct string column is newly created when
+        * processing the WAL, but already contains data, we widen it to
+        * the full width */
+       if (u->twidth < SIZEOF_VAR_T &&
+           GDKupgradevarheap(u, (var_t) 1 << (4 * SIZEOF_VAR_T + 1),
+                             BATcapacity(u), BATcount(u)) != GDK_SUCCEED) {
+               logbat_destroy(b);
+               BBPreclaim(u);
+               return GDK_FAIL;
+       }
 
        if (BATconvert2ustr(b, u) != GDK_SUCCEED) {
                BBPreclaim(u);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to