[tracker] libtracker-data: Reset property table name on cardinality changes



commit 64c028032ccdd5a9b4230042d5961f6fdbee909f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Dec 15 19:51:23 2018 +0100

    libtracker-data: Reset property table name on cardinality changes
    
    This value is cached, but may change during database initialization,
    making the TrackerProperty point to an incorrect table. The test update
    in the following commit reproduces this situation, and would fail without
    this in place.

 src/libtracker-data/tracker-property.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/libtracker-data/tracker-property.c b/src/libtracker-data/tracker-property.c
index 8b94a8c89..739d360a9 100644
--- a/src/libtracker-data/tracker-property.c
+++ b/src/libtracker-data/tracker-property.c
@@ -1044,6 +1044,7 @@ tracker_property_set_multiple_values (TrackerProperty *property,
        priv = tracker_property_get_instance_private (property);
 
        priv->multiple_values = value;
+       g_clear_pointer (&priv->table_name, g_free);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]