MariaDB Roadshow Helsinki
MariaDB Roadshow Helsinki

One could say that MariaDB originates from Finland’s capital Helsinki. In fact so does MySQL. It was in the Helsinki area that MySQL saw daylight. It was here that Monty Widenius laid the ground for MySQL already in the 80’s, maybe even 1979, when he created UNIREG from which parts were reused when he together with the other 2 founders of MySQL released the first version of MySQL in 1995.

Last week, 19 years later, a MariaDB event was held in Helsinki. It was SkySQL that arranged the first in a row of this year’s MariaDB Roadshow events. The agenda included a walkthrough of MariaDB 10.0, some roadmap and MariaDB high availability options, which consisted of MariaDB Galera Cluster and MaxScale, the pluggable load balancer for MariaDB and MySQL. In addition Vinay from Severalnines visited to give a talk about automation and management of MariaDB Galera Cluster.

I gave the talk on MariaDB 10.0 and it was very interesting to learn that half of the audience was already using MariaDB. Also the amount of input at the end of my presentation on features the audience would like to see in MariaDB was impressive. Some of them were pretty specific, like usage of the same temporary table multiple times in the same query. Others more generic, like using the Connect storage engine, as a central integration point for all interoperability with other databases, especially Redis and MongoDB.

Another very clear outcome from the event is that there is definitely a need for a good database load balancer and people enjoyed talking about MaxScale and how it could help them in their specific solutions.

In case you didn’t have a chance to join the MariaDB event in Helsinki, SkySQL has lined up a few of these events throughout the summer:

Join one of them if you are nearby. You might learn a thing or two and you’ll be able to give feedback directly to people that work on MariaDB.

Today marks a milestone in terms of the MariaDB project – going forward, the MariaDB project plans to use Github and git for source code management. The migration happens from Launchpad and the bzr tool.

The 10.1 server development (under heavy development now) will happen on Github. You can check it out here: Feel free to watch, star or even fork the code, and send us contributions!

Previous maria-captains should now provide their Github IDs so that they can be accorded similar status. Send the IDs to the maria-developers mailing list.

The project eventually wants to move the 10.0, 5.5, 5.3, 5.2, and 5.1 trees to Github, but in the meantime, fixes still go into the 10.0 or 5.5 trees on Launchpad using bzr. This may change in the future.

This completes a top voted feature, MDEV-5240. We’re not the only project interested in this of course – there was definitely inspiration from Emacs and from Mozilla!


MariaDB connect engine XML

In January I wrote my first post about node.js and MariaDB . In February I continued with a second post about using jQuery and some GIS calculations. Now it is time for the third and this time the main focus is not so much on GIS functionality, but instead on the capabilities MariaDB has for handling piles of unstructured data. In this case I’ll be focusing on crunching a pile of XML files without importing the XML data itself.

MariaDB 10.0, which had its GA launch in early April, includes the Connect engine. It has been developed to dynamically access all kinds of data sources, from other databases over ODBC connections to web log files. The Connect engine establishes a connection to the data source and exposes the data source to MariaDB as a table. Let’s get started!

To begin with, check that you do not have the Connect engine installed, which you shouldn’t if you haven’t played with it before. It’s a separate install. To verify if it’s installed (or not) run the SHOW ENGINES command. The Connect engine is simply called CONNECT in the output. I’m running this demo on Ubuntu 13.10 so the following instructions focus on that platform, but I’ll indicate how it’s done on other platforms as well.

Make sure you’ve configured APT to use the MariaDB repository. Instructions for that are found in the MariaDB repository configuration tool part of Once done with adding the repository the Connect engine can be installed with a normal apt-get command. For example:

Notice that on RPM platforms you would do something similar with yum, i.e. yum install MariaDB-connect-engine .

Next, tell MariaDB to enable the Connect engine:

Now we’re ready with all prerequisites to actually start implementing the solution. Since I’m continuing on the development demo I built earlier, which is about showing running tracks on Google Maps I’m going to continue with that. Also in this case I will use GPX files. GPX files are stored by many GPS devices including running watches and smartphones. GPX itself is a data representation format with a specific XML schema:

For the demo I’ll use a directory /home/rasmus/nodegpxmariadb/public/uploads/ which I’ve preloaded with a set of GPX files. Now starts the interesting part. I want to make the data in these XML formatted files available to MariaDB. It’s pretty straight forward by creating a new table with the Connect engine:

In the CREATE TABLE statement you can see that Connect is specified as the engine, the table_type option is set to XML, multiple is set to 1 to allow for multiple files and file_name includes the path and the pattern of the XML files that I want to make accessible. In the tabname option the XML node under which the data resides is given. Data in this node will be represented as table rows. In this case the node is called trkseg. This node includes all the trkpt -nodes that we’re interested in. A single trkpt node represents a track point stored at certain intervals while running. One track point includes longitude, latitude, elevation and time. By combining these trackpoints you’ll have a representation of the running track. That is what I’m going to do.

In the CREATE TABLE statement there is one more thing to notice. The option tabname and the table field ele both include namespace directives to give to the XML parser so that it knows how to get hold of the right node. This was a bit tricky, but it has to do with the use of the namespaces of GPX and the XML parser that is used. The Connect engine uses libxml2 on Linux.

With the table GPXSource now in place let’s try to do a SELECT over it:

Voila! We can see that it works and I get out the number of trackpoints per GPX file.

Let’s try another SELECT that I will make use of in the actual application. We want to get the duration of each of the runs by calculating the difference between first and last trackpoint for each GPX file:

Now I have all the data I need to be able to create my sample application.  In this blog post I won’t dive into the Node.js application code part, but I have made all source code available in the same way as before on Github, . Hopefully you find it useful. The end result however accessing the XML files through MariaDB without importing the data looks like this:

MariaDB connect engine XML