Archive

Archive for February, 2009

Next Mission, Pluggable SQL Parser

February 25th, 2009

Lately I’ve been fairly busy tackling bugs in Drizzle that I wanted to fix before we start rolling out tarballs which should be announced by the community soon. I’ve now committed fixes for those bugs so I am going to spend the spare time I’ve gained on something else, namely making the SQL parser pluggable.

It is a known fact that most of the time spent in processing a query in MySQL and Drizzle is in the SQL parser and naturally, many people are eager to improve it. For example, take a look at this blog post by Jay on how the current parser is expensive.

When people approach me about Drizzle in Japan, most people seem to request a pluggable query parser as well, simply because they know that it can be improved. So it makes sense for Drizzle, as a project to provide a easy way to improve the damn thing without forcing the developers to study extra things like server architecture and concurrency control (though it’s nice to know these things!).

The first version is going to be very simple. Everything behind the current entry point of the SQL Parser will be modularized and pushed out from the core, leaving only the plugin hook. Ultimately, a parser module will only have to do the following:

  • Check if the given SQL string is malicious
  • Process/Parse the given SQL string
  • Update/Populate the Session object (known as THD in MySQL)

As for the interface, I’m suspecting that it will remain the same as the mysql_parse() function :

bool sql_parse(Session *session, const char *query, const size_t query_len,
               const char **found_semicolon);

But I can’t say for sure at this stage of course. Also as mentioned by Brian, we ideally need a multi-stage interface that will take care of parser failure, which I’m hoping to introduce in the second version.

This task is really high in my priority queue so hopefully this entry will help pressure me into concentrating on it (I’m terrible at this since I tend to hop between OSS projects).

My goal is to get the first version done by the MySQL Conference in Santa Clara, CA in april.

Toru Maesaka drizzle, oss , ,

First attempt at the HDR imaging technique

February 17th, 2009

A while back when I accidentally came across an HDR image on Flickr, I was stunned. Ever since, I’ve wanted to create one myself but never actually got around to it until last weekend:

My first ever HDR Image

Admittedly, this is not a “pure” HDR image since a proper HDR image is rendered by combining multiple shots of the same subject with different exposure. The photographer then tweaks the luminance related parameters of the base HDR image until the desired effect is achieved (more on wikipedia).

The photo you see above is created from a single RAW image. I created three images with different exposures from the original image then generated the base HDR image. The software I used to create and tune the HDR image is called Photomatix Pro, which btw is fantastically easy to use.

So yeah, this is not quite the real thing but I’m pretty happy with it for my first HDR work :)

Fun!

Toru Maesaka photography ,