Subscribe to RSS Subscribe to Comments

My So-Called Blog

No Silver Bullet

Giuseppe Maxia’s new article at the MySQL DevZone rightly points out that using partitions doesn’t work by magic; as with any other enhancement, it requires a bit of know-how to realise its value. MySQL 5.1 Partitions in Practice reviews some of the basics and points out a few gotchas (if you want to partition on a DATE or DATETIME column, pay close attention here). He then provides some realistic examples showing how you actually get partition pruning working for your queries and backs it up with some interesting performance figures.

On a related note, I recently reorganised the MySQL Manual’s discussion of functions in partitioning expressions to get rid of the multiple listings (at Giuseppe’s behest). Now there’s a single Supported Functions list, which we hope you’ll find less confusing and more useful. forex.com pk

XML Article on MySQL DevZone

I’ve written an article highlighting some recent developments with XML support in MySQL 5.1 and MySQL 6.0. Topics include:

  • Outputting MySQL data in XML format; includes a look at the 3rd-party lib_mysqludf_xql library
  • Getting XML into MySQL; includes a discussion of the LOAD XML statement (new in MySQL 6.0)
  • The ExtractValue() and UpdateXML() functions (new in MySQL 5.1)
  • Security issues, including a look at a little nasty known as “XPath injection”

You can read it at the MySQL Developer Zone.

Alexander Barkov contributed a nifty stored procedure and a very helpful pre-publication review. Thanks, Bar!

ISBN 978-1-8479-9168-3

A little over a year since the project to write this book began, the MySQL 5.1 Cluster Certification Study Guide is now at long last available. It covers everything you’ll need to know to pass the Certified MySQL Cluster 5.1 Database Administrator exam, including MySQL Cluster Concepts, Architecture, Configuration, Deployment, NDB Internals basics, High Availability techniques, Security Issues, and more.

(It does not cover MySQL Cluster 5.1 Carrier Grade Edition, for the simple reason that MCCGE features are not part of the official mainline MySQL 5.1 release. However, those features will be part of MySQL 6.0 [yes, MySQL 6.0 is already starting to happen, and there are already some cool new Cluster, Replication, and XML features in the 6.0 tree, but I’m starting to get off-topic here…], and there’s a good chance that there will be a 6.0 version of the certification course and book in a year or so.) earn bitcoin in pakistan

In addition to yours truly, the authors include NDB developer Stewart Smith, Pro MySQL author Mike Kruckenberg, and MySQL training course developer (and former MySQL certification exam developer) Roland Bouman. Roland also helped me edit and index. (Did I mention that this is my first official Editor credit? Yay.)

You can order your copy here, and still have time to read it and then get certified on MySQL 5.1 Cluster before MySQL 5.1 is GA.

XPath Variables in MySQL 5.1.20

A few days ago, Alexander Barkov pushed some changes to the MySQL 5.1 tree that I’ve been waiting to see for some time — variable support for XPath functions used with ExtractValue() and UpdateXML(). (This was a fix for Bug #26518, BTW.) This will be available in MySQL 5.1.20 (or grab the MySQL 5.1 source from bkbits and build it yourself, if you just can’t wait).

Two slightly different notations are supported, depending on the context, and what sort of checking you want done on the values:

  1. If you don’t want or need type checking, prefix the variable name with $@, like this: $@myvar. However, if you do this, and you make a typo, you’re on your own.
  2. To make use of strict checking inside routines, leave off the @ sign, like this: $myvar.

This may not seem like a lot, but it greatly expands the usefulness of MySQL 5.1’s XML functions:

  • You should now be able to import XML that uses practically any format into MySQL easily.
  • This also makes it much easier to filter for specific rows/columns (or filter out unwated ones).
  • You can easily do preprocessing with MySQL string functions like CONCAT(), REPLACE(), TRIM(), etc.

I’ve not yet had time to play with this and come up with some good examples for the Manual, but I’m really looking forward to doing so. Keep an eye out for them in the XML Functions section of the Manual.

Houses In Motion (I)

Hej hej from Stockholm where I arrived about two weeks ago for a fun-filled two four six weeks of meetings and face-to-face contact with the MySQL Cluster developers. And the chance to check things out when it’s not 2°C and raining, all the time, as it was when I was here in November and December of 2005. (This week, it’s 12°C and kind of misty.)

The last five or six weeks have been pretty hectic, and this evening (it’s just after 10 PM local time as I write this) represents the first time in that span that I’ve actually had time that’s not been planned out for me in one way or another. At the end of April, I moved out of my place in Brisbane and stuffed all my gear into storage in Coffs Harbour, New South Wales, where I rented a post office box that now constitutes my sole legal address for the duration.

That last sentence is actually shorthand for “Two 1,000-km round trips between Brisbane and Coffs in a rented truck loaded with furniture (and unloaded again), mostly by me, costing me about 2 grand and not inconsiderable wear and tear on and protestations from portions of my anatomy whose existence I’d been hitherto unaware of”. When I arrived in Australia just shy of five years ago, I had a rucksack and a couple of carry bags. Where did all that crap come from? By the time I got it all hauled and stored, I found myself wishing that I’d just set it all out in the street and taken a match to the whole lot. I then went back to my empty townhouse and spent a few days cleaning up the place. On the 8th of May, I turned in the keys and headed south to spend a few days with Elly before zipping off overseas. I took my first ever ride in a propellor-driven plane on a rainy and foggy Friday morning (11 May); we took off just before dawn, and I was hoping fervently that the pilot could tell which way was up, since I myself couldn’t really tell. I was pleasantly surprised to land alive and unscathed in Sydney a couple of hours later for my overseas connection. Five years and about a thousand exchanges of “You live in Australia? What’s Sydney like?”–”Dunno, never been there” after coming to Oz, I can now instead say, “Well… It’s a big bloody city with a big bloody airport”. I was there for about 3 hours.

My first post-Australia stop was Hong Kong, where I spent a few days on holiday, in the company of my friend Mei Ching, who acted as my guide and translator. It was nice to see her again. Fortunately, she place she picked for me to stay was in Kowloon and not downtown, where the air pollution was just ghastly. One day, we went up to The Peak and spent the day walking through the park, which wraps around the mountain just below the top. We also visited the temple and gardens at Nan Liang, which is quite a nice place, as well as the Temple of Wong Sai Tin (I will not reveal here what I wished for there, but I’ll be quite surprised if it comes to pass).

Of course, I couldn’t visit Hong Kong and not see the Big Buddha, all (nearly) 100 metres of it. The theme park village and religious prsentations were a little on the commercial/cheesy side; on the other hand, I can’t knock the proprietors for trying to spread the good word of the Lord Buddha. I nearly had my hand squeezed right off during the skycar ride up to the site; Mei hadn’t told me beforehand that she’s quite afraid of heights. I got the chance to pay my respects in the temple at Po Lin Monastery, and we also got some excellent vegetarian fare afterwards in the monastery’s cafeteria.

I made a couple of interesting acquaintances while I was there, including a cab driver who claimed that (over the course of a 30-minute taxi ride, yet) I’d taught him something new about the teachings of the Lord Buddha, and who insisted on giving me a book I’ll likely not be able to learn how to read if I live to be a hundred and fifty. I’m still figuring that one out.

On the 16th, I bade Mei and the Hong Kong Special Autonomous region farewell. I quite enjoyed my stay there — I might have to stop over again on my way back to Oz. I’ll post some photos soon.

[To be continued…]

What, No Binaries?

Some people have been saying that MySQL will not provide any more binary releases for its Community users, and that from now on you’ll have to build from source or pay up. Say it ain’t so!

It ain’t so.

Yes, it’s true that MySQL 5.0.33-community is a source-only release. invest in Coca Cola shares in Pakistan However, this does not mean that all future MySQL Community Server releases will be source-only! In fact, we are planning another (probably 5.0.35) Community release in the near future, that will include binaries that you can download from dev.mysql.com/downloads, same as always.

But don’t take my word for it, when you can read for yourself what Kaj Arnö has to say about it.
(Read the article)

Christmas 2006 Photos

…have been posted in the gallery section. Fans everywhere of the Divine Miss “E” will rejoice. :)

A Very Good Year

Two weeks into the New Year, and four weeks since I got back from Thailand, I finally get round to updating this thing. By “updating”, I don’t just mean posting. Gojira the One-Lung Webserver has had an overhaul as well: I’ve added some more RAM, caught up with the last couple of months’ worth of Windows 2000 patches, updated to the latest versions of PHP, MySQL, WordPress, and Cygwin. (Tip: If you’re running PHP and MySQL on Windows, be sure to get rid of the libMySQL.dll that comes with PHP — because it’s crap — and to use the version that comes with MySQL instead.)

So… 2006 was a pretty decent year, with a number of positive changes:

(Read the article)

Is It Soup Yet?

Over the last two days, I’ve deleted about a dozen comments from the MySQL Manual — and received emails from about a dozen friends — all asking the same question: “When will 5.0.26 and/or 5.1.12 be released?”

Here’s how I answer the emails: “Even if I knew for sure… I could tell you, but then I’d have to kill you“.

If you’re looking for a sure source of insider info, maybe you need to look into actually being on the inside. Get yourself one of those jobs, and you’ll know what I do - maybe even more.

All I can say is that 5.0.26 will very definitely happen Real Soon Now™, and 5.1.12 shouldn’t be far behind.

In the meantime… keep watching those mirrors.

More Photos: Around The “Neighbourhood”

Wat TaiI’ve just uploaded some more pictures to the Gallery. I’ve taken these over the last three or four weeks at the hotel where I’ve been staying (The Bedrooms on Sukhumvit 77 Soi On-Nut) and its immediate environs. This is a really nice place, and if you’re looking for accomodation for the medium to long term, I highly recommend it.

Here’s a direct link that opens in a new window, and without the inline frame, because I made the reductions too … well, not quite reduced enough to fit in the frameset very well.

The photo on the right is Wat Tai, just down the street from here, as seen from a bridge over Soi On-Nut.

Next Page »

MySQL 5.0.45-communityPHP 5.2.3