Permalink
Browse files

Handle empty binary data correctly.

  • Loading branch information...
1 parent 87ddd7b commit fe8577bc237d82f796969b64cec1dc28ee2c20cd @bos committed Jun 1, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 Database/MySQL/Simple/Param.hs
View
5 Database/MySQL/Simple/Param.hs
@@ -85,8 +85,9 @@ instance (Param a) => Param (In [a]) where
[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`

0 comments on commit fe8577b

Please sign in to comment.