Index: libgda/sql-delimiter/lexer.l
===================================================================
--- libgda/sql-delimiter/lexer.l	(revision 2904)
+++ libgda/sql-delimiter/lexer.l	(working copy)
@@ -79,6 +79,10 @@ is[ \t]+null   		{can_use_is = FALSE; RE
 
 \$[a-zA-Z0-9_\-]*\$	{string_delim = g_strdup (gda_delimitertext); gstring = g_string_new (""); BEGIN(STRING);}
 \'			{gstring = g_string_new (""); BEGIN(STRING);}
+<STRING,PSTRING>\\\\ 	{if (string_delim) /* so that \\' does not go into the \' state */
+                                REJECT;
+			 g_string_append (gstring, "\\\\");
+			}
 <STRING,PSTRING>\\' 	{if (string_delim)
                                 REJECT;
 			 g_string_append (gstring, "\\'");
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 2904)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2007-04-26  Armin Burgmeier  <armin@openismus.com>
+
+	* libgda/sql-delimiter/lexer.l: Add special rule for '\\' so that \\'
+	is correctly recognized as string delimiter.
+
 2007-04-26  Vivien Malerba <malerba@gnome-db.org>
 
 	* tools/Makefile.am: minor correction for bug #432798 (due to too much
