August, 1, 2006 archives
new-style mysql authentication in pure ruby
ruby has two modules for connecting to mysql. one is called mysql/ruby and is built in top of the standard libmysqlclient
c library. the other is called ruby/mysql and is pure ruby. the problem with the latter is that it is a from-scratch implementation of the mysql network protocol, and the authentication handshake changed in mysql 4.1.
but here is a patch to add support for new-style mysql authentication to ruby/mysql. it should also deal with the other protocol changes that came along at the same time. it doesn’t do anything to expose server-side prepared statements.
it is only lightly tested. in particular, i haven’t tried to connect to a pre-4.1 version of the server. it should still work, but it is entirely possible i screwed it up. i’m also still just learning ruby, so there are some ugly bits.
i think having more from-scratch implementations of the protocol is a good thing. there’s at least five — the server code itself (and client library), connector/j, connector/net, ruby/mysql, and Net::MySQL (perl). once we have these all collected into an integration test suite, the server developers will get much better feedback when they go off the reservation with the protocol.
movin’ on up
my fiancée celia and i weren’t really planning on finding a new place to live together until after our wedding, but sometimes opportunity knocks and you’re smart enough to answer.
our friend adam has quit his job and is about to embark on an around-the-world tour (starting in rarotonga and including a bunch of other amazing stops — and hopefully he’ll be blogging the whole thing). that meant the lease on his amazing penthouse was ripe for a friendly takeover. that’s the site of our engagement party and where celia and i first met, so this space that was already very special to us will also be home.
we’ve already been daydreaming about how we want to make use of all of the space we’ll have. but first we have to take care of a few practical needs, like a refrigerator.
one other wrinkle is that my lease in my current loft isn’t actually up until the end of october, so i may end up paying rent on two places for a couple of months unless i can find someone to take over here. if you want a view like this, let me know.