Index: src/Libraries/Hyena/Hyena.Query/Tests/QueryTests.cs
===================================================================
--- src/Libraries/Hyena/Hyena.Query/Tests/QueryTests.cs	(revision 5046)
+++ src/Libraries/Hyena/Hyena.Query/Tests/QueryTests.cs	(working copy)
@@ -153,11 +153,23 @@
             val.ParseUserQuery ("mp3");
     
             Assert.AreEqual (
-                "(CoreTracks.MimeType LIKE '%mp3%' OR CoreTracks.Uri LIKE '%mp3%')",
+                "(CoreTracks.MimeType LIKE '%mp3%' ESCAPE '\\' OR CoreTracks.Uri LIKE '%mp3%' ESCAPE '\\')",
                 MimeTypeField.ToSql (StringQueryValue.Contains, val)
             );
         }
-		
+
+        [Test] // bug 570312
+        public void EscapeSqliteWildcards ()
+        {
+            QueryValue val = new StringQueryValue ();
+            val.ParseUserQuery ("100%");
+
+            Assert.AreEqual (
+                "(CoreAlbums.TitleLowered LIKE '%100\\%%' ESCAPE '\\' AND CoreAlbums.TitleLowered IS NOT NULL)",
+                AlbumField.ToSql (StringQueryValue.Contains, val)
+            );
+        }
+
         [Test]
         // Test behavior issues described in
         // http://bugzilla.gnome.org/show_bug.cgi?id=547078
