[libgda/LIBGDA_4.2] Misc corrections



commit ab253aac1f3e9fc1eb4bfa7fad023a4caf67aae4
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sat Apr 16 21:16:00 2011 +0200

    Misc corrections

 libgda/gda-connection.c                            |    4 ++++
 libgda/sqlite/virtual/gda-vconnection-data-model.c |    6 +++---
 libgda/sqlite/virtual/gda-vprovider-data-model.c   |    2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 6ad04a4..fee5c25 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -6339,6 +6339,10 @@ update_meta_store_after_statement_exec (GdaConnection *cnc, GdaStatement *stmt,
 void
 _gda_connection_signal_meta_table_update (GdaConnection *cnc, const gchar *table_name)
 {
+	if (! cnc->priv->meta_store ||
+	    ! (cnc->priv->options & GDA_CONNECTION_OPTIONS_AUTO_META_DATA))
+		return;
+
 	GdaMetaContext *context;
 	gchar *tmp;
 	/*g_print ("CONTEXT: update for table [%s]\n", tname);*/
diff --git a/libgda/sqlite/virtual/gda-vconnection-data-model.c b/libgda/sqlite/virtual/gda-vconnection-data-model.c
index fe0f285..a8a12c0 100644
--- a/libgda/sqlite/virtual/gda-vconnection-data-model.c
+++ b/libgda/sqlite/virtual/gda-vconnection-data-model.c
@@ -47,7 +47,7 @@ static gint gda_vconnection_data_model_signals[LAST_SIGNAL] = { 0, 0 };
 
 static GObjectClass  *parent_class = NULL;
 
-#ifdef GDA_DEBUG
+#ifdef GDA_DEBUG_NO
 static void
 dump_all_tables (GdaVconnectionDataModel *cnc)
 {
@@ -64,7 +64,7 @@ static void
 vtable_created (GdaVconnectionDataModel *cnc, const gchar *table_name)
 {
 	_gda_connection_signal_meta_table_update ((GdaConnection *)cnc, table_name);
-#ifdef GDA_DEBUG
+#ifdef GDA_DEBUG_NO
 	dump_all_tables (cnc);
 #endif
 }
@@ -77,7 +77,7 @@ vtable_dropped (GdaVconnectionDataModel *cnc, const gchar *table_name)
 	if (td)
 		cnc->priv->table_data_list = g_slist_remove (cnc->priv->table_data_list, td);
 	_gda_connection_signal_meta_table_update ((GdaConnection *)cnc, table_name);
-#ifdef GDA_DEBUG
+#ifdef GDA_DEBUG_NO
 	dump_all_tables (cnc);
 #endif
 }
diff --git a/libgda/sqlite/virtual/gda-vprovider-data-model.c b/libgda/sqlite/virtual/gda-vprovider-data-model.c
index c5b4e3a..0953c61 100644
--- a/libgda/sqlite/virtual/gda-vprovider-data-model.c
+++ b/libgda/sqlite/virtual/gda-vprovider-data-model.c
@@ -475,7 +475,7 @@ virtualCreate (sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlit
 		gtype = gda_column_get_g_type (column);
 		type = g_type_name (gtype);
 		if (!type) {
-			*pzErr = SQLITE3_CALL (sqlite3_mprintf) (_("Can't get data model's column type or type for column %d"), i);
+			*pzErr = SQLITE3_CALL (sqlite3_mprintf) (_("Can't get data model's column type for column %d"), i);
 			g_string_free (sql, TRUE);
 			return SQLITE_ERROR;
 		}



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