Commits

Bryan O'Sullivan  committed da571e3

Handle empty binary data correctly.

  • Participants
  • Parent commits 89d3b97

Comments (0)

Files changed (1)

File Database/MySQL/Simple/Param.hs

         [Plain (fromChar ')')]
 
 instance Param (Binary SB.ByteString) where
-    render (Binary bs) = Plain $ fromByteString "0x" `mappend`
-                                 fromByteString (B16.encode bs)
+    render (Binary bs) = Plain $ fromByteString "x'" `mappend`
+                                 fromByteString (B16.encode bs) `mappend`
+                                 fromChar '\''
 
 instance Param (Binary LB.ByteString) where
     render (Binary bs) = Plain $ fromByteString "0x" `mappend`