[tracker/wip/carlosg/resource-leak-fix: 2/5] libtracker-data: Prevent ALTER TABLE from happening on new classes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/resource-leak-fix: 2/5] libtracker-data: Prevent ALTER TABLE from happening on new classes
- Date: Tue, 11 Jul 2017 23:20:06 +0000 (UTC)
commit c8ca421e68de353500d99d496403afc63dd404c1
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jul 5 11:32:07 2017 +0200
libtracker-data: Prevent ALTER TABLE from happening on new classes
This step should be only happening if the class is not new, despite
in_change being TRUE.
src/libtracker-data/tracker-data-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index aa0c127..05d8947 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -2933,7 +2933,7 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
return;
}
- if (in_change) {
+ if (in_change && !tracker_class_get_is_new (service)) {
g_debug ("Rename: ALTER TABLE \"%s\" RENAME TO \"%s_TEMP\"", service_name, service_name);
tracker_db_interface_execute_query (iface, &internal_error,
"ALTER TABLE \"%s\" RENAME TO \"%s_TEMP\"",
@@ -3246,7 +3246,7 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
}
}
- if (in_change && sel_col_sql && in_col_sql) {
+ if (!tracker_class_get_is_new (service) && in_change && sel_col_sql && in_col_sql) {
guint i;
gchar *query;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]