... is the title of my session at the MySQL Conf 2009

I'll unveal the full thing at the session at next week Tuesday, but for now let me show you this:

local f = binlog.open("my-binlog", "w")
f:append({       
    server_id = 1,
    type = "INCIDENT_EVENT",
    incident = {
        incident = 42,
        message = "The answer"
    }       
})
f:close()

... gives me:

$ mysqlbinlog my-binlog
...
#090415 12:02:32 server id 1  end_log_pos 350 
# Incident: U‰åƒì‹E‰uø‹‰}ü‹}
                        ‰D‹E‰D$‹F‰$ègö# at 350
...

What ever I did: I can break mysqlbinlog :)

Hint: the above is lua code. A working encoder/decoder for binlogs with a c-library and a lua-wrapper on top.

If you have some ideas what this could be useful for add it as comment to this article and let's see what I can show at the MySQL Conf.

1 Response to “MySQL Proxy: meets binlogs - sneak peek I”

  1. Isotopp Says:
    The following components are needed: 1. A component that logs into a 5.0 server and asks for binlog events to download. 2. A component that actually fetches these events and stores them in a proxy owned relaylog file. 1 and 2 need to work asynchronously or multithreaded. 3. A component that parses multiple of these binlog files in timestamp order (merge-sorting events) 4. A component that filters these events and resolves conflicts. 5. A component that pushes the filtered events into a a single remote server as SQL source. 6. A component that checks the pushed SQL for errors and resolves even more conflicts. Multi-master-replication with no distributed locking (so conflicts can arise, and need to be solved by custom rules), as a component external to the server, and running on an external host.

Sorry, comments are closed for this article.