Commits

Bryan O'Sullivan committed f6f975e

Yert more info.

  • Participants
  • Parent commits 6f5e1e7

Comments (0)

Files changed (2)

File Database/MySQL.hs

     , protocolInfo
     , characterSetName
     , sslCipher
+    , serverStatus
     -- * General information
     , clientInfo
     , clientVersion
     then return Nothing
     else Just <$> peekCString name
 
+serverStatus :: Connection -> IO String
+serverStatus conn = withConn conn $ \ptr -> do
+  st <- withRTSSignalsBlocked $ mysql_stat ptr
+  check "serverStatus" ptr (ptrToIntPtr st)
+  peekCString st
+
 clientInfo :: String
 clientInfo = unsafePerformIO $ peekCString mysql_get_client_info
 {-# NOINLINE clientInfo #-}

File Database/MySQL/C.hsc

     , mysql_get_proto_info
     , mysql_character_set_name
     , mysql_get_ssl_cipher
+    , mysql_stat
     -- * General information
     , mysql_get_client_info
     , mysql_get_client_version
 foreign import ccall safe mysql_get_ssl_cipher
     :: Ptr MYSQL -> IO CString
 
+foreign import ccall unsafe mysql_stat
+    :: Ptr MYSQL -> IO CString
+
 foreign import ccall safe mysql_get_client_info :: CString
 
 foreign import ccall safe mysql_get_client_version :: CULong