Copyright | (c) Winterland, 2016 |
---|---|
License | BSD |
Maintainer | drkoster@qq.com |
Stability | experimental |
Portability | PORTABLE |
Safe Haskell | None |
Language | Haskell2010 |
Binlog event type
- data BinLogEventType
- = BINLOG_UNKNOWN_EVENT
- | BINLOG_START_EVENT_V3
- | BINLOG_QUERY_EVENT
- | BINLOG_STOP_EVENT
- | BINLOG_ROTATE_EVENT
- | BINLOG_INTVAR_EVENT
- | BINLOG_LOAD_EVENT
- | BINLOG_SLAVE_EVENT
- | BINLOG_CREATE_FILE_EVENT
- | BINLOG_APPEND_BLOCK_EVENT
- | BINLOG_EXEC_LOAD_EVENT
- | BINLOG_DELETE_FILE_EVENT
- | BINLOG_NEW_LOAD_EVENT
- | BINLOG_RAND_EVENT
- | BINLOG_USER_VAR_EVENT
- | BINLOG_FORMAT_DESCRIPTION_EVENT
- | BINLOG_XID_EVENT
- | BINLOG_BEGIN_LOAD_QUERY_EVENT
- | BINLOG_EXECUTE_LOAD_QUERY_EVENT
- | BINLOG_TABLE_MAP_EVENT
- | BINLOG_WRITE_ROWS_EVENTv0
- | BINLOG_UPDATE_ROWS_EVENTv0
- | BINLOG_DELETE_ROWS_EVENTv0
- | BINLOG_WRITE_ROWS_EVENTv1
- | BINLOG_UPDATE_ROWS_EVENTv1
- | BINLOG_DELETE_ROWS_EVENTv1
- | BINLOG_INCIDENT_EVENT
- | BINLOG_HEARTBEAT_EVENT
- | BINLOG_IGNORABLE_EVENT
- | BINLOG_ROWS_QUERY_EVENT
- | BINLOG_WRITE_ROWS_EVENTv2
- | BINLOG_UPDATE_ROWS_EVENTv2
- | BINLOG_DELETE_ROWS_EVENTv2
- | BINLOG_GTID_EVENT
- | BINLOG_ANONYMOUS_GTID_EVENT
- | BINLOG_PREVIOUS_GTIDS_EVENT
- data BinLogPacket = BinLogPacket {
- blTimestamp :: !Word32
- blEventType :: !BinLogEventType
- blServerId :: !Word32
- blEventSize :: !Word32
- blLogPos :: !Word64
- blFlags :: !Word16
- blBody :: !ByteString
- blSemiAck :: !Bool
- putSemiAckResp :: Word32 -> ByteString -> Put
- getBinLogPacket :: Bool -> Bool -> Get BinLogPacket
- getFromBinLogPacket :: Get a -> BinLogPacket -> IO a
- getFromBinLogPacket' :: (BinLogEventType -> Get a) -> BinLogPacket -> IO a
- data FormatDescription = FormatDescription {}
- getFormatDescription :: Get FormatDescription
- eventHeaderLen :: FormatDescription -> BinLogEventType -> Word8
- data RotateEvent = RotateEvent {
- rPos :: !Word64
- rFileName :: !ByteString
- getRotateEvent :: Get RotateEvent
- data QueryEvent = QueryEvent {
- qSlaveProxyId :: !Word32
- qExecTime :: !Word32
- qErrCode :: !Word16
- qStatusVars :: !ByteString
- qSchemaName :: !ByteString
- qQuery :: !Query
- getQueryEvent :: Get QueryEvent
- data QueryEvent' = QueryEvent' {}
- getQueryEvent' :: Get QueryEvent'
- data TableMapEvent = TableMapEvent {
- tmTableId :: !Word64
- tmFlags :: !Word16
- tmSchemaName :: !ByteString
- tmTableName :: !ByteString
- tmColumnCnt :: !Int
- tmColumnType :: ![FieldType]
- tmColumnMeta :: ![BinLogMeta]
- tmNullMap :: !ByteString
- getTableMapEvent :: FormatDescription -> Get TableMapEvent
- data DeleteRowsEvent = DeleteRowsEvent {
- deleteTableId :: !Word64
- deleteFlags :: !Word16
- deleteColumnCnt :: !Int
- deletePresentMap :: !BitMap
- deleteRowData :: ![[BinLogValue]]
- getDeleteRowEvent :: FormatDescription -> TableMapEvent -> BinLogEventType -> Get DeleteRowsEvent
- data WriteRowsEvent = WriteRowsEvent {
- writeTableId :: !Word64
- writeFlags :: !Word16
- writeColumnCnt :: !Int
- writePresentMap :: !BitMap
- writeRowData :: ![[BinLogValue]]
- getWriteRowEvent :: FormatDescription -> TableMapEvent -> BinLogEventType -> Get WriteRowsEvent
- data UpdateRowsEvent = UpdateRowsEvent {
- updateTableId :: !Word64
- updateFlags :: !Word16
- updateColumnCnt :: !Int
- updatePresentMap :: !(BitMap, BitMap)
- updateRowData :: ![([BinLogValue], [BinLogValue])]
- getUpdateRowEvent :: FormatDescription -> TableMapEvent -> BinLogEventType -> Get UpdateRowsEvent
- getPresentMap :: Int -> Int -> Get BitMap
Documentation
data BinLogEventType Source
binlog tyoe
data BinLogPacket Source
BinLogPacket | |
|
putSemiAckResp :: Word32 -> ByteString -> Put Source
getBinLogPacket :: Bool -> Bool -> Get BinLogPacket Source
getFromBinLogPacket :: Get a -> BinLogPacket -> IO a Source
getFromBinLogPacket' :: (BinLogEventType -> Get a) -> BinLogPacket -> IO a Source
data FormatDescription Source
FormatDescription | |
|
data RotateEvent Source
RotateEvent | |
|
getRotateEvent :: Get RotateEvent Source
data QueryEvent Source
This's query parser for statement based binlog's query event, it's actually not used in row based binlog.
QueryEvent | |
|
getQueryEvent :: Get QueryEvent Source
getQueryEvent' :: Get QueryEvent' Source
data TableMapEvent Source
TableMapEvent | |
|
getTableMapEvent :: FormatDescription -> Get TableMapEvent Source
data DeleteRowsEvent Source
DeleteRowsEvent | |
|
getDeleteRowEvent :: FormatDescription -> TableMapEvent -> BinLogEventType -> Get DeleteRowsEvent Source
data WriteRowsEvent Source
WriteRowsEvent | |
|
getWriteRowEvent :: FormatDescription -> TableMapEvent -> BinLogEventType -> Get WriteRowsEvent Source
data UpdateRowsEvent Source
UpdateRowsEvent | |
|
getUpdateRowEvent :: FormatDescription -> TableMapEvent -> BinLogEventType -> Get UpdateRowsEvent Source
getPresentMap :: Int -> Int -> Get BitMap Source