[libgdamm] Connection: update_meta_store_table(): Use gda_meta_store_sql_identifier_quote()



commit 6d09c470d7d99f6d70bedcedcca8de84d9535b62
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Jul 25 10:24:11 2009 +0200

    Connection: update_meta_store_table(): Use gda_meta_store_sql_identifier_quote()
    	as mentioned in bug #589607.
    	Hopefully this is the end of this story.

 ChangeLog                 |    6 ++++++
 libgda/src/connection.ccg |   10 ++++------
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7dcf626..d6e11ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-25  Murray Cumming  <murrayc murrayc com>
+
+	* libgda/src/connection.ccg: update_meta_store_table():
+	Use gda_meta_store_sql_identifier_quote() as mentioned in bug #589607.
+	Hopefully this is the end of this story.
+
 2009-07-24  Murray Cumming  <murrayc murrayc com>
 
 	* libgda/src/connection.ccg: update_meta_store_table(): Comment out the 
diff --git a/libgda/src/connection.ccg b/libgda/src/connection.ccg
index 2ab31ce..d7fbb97 100644
--- a/libgda/src/connection.ccg
+++ b/libgda/src/connection.ccg
@@ -370,17 +370,15 @@ bool Connection::update_meta_store_table(const Glib::ustring& table_name, const
 bool Connection::update_meta_store_table(const Glib::ustring& table_name, const Glib::ustring& schema_name, std::auto_ptr<Glib::Error>& error)
 #endif
 {
-  // This ridiculous function, with the obscure parameters, is needed to make sure that 
+  // This function is needed to make sure that 
   // the GdaMetaStore really gets the meta data for the table we specified, even if 
   // the table name contains upper-case characters or spaces. murrayc.
-  //gchar* table_name_quoted = gda_sql_identifier_quote(table_name.c_str(), gobj(), NULL,
-  //  TRUE /* meta-store convention */, 
-  //  TRUE /* force_quotes - Yes, the really_do_what_i_say() function has a really_really_do_what_i_say parameter. */ );
+  gchar* table_name_quoted = gda_meta_store_sql_identifier_quote (table_name.c_str(), gobj());
   //std::cout << "Connection::update_meta_store_table(): table_name_quoted=" << table_name_quoted << std::endl;
   
   GValue table_name_value = { 0 };
   g_value_init(&table_name_value, G_TYPE_STRING);
-  g_value_set_static_string(&table_name_value, table_name.c_str());
+  g_value_set_static_string(&table_name_value, table_name_quoted);
 
   GValue table_schema_value = { 0 };
   g_value_init(&table_schema_value, G_TYPE_STRING);
@@ -397,7 +395,7 @@ bool Connection::update_meta_store_table(const Glib::ustring& table_name, const
   g_value_unset(&table_name_value);
   g_value_unset(&table_schema_value);
   
-  //g_free(table_name_quoted);
+  g_free(table_name_quoted);
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   if(gerror)



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