[libgda/gtk3] Bug fixed when using quoted SQL identifiers with GDA_CONNECTION_OPTIONS_AUTO_META_DATA



commit 0813b8a23501bf397bb5fffb19e1afc85a37e22b
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Feb 10 20:29:45 2011 +0100

    Bug fixed when using quoted SQL identifiers with GDA_CONNECTION_OPTIONS_AUTO_META_DATA

 libgda/gda-connection.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 824d7aa..a2eae98 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -6175,7 +6175,7 @@ get_next_word (gchar *str, gboolean for_ident, gchar **out_next)
 		else if (*ptr == '_')
 			continue;
 		else if (for_ident) {
-			if (*ptr == '\'') {
+			if ((*ptr == '"') || (*ptr == '\'') || (*ptr == '`')) {
 				if (inquotes) {
 					*ptr = '"';
 					inquotes = FALSE;
@@ -6189,6 +6189,8 @@ get_next_word (gchar *str, gboolean for_ident, gchar **out_next)
 				continue;
 			}
 		}
+		else if (inquotes)
+			continue;
 		break;
 	}
 	if (ptr != start) {



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