aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-06-17 13:31:28 +0800
committerIgor Pashev <pashev.igor@gmail.com>2016-06-17 13:40:54 +0800
commitb41849d9cb4ccb856905a26bfc36b6ac7c5b1f32 (patch)
tree2b1e76de39a5cced6531879f4c28cecc7e7963d6 /src/Main.hs
parent2059118ee2778fb8945ae6ccf33aa3aaba5d3417 (diff)
downloadmywatch-b41849d9cb4ccb856905a26bfc36b6ac7c5b1f32.tar.gz
Work around buggy mysql package
It uses unsafeUseAsCString for no reason and causes heisenbugs. See https://github.com/bos/mysql/pull/23
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 494faba..1f8cc89 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -61,7 +61,8 @@ main = do
connectPort = 0,
connectSSL = Nothing,
connectUser = "",
- connectOptions = [ ReadDefaultFile file, ReadDefaultGroup (pack g) ]
+ -- FIXME: Work aroung buggy mysql: unsafeUseAsCString creates garbage.
+ connectOptions = [ ReadDefaultFile file, ReadDefaultGroup (pack $ g ++ "\0") ]
}) servers
listen = maybe (Right socket) (Left . read) port
server listen myInfo datadir