While helping a user with some questions about the geospatial extensions of MySQL on the #mysql-dev IRC channel on Freenode, I stumbled over this blog: How to use MySQL Spatial Extensions. There currently is just one post, but it was exactly what we were looking for: "Using Circular Area Selection". Nice work! I hope the author will soon provide more examples of how to make use of this functionality.
By the way, there is work in progress to improve the GIS functionality in MySQL - if you are looking for new GIS functions that do not use MBRs, take a look at our GIS feature preview on the MySQL Forge. We plan to publish a new set of preview binaries once the 5.1.23 release has been published and merged into this code base.
Just a short reminder: the Hamburg MySQL Meetup Group will meet next week, on Monday the 4th of February! As usual, there will be a MySQL-related talk - this time I will use this opportunity to practice my talk about "Performing MySQL Backups using LVM Snapshots" that I will present at the upcoming MySQL Conference & Expo 2008 in Santa Clara, CA. In addition to that I assume that there will be some questions about the acquisition of MySQL AB by Sun - I will try to answer these as good as I can. Looking forward to meet you next week. Please make sure to RSVP either via Meetup.com or Xing.com, so I can keep track of the number of attendees! Thanks!
While browsing the many blog entries on blogs.sun.com about the MySQL Acquisition (thanks a lot for the very warm welcome!), I stumbled over this (Python-based) utility: SnapBack, a tool that uses ZFS snapshots to perform physical backups of MySQL databases on Solaris. Very cool! This is actually something I was wanting to add to the mylvmbackup script, too - I have to take a closer look at how this is done (I tried to install OpenSolaris on a VirtualBox instance, but it caused it to crash the emulator).
Since the very early days, the MySQL distribution packages contain a very useful commandline-tool named replace. As the name implies, it can be used to replace strings in text files. From the documentation:
The replace utility program changes strings in place in files or on the standard input. Invoke replace in one of the following ways:
shell> replace from to [from to] ... -- file [file] ...
shell> replace from to [from to] ... < file
from represents a string to look for and to represents its replacement. There can be one or more pairs of strings. Use the -- option to indicate where the string-replacement list ends and the filenames begin. In this case, any file named on the command line is modified in place, so you may want to make a copy of the original before converting it. replace prints a message indicating which of the input files it actually modifies. If the -- option is not given, replace reads the standard input and writes to the standard output. replace uses a finite state machine to match longer strings first. It can be used to swap strings. For example, the following command swaps a and b in the given files, file1 and file2:
shell> replace a b b a -- file1 file2 ...
This comes in very handy, especially if you need to replace a similar text in a large number of files, or if you need to replace multiple different strings in a file at the same time! So next time you need to replace strings in text files, take a look at this hidden gem!
Unfortunately the string matching does not support regular expressions - but the source code actually documents some additional options:
Special characters in from string:
^ Match start of line.
\$ Match end of line.
\b Match space-character, start of line or end of line.
For end \b the next replace starts locking at the end space-character.
An \b alone or in a string matches only a space-character.
\r, \t, \v as in C.
The programs make a DFA-state-machine of the strings and the speed isn't
dependent on the count of replace-strings (only of the number of replaces).
A line is assumed ending with \n or \0.
There are no limit exept memory on length of strings.
Like in the past two years, there will be a DotOrg-Pavilion as part of the MySQL Conference & Expo 2008 exhibition floor. We've now concluded the invitation process - the following 15 Open Source projects that support MySQL will be present to showcase their work:
- CMS made simple - a fast and easy way to create a web site and manage its contents.
- DbBlender - a project that implements SQL support in Blender to enable remote repository capabilities.
- Entrance - an easy-to use browser for MySQL databases.
- Deki Wiki - a free open source wiki and application platform for communities and enterprises.
- lbpool - a load balancing JDBC driver for use with DB connection pools.
- memcached - a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
- Mojo Portal - an open source web site framework and content management system written in C# that runs under ASP.NET on Windows or under Mono on Linux or Mac OS X.
- Open Medical Record System - a community-developed, open-source, enterprise electronic medical record system framework intended to aid resource-constrained healthcare environments.
- phpMyAdmin - a tool written in PHP intended to handle the administration of MySQL over the Web.
- PHP Women - a user group specifically targeted toward the women in the PHP world.
- Phorum - a modular and powerful Forum siste, written in PHP.
- SilverStripe CMS - an intuitive content management system atop a powerful programming framework.
- Sphinx FULLTEXT Search Engine - a standalone full-text search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications
- Symfony - a web application framework for PHP5 projects.
- XAMPP - an easy to install Apache distribution containing MySQL, PHP and Perl.
I hope that the list above encourages you to strongly consider visiting the MySQL Conference! If not the list of projects above, I am sure that the session schedule will provide enough incentive for you to register now! See you there!
I must be awake for about 24 hours now, things are getting a bit blurry. But I have arrived at our MySQL Staff Meeting here in Orlando safely! My flight with Northwest airlines from Frankfurt via Detroit was uneventful - the plane was pretty empty so I was happy to have two seats for myself! The board entertainment program was neat, I really prefer video on demand over scheduled movie broadcasts (I watched "The Nanny Diaries", which was quite funny, and "The Fantastic Four", which had some nice CG effects).
While standing in the immigration line in Detroit somebody in the line next to us waved to me - it was Tobias "Flupps" Asplund, one of our trainers! Quite a funny coincidence, he just had arrived via Amsterdam. We actually were on the same flight from Detroit to Orlando afterwards. After checking into the Hotel I finally found my way to the evening reception - it was nice and overwhelming at the same time to see so many MySQLers in one place! I enjoyed talking and meeting old friends as well as getting to know new colleagues that joined the company since the last time we met. The following days will be exciting, interesting and exhausting... But for now I am off to bed.
I am happy to announce that I have been selected to speak at the MySQL Conference & Expo 2008 on April 14-17, 2008 in Santa Clara, CA. The topic of my talk will be "Performing MySQL Backups using LVM Snapshots" - and I will of course include a plug for the mylvmbackup tool
From the abstract:
Modern Linux distributions provide a very advanced technology to maintain and administer storage devices, called “Logical Volume Manager” (LVM). Among providing several benefits over using plain hard disk partitions, one of the unique features of LVM is the capability to create snapshots of file systems on the fly. This functionality comes in handy for performing consistent physical backups of MySQL tables without having to take down the MySQL server for the entire backup operation.
In this session, Lenz will give an introduction to the underlying technology, the actual steps that have to be performed and which caveats there may be. Additionally, he will introduce “mylvmbackup”, a script created to automate and ease the described procedure.
My talk has been scheduled as part of the "Security and Database Administration" track for 17:15 on Wednesday, April 16th in Ballroom B - the last slot before the infamous Quiz Show!
While some colleagues have already arrived in Orlando to meet fellow MySQLers, my plane from FRA to MCO (via DTW) does not leave until 10:20am tomorrow. Currently I am staying at my parents' place in Heidelberg, from which I will be picked up by an airport shuttle service early tomorrow morning (5:40am, ugh!).
I am looking forward to meeting with the other members of my team as well as old and new colleagues from the different departments. There seems to be some kind of outdoor team building event taking place on Wednesday afternoon - we have been split up into mixed groups and were asked to bring comfortable clothes and a light sweater or jacket. I hope I am not too jetlagged by the end of the day...
This will be my fourth MySQL staff meeting - when I joined the company in 2002, I was lucky to attend the third staff meeting in St. Petersburg, Russia right during the first week when I started my new job. Back then, we were around 40 people in total - the entire company still fitted in one coach that brought us from Helsinki, Finland to St. Petersburg. It's amazing to think that this staff meeting will host the tenfold amount of people!