h&N      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                                                                                                                                              +Bryan O'Sullivan 2007-2015, Winterland 2016BSD3drkoster@qq.com experimentalunknown Safe-Inferred"6; mysql-haskell.Match any byte, to perform lookahead. Returns ? if end of input has been reached. Does not consume any input. mysql-haskellMatch any byte, to perform lookahead. Does not consume any input, but will fail if end of input has been reached. mysql-haskell The parser  satisfy p0 succeeds for any byte for which the predicate p returns ,. Returns the byte that is actually parsed. digit = satisfy isDigit where isDigit w = w >= 48 && w <= 57 mysql-haskell The parser satisfyWith f p3 transforms a byte, and succeeds if the predicate p returns  on the transformed value. The parser returns the transformed byte that was parsed. mysql-haskellMatch a specific byte. mysql-haskellMatch any byte. mysql-haskell The parser  skipWord8 p/ succeeds for any byte for which the predicate p returns . mysql-haskellThis is a faster version of ' for small N (smaller than chunk size).  mysql-haskell/Consume input as long as the predicate returns ; or reach the end of input, and return the consumed input.  mysql-haskell/Consume input as long as the predicate returns ; or reach the end of input, and return the consumed input.  mysql-haskell Similar to  , but requires the predicate to succeed on at least one byte of input: it will fail if the predicate never returns  or reach the end of input  mysql-haskell5Skip past input for as long as the predicate returns .  mysql-haskellSkip over white space using . mysql-haskellstring s3 parses a sequence of bytes that identically match s. mysql-haskellA stateful scanner. The predicate consumes and transforms a state argument, and each transformed state is passed to successive invocations of the predicate on each byte of the input until one returns  or the input ends.This parser does not fail. It will return an empty string if the predicate returns  on the first byte of input. mysql-haskell Similar to , but working on # chunks, The predicate consumes a  chunk and transforms a state argument, and each transformed state is passed to successive invocations of the predicate on each chunk of the input until one chunk got splited to Right (ByteString, ByteString) or the input ends. mysql-haskellFast . predicate for matching ASCII space characters !isSpace w = w == 32 || w - 9 <= 4 mysql-haskellDecimal digit predicate. mysql-haskellHex digit predicate. mysql-haskell(A predicate that matches either a space ' ' or horizontal tab '\t' character. mysql-haskell2A predicate that matches either a carriage return '\r' or newline '\n' character. mysql-haskell#Match either a single newline byte '\n'3, or a carriage return followed by a newline byte "\r\n".  +Bryan O'Sullivan 2007-2015, Winterland 2016BSD3drkoster@qq.com experimentalunknown Safe-Inferred"6;!N mysql-haskellParse and decode an unsigned hexadecimal number. The hex digits 'a' through 'f' may be upper or lower case.&This parser does not accept a leading "0x" string. mysql-haskell,Parse and decode an unsigned decimal number. mysql-haskell(Parse a number with an optional leading '+' or '-' sign character. mysql-haskellParse a rational number.6The syntax accepted by this parser is the same as for .Note: this parser is not safe for use with inputs from untrusted sources. An input with a suitably large exponent such as "1e1000000000" will cause a huge  to be allocated, resulting in what is effectively a denial-of-service attack.#In most cases, it is better to use  or  instead. mysql-haskell%Parse a rational number and round to .This parser accepts an optional leading sign character, followed by at least one decimal digit. The syntax similar to that accepted by the . function, with the exception that a trailing '.' or 'e' not& followed by a number is not consumed.%Examples with behaviour identical to : parseOnly double "3" == Right ("",1,3.0) parseOnly double "3.1" == Right ("",3,3.1) parseOnly double "3e4" == Right ("",3,30000.0) parseOnly double "3.1e4" == Right ("",5,31000.0) parseOnly double ".3" == Left (".3",0,"takeWhile1") parseOnly double "e3" == Left ("e3",0,"takeWhile1")Examples of differences from : parseOnly double "3.foo" == Right (".foo",1,3.0) parseOnly double "3e" == Right ("e",1,3.0)This function does not accept string representations of "NaN" or "Infinity". mysql-haskellParse a scientific number.6The syntax accepted by this parser is the same as for . mysql-haskellParse a scientific number and convert to result using a user supply function.6The syntax accepted by this parser is the same as for .Daan Leijen 1999-2001, Bryan O'Sullivan 2007-2015, Winterland 2016BSD3drkoster@qq.com experimentalportable Safe-Inferred"6;3 mysql-haskell Alias to  for attoparsec compatibility. mysql-haskellRun a parser on .This function does not force a parser to consume all of its input. Instead, any residual input will be discarded. To force a parser to consume all of its input, use something like this: "parseOnly (myParser <* endOfInput)  mysql-haskell Similar to , but run a parser on lazy .! mysql-haskellRun a parser on .This function return full parsing results: the rest of input, stop offest and fail message or parsing result.Since: 0.2.1.0" mysql-haskell Similar to !, but run a parser on lazy .Since: 0.2.1.0# mysql-haskellRun a  monad. See  for what to do next, like providing input, handling decoding errors and to get the output value.This's faster than ; becuase it provides an initial chunk rather than feeding  and waiting for chunks, this overhead is noticeable when you're running small getters over short  ByteString s.Since: 0.2.1.0$ mysql-haskell Convert a  value to a  value. A  result is treated as failure.Since: 0.2.3.0% mysql-haskell Convert a  value to an  value. A  result is treated as failure.Since: 0.2.3.0& mysql-haskell(Name the parser, in case failure occurs.' mysql-haskell*Match only if all input has been consumed.( mysql-haskell option x p tries to apply action p. If p6 fails without consuming input, it returns the value x#, otherwise the value returned by p. +priority = option 0 (digitToInt <$> digit)) mysql-haskellCombine two alternatives.* mysql-haskellReturn both the result of a parse and the portion of the input that was consumed while it was being parsed. mysql-haskell A version of 3 that is strict in the result of its first action.+ mysql-haskellmany' p applies the action p zero: or more times. Returns a list of the returned values of p. The value returned by p is forced to WHNF.  word = many' letter, mysql-haskellsome' p applies the action p one: or more times. Returns a list of the returned values of p. The value returned by p is forced to WHNF.  word = some' letter- mysql-haskell sepBy p sep applies zero or more occurrences of p, separated by sep+. Returns a list of the values returned by p. "commaSep p = p `sepBy` (char ','). mysql-haskell sepBy' p sep applies zero or more occurrences of p, separated by sep+. Returns a list of the values returned by p. The value returned by p is forced to WHNF. #commaSep p = p `sepBy'` (char ',')/ mysql-haskell sepBy1 p sep applies one or more occurrences of p, separated by sep+. Returns a list of the values returned by p. #commaSep p = p `sepBy1` (char ',')0 mysql-haskell sepBy1' p sep applies one or more occurrences of p, separated by sep+. Returns a list of the values returned by p. The value returned by p is forced to WHNF. $commaSep p = p `sepBy1'` (char ',')1 mysql-haskellmanyTill p end applies action p zero or more times until action end7 succeeds, and returns the list of values returned by p%. This can be used to scan comments:  simpleComment = string "")(Note the overlapping parsers anyChar and  string "-->". While this will work, it is not very efficient, as it will cause a lot of backtracking.)2 mysql-haskellmanyTill' p end applies action p zero or more times until action end7 succeeds, and returns the list of values returned by p%. This can be used to scan comments:  simpleComment = string "")(Note the overlapping parsers anyChar and  string "-->". While this will work, it is not very efficient, as it will cause a lot of backtracking.)The value returned by p is forced to WHNF.3 mysql-haskell)Skip zero or more instances of an action.4 mysql-haskell(Skip one or more instances of an action.  !"#$%&'()*+,-./01234 !"#$%&'()*+,-./01234&0 Safe-Inferred"6;:5 mysql-haskell A simple connection abstraction.5? s from this package are supposed to have following properties: is choosen to simplify streaming processing. You can easily push back some data with  , reading  will block until GHC IO manager find data is ready, for example:  10244 will block until at least 1024 bytes are available. The type  ->  () is choosen because it worked well with haskell's builder infrastructure.  http://hackage.haskell.org/package/network-2.6.2.1/docs/Network-Socket-ByteString.html#g:2 vector-IO is used automatically when there's more than one chunk to send to save system call.:. field store extra data about the connection,  for example. You can also use this field as a type tag to distinguish different type of connection.9, should close connection resource, thus the 5# shouldn't be used anymore after 9 is called.=You should make sure there's no pending recv/send before you 9 a 5. That means either you call 9 in the same thread you recv/send, or use async exception to terminate recv/send thread before call 9 in other thread(such as a reaper thread). Otherwise you may run into  https://mail.haskell.org/pipermail/haskell-cafe/2014-September/115823.htmlrace-connections.Exception or closed by other peer during recv/send will NOT close underline socket, you should always use 9 with  to ensure safety.7 mysql-haskellreceive data as 8 mysql-haskellsend data with connection9 mysql-haskellclose connection: mysql-haskell extra info5:78965:7896see src/Data/LICENSE experimentalnon-portable (GHC Extensions) Safe-Inferred"6;<&; mysql-haskell24-bit unsigned integer type= mysql-haskell!narrowings represented as primop  in GHC.> mysql-haskellcount leading zeros? mysql-haskellcount trailing zeros@ mysql-haskellthe number of set bitsA mysql-haskellSwap bytes in ;.;<=>?@AB;?@'(c) The University of Glasgow 1997-2002see src/Data/LICENSE experimentalnon-portable (GHC Extensions) Safe-Inferred"6;<R mysql-haskell24-bit signed integer typeRSTRSTPure haskell mysql escape(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;=dede &MySQL packet type and various helpers.(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;@o mysql-haskellYou may get interested in o packet because it provides information about successful operations.q mysql-haskellaffected row numberr mysql-haskelllast insert's IDw mysql-haskellMySQL packet type mysql-haskell Is there more packet to be read? 8https://dev.mysql.com/doc/internals/en/status-flags.html mysql-haskell!Decoding packet inside IO, throw u on fail parsing, here we choose stability over correctness by omit incomplete consumed case: if we successful parse a packet, then we don't care if there're bytes left. mysql-haskelllength encoded int https://dev.mysql.com/doc/internals/en/integer.html#packet-Protocol::LengthEncodedInteger5fihgjnmlkotrqspuvw{zyx|}~5w{zyx|}~uvotrqspjnmlkfihg MySQL field type(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;Dv  mysql-haskellnewtype around  for represent  MySQL_TYPE., We don't use sum type here for speed reason. mysql-haskell-A description of a field (column) of a table. mysql-haskellDatabase for table. mysql-haskell'Table of column, if column was a field. mysql-haskell+Original table name, if table was an alias. mysql-haskellName of column. mysql-haskell"Original column name, if an alias. mysql-haskellCharacter set number. mysql-haskell Width of column (create length). mysql-haskell Div flags. mysql-haskellNumber of decimals in field.?? Text and binary protocol(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;S mysql-haskellUse  to present a bitmap.5When used for represent bits values, the underlining  follows:byteString: head -> tail!bit: high bit -> low bitWhen used as a null-map/present-map, every bit inside a byte is mapped to a column, the mapping order is following:byteString: head -> tailcolumn: left -> right We don't use / here because there maybe more than 64 columns. mysql-haskell:Data type mapping between MySQL values and haskell values.There're some subtle differences between MySQL values and haskell values:MySQL's DATETIME and  TIMESTAMP$ are different on timezone handling:DATETIME and DATE is just a represent of a calendar date, it has no timezone information involved, you always get the same value as you put no matter what timezone you're using with MySQL.MySQL converts TIMESTAMP values from the current time zone to UTC for storage, and back from UTC to the current time zone for retrieval. If you put a TIMESTAMP with timezone A, then read it with timezone B, you may get different result because of this conversion, so always be careful about setting up the right timezone with MySQL, you can do it with a simple SET time_zone = timezone;2 for more info on timezone support, please read =http://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html So we use  to present both DATETIME and  TIMESTAMP", but the local here is different.MySQL's TIME type can present time of day, but also elapsed time or a time interval between two events. TIME values may range from  -838:59:59 to  838:59:59, so ! values consist of a sign and a . whose hour part may exceeded 24. you can use timeOfDayToTime# to get the absolute time interval.Under MySQL >= 5.7, DATETIME,  TIMESTAMP and TIME may contain fractional part, which matches haskell's precision. mysql-haskellDECIMAL, NEWDECIMAL mysql-haskell Unsigned TINY mysql-haskellTINY mysql-haskellUnsigned SHORT mysql-haskellSHORT mysql-haskellUnsigned LONG, INT24 mysql-haskell LONG, INT24 mysql-haskellUnsigned LONGLONG mysql-haskellLONGLONG mysql-haskell IEEE 754 single precision format mysql-haskell IEEE 754 double precision format mysql-haskellYEAR mysql-haskellDATETIME mysql-haskell TIMESTAMP mysql-haskellDATE mysql-haskellsign(0 = non-negative, 1 = negative) hh mm ss microsecond The sign is OPPOSITE to binlog one !!! mysql-haskell"todo: parsing to something meanful mysql-haskellPut  and usigned bit(0x80/0x00) for s. mysql-haskellText protocol decoder mysql-haskellText protocol encoder mysql-haskellText row decoder mysql-haskellBinary protocol decoder mysql-haskellGet a bit sequence as a Word64Since  has a Bits/ instance, it's easier to deal with in haskell. mysql-haskellBinary protocol encoder mysql-haskellBinary row decoder8MySQL use a special null bitmap without offset = 2 here. mysql-haskell)Test if a column is set(binlog protocol).%The number counts from left to right. mysql-haskell*Test if a column is null(binary protocol).%The number counts from left to right. mysql-haskell:Make a nullmap for params(binary protocol) without offset.&& MySQL commands(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;V  mysql-haskellcall  with this packet return true mysql-haskellAll support MySQL commands. mysql-haskell0x01 mysql-haskell0x02 mysql-haskell0x03 mysql-haskell0x0E mysql-haskell90x12 binlog-pos, flags(0x01), server-id, binlog-filename mysql-haskell0x15 server-id, slaves hostname, slaves user, slaves password, slaves port, replication rank(ignored), master-id(usually 0) mysql-haskell0x16 statement mysql-haskell0x17 stmtId, params mysql-haskell 0x19 stmtId mysql-haskell 0x1A stmtId Binlog protocol column meta(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;Y  mysql-haskell>An intermedia date type for decoding row-based event's values. mysql-haskellsize mysql-haskellsize mysql-haskell bits, bytes mysql-haskellfsp mysql-haskellfsp mysql-haskellfsp mysql-haskellprecision, scale mysql-haskell1 or 2( or ), enum index size mysql-haskellbitmap bits, bytes mysql-haskell length size mysql-haskellmeta length(if < 256, then length is 8bit, if > 256 then length is 16bit) mysql-haskell length sizeMySQL Auth Packets(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;Z""Binlog protocol(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;dM mysql-haskell)Data type for representing binlog values.This data type DOES NOT try to parse binlog values into detailed haskell values, because you may not want to waste performance in situations like database middleware.Due to the lack of signedness infomation in binlog meta, we cannot distinguish, for example, between unsigned tiny 255 and tiny -1, so we use int to present TINY,SHORT,INT,LONG$. If you have unsigned columns, use  to convert it to word to get real unsigned value back, for example, 'fromIntegral (-1 :: Int) == 255 :: WordFor above reason, we use R to present MySQL's INT242 type, you can get back the unsigned value using word24 package's Word24 type.Timestamp types( and .) are values converted into UTC already, see  MySQLVaule 's note.4There's also no infomation about charset, so we use  to present both text and blob types, if you want to get text representation back, you have to query column charset infomation, and use icu or iconv to decode. IT MAY NOT BE UTF-8.The SET and ENUM values are presented by their index's value and bitmap respectively, if you need get the string value back, you have to perform a 'DESC tablename' to get the set or enum table. mysql-haskella 64bit bitmap. mysql-haskell%a utc timestamp, note 0 doesn't mean 1970-01-01 00:00:00:, because mysql choose 0 to present '0000-00-00 00:00:00' mysql-haskelllike & with an addtional microseconds field. mysql-haskellYYYY MM DD hh mm ss mysql-haskellYYYY MM DD hh mm ss microsecond mysql-haskell YYYY MM DD mysql-haskell+sign(1= non-negative, 0= negative) hh mm ss mysql-haskell7sign(1= non-negative, 0= negative) hh mm ss microsecond mysql-haskellyear value, 0 stand for '0000' mysql-haskellsign(1= non-negative, 0= negative) integeral part, fractional part mysql-haskellenum indexing value mysql-haskellset indexing 64bit bitmap. mysql-haskellall string and blob values. mysql-haskellBinLog protocol decoder mysql-haskellBinLog row decoder Safe-Inferred"6;j mysql-haskellA type that may be used as a single parameter to a SQL query. Inspired from  mysql-simple. mysql-haskell5Prepare a value for substitution into a query string. mysql-haskellA type to wrap a query parameter in to allow for single and multi-valued parameters.The behavior of ) can be illustrated by following example:  render $ One (MySQLText "hello") = hello render $ Many [MySQLText "hello", MySQLText "world"] = hello, world render $ Many [] = null (So you can now write a query like this: * SELECT * FROM test WHERE _id IN (?, 888)  and use   to fill the hole. There's no equivalent for prepared statement sadly. mysql-haskell Query string type borrowed from  mysql-simple.This type is intended to make it difficult to construct a SQL query by concatenating string fragments, as that is an extremely common way to accidentally introduce SQL injection vulnerabilities into an application.This type is an instance of <, so the easiest way to construct a query is to enable the OverloadedStrings language extension and then simply write the query in double quotes.The underlying type is a , and literal Haskell strings that contain Unicode characters will be correctly transformed to UTF-8.  Binlog event(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;l0 mysql-haskell+This's the query event in row based binlog. mysql-haskellThis's query parser for statement based binlog's query event, it's actually not used in row based binlog. mysql-haskella array indexed by Binlog Event Type - 1 to extract the length of the event specific header. mysql-haskellfor future GTID compatibility mysql-haskell binlog tyoe Safe-Inferred"6;n" Safe-Inferred"6;w/  mysql-haskellThe whole point of TLS is that: a peer should have already trusted some certificates, which can be used for validating other peer's certificates. if the certificates sent by other side form a chain. and one of them is issued by one of  , Then the peer will be trusted. mysql-haskell"provided by your operating system. mysql-haskell provided by  (https://curl.haxx.se/docs/caextract.htmlMozilla. mysql-haskellprovided by your self, the CA file can contain multiple certificates. mysql-haskell#Get the built-in mozilla CA's path. mysql-haskellmake a simple tls  that will validate server and use tls connection without providing client's own certificate. suitable for connecting server which don't validate clients.we defer setting of  to connecting phase.Note, tls's default validating method require server has v3 certificate. you can use openssl's V3 extension to issue such a certificate. or change  before connecting. mysql-haskellmake a simple tls  that will validate server and use tls connection while providing client's own certificate as well. suitable for connecting server which validate clients. Also only accept v3 certificate. mysql-haskellmake a simple tls ) without validating client's certificate. mysql-haskell make a tls + that also validating client's certificate. mysql-haskelltrusted certificates. mysql-haskell"public certificate (X.509 format). mysql-haskellchain certificates (X.509 format). the root of your certificate chain should be already trusted by server, or tls will fail. mysql-haskellprivate key associated. mysql-haskelltrusted certificates. mysql-haskell"public certificate (X.509 format). mysql-haskellchain certificates (X.509 format). the root of your certificate chain should be already trusted by client, or tls will fail. mysql-haskellprivate key associated. mysql-haskell"public certificate (X.509 format). mysql-haskell"chain certificates (X.509 format). mysql-haskellprivate key associated. mysql-haskell7server will use these certificates to validate clients.   Safe-Inferred"6;~  mysql-haskellType alias for tcp connection.Normally you shouldn't use  in :/ directly, this field is intend for used with  if you need to. mysql-haskellThe chunk size used for I/O, less the memory management overhead.Currently set to 32k. mysql-haskell.Initiating an raw TCP connection to the given (HostName,  PortNumber) combination.It use $ to resolve host/service name with ,  hint set, so it should be able to resolve both numeric IPv4/IPv6 hostname and domain name. TCP_NODELAY% are enabled by default. you can use  to adjust. mysql-haskellMake a 5 from a Socket with given buffer size. mysql-haskellConnect to server using . mysql-haskell9Bind and listen on port with a limit on connection count.This function will set  SO_REUSEADDR,  TCP_NODELAY before binding. mysql-haskell9Bind and listen on port with a limit on connection count.Note: The following socket options are inherited by a connected TCP socket from the listening socket: SO_DEBUG SO_DONTROUTE SO_KEEPALIVE SO_LINGER SO_OOBINLINE SO_RCVBUF SO_RCVLOWAT SO_SNDBUF SO_SNDLOWAT TCP_MAXSEG TCP_NODELAY  mysql-haskellAccept a connection with . mysql-haskell,Accept a connection with user customization. mysql-haskellhostname to connect to mysql-haskellport number to connect to mysql-haskellreceive buffer size mysql-haskellsocket address pair mysql-haskellhostname to connect to mysql-haskellport number to connect to mysql-haskellconnection limit mysql-haskell port number mysql-haskell!set socket options before binding mysql-haskellconnection limit mysql-haskell port number mysql-haskell/set socket options, adjust receive buffer, etc.  Connection managment(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;  mysql-haskell4Everything you need to establish a MySQL connection.&To setup a TLS connection, use module Database.MySQL.TLS or Database.MySQL.OpenSSL. mysql-haskell wrap both  and  OutputStream for MySQL w.You shouldn't use one  in different thread, if you do that, consider protecting it with a MVar. mysql-haskell A simple  targeting localhost with  user=root and empty password.Default charset is set to utf8_general_ci to support older(< 5.5.3) MySQL versions, but be aware this is a partial utf8 encoding, you may want to use  instead to support full utf8 charset(emoji, etc.). You can query your server's support with SELECT id, collation_name FROM information_schema.collations ORDER BY id; mysql-haskell with charset set to utf8mb4_unicode_ci9This is recommanded on any MySQL server version >= 5.5.3. mysql-haskellSocket buffer size.maybe exposed to  laster? mysql-haskellEstablish a MySQL connection. mysql-haskell"Establish a MySQL connection with - back, so you can find server's version .etc. mysql-haskellA specialized  here for speed mysql-haskellClose a MySQL connection. mysql-haskellSend a . mysql-haskellSend a  which don't return a resultSet.((Prelude of mysql-haskell(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6; mysql-haskellExecute a MySQL query with parameters which don't return a result-set.#The query may contain placeholders ?, for filling up parameters, the parameters will be escaped before get filled into the query, please DO NOT enable NO_BACKSLASH_ESCAPES, and you should consider using prepared statement if this's not an one shot query. mysql-haskell8Execute a multi-row query which don't return result-set.Leverage MySQL's multi-statement support to do batch insert/update/delete, you may want to use $ to make sure it's atomic, and use sum . map okAffectedRows to get all affected rows count. mysql-haskellExecute multiple querys (without param) which don't return result-set.This's useful when your want to execute multiple SQLs without params, e.g. from a SQL dump, or a table migration plan. mysql-haskell6Execute a MySQL query which don't return a result-set. mysql-haskellExecute a MySQL query which return a result-set with parameters.Note that you must fully consumed the result-set before start a new query on the same , or an : will be thrown. if you want to skip the result-set, use . mysql-haskell version of . mysql-haskell0Execute a MySQL query which return a result-set. mysql-haskell version of . mysql-haskell'Ask MySQL to prepare a query statement. mysql-haskell'Ask MySQL to prepare a query statement.All details from COM_STMT_PREPARE Response are returned: the  packet, params's  , result's . mysql-haskell&Ask MySQL to closed a query statement. mysql-haskellAsk MySQL to reset a query statement, all previous resultset will be cleared. mysql-haskellExecute prepared query statement with parameters, expecting no resultset. mysql-haskellExecute prepared query statement with parameters, expecting resultset. Rules about  applied here too. mysql-haskell version of  mysql-haskellRun querys inside a transaction, querys will be rolled back if exception arise.fighjnmklotrqpsuvw{zxy|}~6uvBinary protocol toolkit(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;. mysql-haskellRow based binlog event type.2It's recommended to enable row query event before , so that you can get  in row based binlog(it's important for detect a table change for example), more information please refer http://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_binlog_rows_query_log_events#sysvar_binlog_rows_query_log_eventsA  is included so that you can roll up your own HA solutions, for example, writing the tracker to zookeeper when you done with an event. The first 8 field is a timestamp present when this event is logged. mysql-haskell0binlog filename and position to start listening. mysql-haskellRegister a pesudo slave to master, although MySQL document suggests you should call this before calling ), but it seems it's not really necessary. mysql-haskellSetup binlog listening on given connection, during listening the connection CAN NOT be used to do query, or an  will be thrown. mysql-haskelldecode row based event from  stream. mysql-haskell1Get latest master's binlog filename and position. mysql-haskell 5.6 mysql-haskellReturn True if rpl_semi_sync_master_enabled = ON. Only for MySQL > 5.5 mysql-haskellconnection to be listened mysql-haskella number for our pesudo slave. mysql-haskellbinlog position mysql-haskellif master support semi-ack, do we want to enable it? if master doesn't support, this parameter will be ignored. mysql-haskell, # contains current binlog filename,  stream. Safe-Inferred"6; mysql-haskellType alias for tls connection.Normally you shouldn't use  in : directly. mysql-haskellMake a 5 from a . mysql-haskell Close a TLS  and its underlying socket. mysql-haskellConvenience function for initiating an TLS connection to the given (HostName,  PortNumber) combination.This operation may throw  on failure. mysql-haskell)Connect to server using TLS and return a 5. mysql-haskellAccept a new TLS connection from remote client with listening socket.This operation may throw  on failure. mysql-haskell$TLS connection / socket address pair mysql-haskellcheck Data.TLSSetting mysql-haskell-Optional certificate subject name, if set to  then we will try to verify HostName as subject name mysql-haskellhostname to connect to mysql-haskellport number to connect to mysql-haskellcheck Data.TLSSetting mysql-haskell-Optional certificate subject name, if set to  then we will try to verify HostName as subject name mysql-haskellhostname to connect to mysql-haskellport number to connect to mysql-haskellcheck Data.TLSSetting mysql-haskellthe listening Socket"TLS support for mysql-haskell via tls package.(c) Winterland, 2016BSDdrkoster@qq.com experimentalPORTABLE Safe-Inferred"6;0 mysql-haskell Provide a 2 and a subject name to establish a TLS connection.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                                                                                                                      W*mysql-haskell-1.1.2-7NEjS0LY31BIXvgvUtGDRZDatabase.MySQL.BaseData.Binary.Parser.Word8Data.Binary.Parser.NumericData.Binary.ParserData.ConnectionData.Word.Word24Data.Int.Int24Database.MySQL.Protocol.EscapeDatabase.MySQL.Protocol.Packet!Database.MySQL.Protocol.ColumnDef"Database.MySQL.Protocol.MySQLValueDatabase.MySQL.Protocol.Command(Database.MySQL.BinLogProtocol.BinLogMetaDatabase.MySQL.Protocol.Auth)Database.MySQL.BinLogProtocol.BinLogValue)Database.MySQL.BinLogProtocol.BinLogEventData.TLSSettingSystem.IO.Streams.TCPDatabase.MySQL.ConnectionDatabase.MySQL.BinLogSystem.IO.Streams.TLSDatabase.MySQL.TLSNSockAddrEbracketDatabase.MySQL.QueryPaths_mysql_haskell)io-streams-1.5.2.2-11ZrhrCfujF7hvYdzB1PRFSystem.IO.Streams.Combinators skipToEof peekMaybepeeksatisfy satisfyWithword8anyWord8 skipWord8skipNtakeTill takeWhile takeWhile1 skipWhile skipSpacesstringscan scanChunksisSpaceisDigit isHexDigitisHorizontalSpace isEndOfLine endOfLine hexadecimaldecimalsignedrationaldouble scientificscientificallyParser parseOnly parseLazy parseDetailparseDetailLazyparse maybeDecoder eitherDecoder endOfInputoptioneitherPmatchmany'some'sepBysepBy'sepBy1sepBy1'manyTill manyTill'skipMany skipMany1 Connectionsourcesendclose connExtraInfoWord24W24# narrow24Word#clz24#ctz24# popCnt24# byteSwap24 byteSwap24#$fStorableWord24$fFiniteBitsWord24 $fBitsWord24 $fReadWord24 $fIxWord24$fBoundedWord24$fIntegralWord24 $fEnumWord24 $fRealWord24 $fNumWord24 $fShowWord24 $fDataWord24$fNFDataWord24 $fEqWord24 $fOrdWord24Int24I24# narrow24Int#$fStorableInt24$fFiniteBitsInt24 $fBitsInt24 $fReadInt24 $fIxInt24$fBoundedInt24$fIntegralInt24 $fEnumInt24 $fRealInt24 $fNumInt24 $fShowInt24 $fDataInt24 $fNFDataInt24 $fEqInt24 $fOrdInt24 escapeText escapeBytesEOF eofWarningCnt eofStatusERRerrCodeerrStateerrMsgOKokAffectedRowsokLastInsertIDokStatus okWarningCntDecodePacketExceptionDecodePacketFailedPacketpLenpSeqNpBody putPacket getPacketisERRisOKisEOF isThereMoredecodeFromPacket getFromPacketencodeToPacket putToPacketgetOKputOKgetERRputERRgetEOFputEOFgetByteStringNulgetRemainingByteStringputLenEncBytesgetLenEncBytes getLenEncInt putLenEncInt putWord24le getWord24le putWord48le getWord48le getWord24be getInt24be getWord40be getWord48be getWord56be$fBinaryPacket $fExceptionDecodePacketException $fBinaryOK $fBinaryERR $fBinaryEOF $fShowEOF$fEqEOF $fShowERR$fEqERR$fShowOK$fEqOK$fShowDecodePacketException $fShowPacket $fEqPacket FieldType ColumnDefcolumnDB columnTablecolumnOrigTable columnNamecolumnOrigName columnCharSet columnLength columnType columnFlagscolumnDecimalsgetFieldputFieldmySQLTypeDecimal mySQLTypeTinymySQLTypeShort mySQLTypeLongmySQLTypeFloatmySQLTypeDouble mySQLTypeNullmySQLTypeTimestampmySQLTypeLongLongmySQLTypeInt24 mySQLTypeDate mySQLTypeTimemySQLTypeDateTime mySQLTypeYearmySQLTypeNewDatemySQLTypeVarChar mySQLTypeBitmySQLTypeTimestamp2mySQLTypeDateTime2mySQLTypeTime2mySQLTypeNewDecimal mySQLTypeEnum mySQLTypeSetmySQLTypeTinyBlobmySQLTypeMediumBlobmySQLTypeLongBlob mySQLTypeBlobmySQLTypeVarStringmySQLTypeStringmySQLTypeGeometry getFieldType putFieldType flagNotNullflagPrimaryKey flagUniqueKeyflagMultipleKeyflagBlob flagUnsigned flagZeroFill flagBinaryflagEnumflagAutoIncrement flagTimeStampflagSetflagNoDefaultValue flagPartKey flagNumeric$fBinaryFieldType$fBinaryColumnDef$fShowColumnDef $fEqColumnDef$fShowFieldType $fEqFieldTypeBitMap fromBitMap MySQLValue MySQLDecimal MySQLInt8U MySQLInt8 MySQLInt16U MySQLInt16 MySQLInt32U MySQLInt32 MySQLInt64U MySQLInt64 MySQLFloat MySQLDouble MySQLYear MySQLDateTimeMySQLTimeStamp MySQLDate MySQLTime MySQLGeometry MySQLBytesMySQLBit MySQLText MySQLNullputParamMySQLType getTextField putTextField getTextRowgetTextRowVectorgetBinaryFieldgetBitsputBinaryField getBinaryRowgetBinaryRowVector isColumnSet isColumnNull makeNullMap $fEqBitMap $fShowBitMap$fShowMySQLValue$fEqMySQLValue$fGenericMySQLValue StmtPrepareOKstmtId stmtColumnCnt stmtParamCnt stmtWarnCntCommandCOM_QUIT COM_INIT_DB COM_QUERYCOM_PINGCOM_BINLOG_DUMPCOM_REGISTER_SLAVECOM_STMT_PREPARECOM_STMT_EXECUTECOM_STMT_CLOSECOM_STMT_RESETCOM_UNSUPPORTEDStmtID putCommandgetStmtPrepareOK$fShowStmtPrepareOK$fEqStmtPrepareOK $fShowCommand $fEqCommand BinLogMetaBINLOG_TYPE_TINYBINLOG_TYPE_SHORTBINLOG_TYPE_INT24BINLOG_TYPE_LONGBINLOG_TYPE_LONGLONGBINLOG_TYPE_FLOATBINLOG_TYPE_DOUBLEBINLOG_TYPE_BITBINLOG_TYPE_TIMESTAMPBINLOG_TYPE_DATETIMEBINLOG_TYPE_DATEBINLOG_TYPE_TIMEBINLOG_TYPE_TIMESTAMP2BINLOG_TYPE_DATETIME2BINLOG_TYPE_TIME2BINLOG_TYPE_YEARBINLOG_TYPE_NEWDECIMALBINLOG_TYPE_ENUMBINLOG_TYPE_SETBINLOG_TYPE_BLOBBINLOG_TYPE_STRINGBINLOG_TYPE_GEOMETRY getBinLogMeta$fShowBinLogMeta$fEqBinLogMeta SSLRequest sslReqCapssslReqMaxPacket sslReqCharsetAuthauthCaps authMaxPacket authCharsetauthName authPassword authSchemaGreetinggreetingProtocolgreetingVersiongreetingConnId greetingSalt1 greetingCapsgreetingCharsetgreetingStatus greetingSalt2greetingAuthPlugin putGreeting getGreetinggetAuthputAuth getSSLRequest putSSLRequest clientCapclientMaxPacketSize supportTLS sslRequest$fBinaryGreeting $fBinaryAuth$fBinarySSLRequest$fShowSSLRequest$fEqSSLRequest $fShowAuth$fEqAuth$fShowGreeting $fEqGreeting BinLogValue BinLogTiny BinLogShort BinLogInt24 BinLogLongBinLogLongLong BinLogFloat BinLogDouble BinLogBitBinLogTimeStampBinLogTimeStamp2BinLogDateTimeBinLogDateTime2 BinLogDate BinLogTime BinLogTime2 BinLogYearBinLogNewDecimal BinLogEnum BinLogSet BinLogBytesBinLogGeometry BinLogNullgetBinLogFieldgetMicroSecondgetBits' getBinLogRow$fShowBinLogValue$fEqBinLogValue$fGenericBinLogValueWrongParamsCount QueryParamrenderParamOneManyQuery fromQuery renderParamsUpdateRowsEvent updateTableId updateFlagsupdateColumnCntupdatePresentMap updateRowDataWriteRowsEvent writeTableId writeFlagswriteColumnCntwritePresentMap writeRowDataDeleteRowsEvent deleteTableId deleteFlagsdeleteColumnCntdeletePresentMap deleteRowData TableMapEvent tmTableIdtmFlags tmSchemaName tmTableName tmColumnCnt tmColumnType tmColumnMeta tmNullMap QueryEvent'qQuery' QueryEvent qSlaveProxyId qExecTimeqErrCode qStatusVars qSchemaNameqQuery RotateEventrPos rFileNameFormatDescription fdVersionfdMySQLVersion fdCreateTimefdEventHeaderLenVector BinLogPacket blTimestamp blEventType blServerId blEventSizeblLogPosblFlagsblBody blSemiAckBinLogEventTypeBINLOG_UNKNOWN_EVENTBINLOG_START_EVENT_V3BINLOG_QUERY_EVENTBINLOG_STOP_EVENTBINLOG_ROTATE_EVENTBINLOG_INTVAR_EVENTBINLOG_LOAD_EVENTBINLOG_SLAVE_EVENTBINLOG_CREATE_FILE_EVENTBINLOG_APPEND_BLOCK_EVENTBINLOG_EXEC_LOAD_EVENTBINLOG_DELETE_FILE_EVENTBINLOG_NEW_LOAD_EVENTBINLOG_RAND_EVENTBINLOG_USER_VAR_EVENTBINLOG_FORMAT_DESCRIPTION_EVENTBINLOG_XID_EVENTBINLOG_BEGIN_LOAD_QUERY_EVENTBINLOG_EXECUTE_LOAD_QUERY_EVENTBINLOG_TABLE_MAP_EVENTBINLOG_WRITE_ROWS_EVENTv0BINLOG_UPDATE_ROWS_EVENTv0BINLOG_DELETE_ROWS_EVENTv0BINLOG_WRITE_ROWS_EVENTv1BINLOG_UPDATE_ROWS_EVENTv1BINLOG_DELETE_ROWS_EVENTv1BINLOG_INCIDENT_EVENTBINLOG_HEARTBEAT_EVENTBINLOG_IGNORABLE_EVENTBINLOG_ROWS_QUERY_EVENTBINLOG_WRITE_ROWS_EVENTv2BINLOG_UPDATE_ROWS_EVENTv2BINLOG_DELETE_ROWS_EVENTv2BINLOG_GTID_EVENTBINLOG_ANONYMOUS_GTID_EVENTBINLOG_PREVIOUS_GTIDS_EVENTputSemiAckRespgetBinLogPacketgetFromBinLogPacketgetFromBinLogPacket'getFormatDescriptioneventHeaderLengetRotateEvent getQueryEventgetQueryEvent'getTableMapEventgetDeleteRowEventgetWriteRowEventgetUpdateRowEvent getPresentMap$fShowUpdateRowsEvent$fEqUpdateRowsEvent$fGenericUpdateRowsEvent$fShowWriteRowsEvent$fEqWriteRowsEvent$fGenericWriteRowsEvent$fShowDeleteRowsEvent$fEqDeleteRowsEvent$fGenericDeleteRowsEvent$fShowTableMapEvent$fEqTableMapEvent$fGenericTableMapEvent$fShowQueryEvent'$fEqQueryEvent'$fShowQueryEvent$fEqQueryEvent$fGenericQueryEvent$fShowRotateEvent$fEqRotateEvent$fShowFormatDescription$fEqFormatDescription$fGenericFormatDescription$fShowBinLogPacket$fEqBinLogPacket$fShowBinLogEventType$fEqBinLogEventType$fEnumBinLogEventTypeTrustedCAStore SystemCAStoreMozillaCAStore CustomCAStoremozillaCAStorePathmakeClientParamsmakeClientParams'makeServerParamsmakeServerParams'$fShowTrustedCAStore$fEqTrustedCAStore TCPConnectiondefaultChunkSize connectSocketsocketToConnectionconnect bindAndListenbindAndListenWithaccept acceptWithUnexpectedPacket ERRExceptionUnconsumedResultSetNetworkException ConnectInfociHostciPort ciDatabaseciUser ciPassword ciCharset MySQLConn mysqlRead mysqlWritemysqlCloseSocket isConsumeddefaultConnectInfodefaultConnectInfoMB4utf8_general_ciutf8mb4_unicode_cibUFSIZE connectDetailmkAuthdecodeInputStreampingcommandwaitCommandReplywaitCommandReplys readPacket writeCommandguardUnconsumed writeIORef'$fExceptionNetworkException$fExceptionUnconsumedResultSet$fExceptionERRException$fExceptionUnexpectedPacket$fShowUnexpectedPacket$fShowERRException$fShowUnconsumedResultSet$fShowNetworkException$fShowConnectInfoexecute executeMany executeMany_execute_query queryVectorquery_ queryVector_ prepareStmtprepareStmtDetail closeStmt resetStmt executeStmt queryStmtqueryStmtVectorwithTransactionRowBinLogEvent RowQueryEventRowDeleteEvent RowWriteEventRowUpdateEvent BinLogTracker btFileName btNextPosSlaveIDregisterPesudoSlave dumpBinLogdecodeRowBinLogEventgetLastBinLogTrackerisCheckSumEnabledisSemiSyncEnabled$fShowRowBinLogEvent$fEqRowBinLogEvent$fGenericRowBinLogEvent$fShowBinLogTracker$fEqBinLogTracker$fGenericBinLogTracker TLSConnectiontLsToConnection connectTLSbase GHC.MaybeNothingghc-prim GHC.TypesTruebinary-0.8.9.0Data.Binary.GetskipFalsebytestring-0.11.3.1Data.ByteString.Internal ByteStringGHC.WordWord8 ghc-bignumGHC.Num.IntegerIntegerDouble Text.ReadreadData.Binary.Get.InternalGetData.ByteString.Lazy.InternalDecoderrunGetIncrementalemptyMaybePartial Data.EitherEitherliftM2'GHC.BaseliftM2DoneFail ByteOffset runGetState runGetOrFailrunGetpushEndOfInput pushChunks pushChunk getWordhostgetWord8 getWord64le getWord64host getWord64be getWord32le getWord32host getWord32be getWord16le getWord16host getWord16begetRemainingLazyByteStringgetLazyByteStringNulgetLazyByteString getInthostgetInt8 getInt64le getInt64host getInt64be getInt32le getInt32host getInt32be getInt16le getInt16host getInt16be getFloatle getFloathost getFloatbe getDoublele getDoublehost getDoublebe remaining lookAheadM lookAheadE lookAheadlabelisolateisEmptygetBytes getByteString bytesReadSystem.IO.Streams.Internal InputStreamunReadSystem.IO.Streams.ByteString readExactlyIOGHC.Primand#GHC.IntInt64 time-1.11.1.1&Data.Time.LocalTime.Internal.LocalTime LocalTime&Data.Time.LocalTime.Internal.TimeOfDay TimeOfDayWord64Word16GHC.Real fromIntegral Data.StringIsStringversiongetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDir tls-1.7.1-1ep4OR4DuN24fPSDTGE0QENetwork.TLS.Parameters ClientParamsclientServerIdentification ServerParams%network-3.1.4.0-B2siKM4RZ608EJIWCrOTuNetwork.Socket.TypesSocketNetwork.Socket.OptionssetSocketOptionNetwork.Socket.Info getAddrInfo AI_ADDRCONFIGAI_NUMERICSERV&vector-0.13.0.0-JKrBPPZBIK2JBM2KZEUb7Z Data.VectorVectorWord32 GHC.IORefIORefNetwork.TLS.Context.InternalContextcloseTLSNetwork.TLS.Struct TLSException