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



commit 53f776b622d883b4edf4c7f79eb9706e3091ef64
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 a495b7d..48de177 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]