This library parses a MySQL binary log in pure Ruby and produces hashes as output, much like the following Query
event:
{:type=>:query_event,
:position=>107,
:filename=>"mysql-bin.000001",
:header=>
{:event_type=>2,
:server_id=>1,
:flags=>[],
:event_length=>117,
:timestamp=>1340414127,
:next_position=>224},
:event=>
{:thread_id=>1,
:query=>"create table a (id int, a char(100), primary key (id))",
:status=>
{:sql_mode=>0,
:charset=>
{:character_set_client=>
{:character_set=>:utf8, :collation=>:utf8_general_ci},
:collation_connection=>
{:character_set=>:utf8, :collation=>:utf8_general_ci},
:collation_server=>
{:character_set=>:latin1, :collation=>:latin1_swedish_ci}},
:flags2=>[],
:catalog=>"std"},
:elapsed_time=>0,
:error_code=>0,
:db=>"test"}}
All event types can be read, but may not be parsed, as not all event types are currently fully supported. Over time this will improve. The current status of event support is documented below.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4