Saturday 19 January 2013

Introducing Drizzle Tools

As part of the Libdrizzle Redux project I created an example tool which was bundled with it which will connect to a MySQL server as a slave and download the binary logs to local files.  This was developed as a quick example of what can be done with the new binlog API.

Two things quickly became apparent:
  1. We shouldn't really be distributing applications in a library
  2. I am going to be developing more useful tools around libdrizzle and they certainly shouldn't be in the same package
  3. BSD is a fantastic license for a library, but I personally prefer GPLv2 for applications
With this in mind I have pulled the drizzle_binlogs utility from Libdrizzle trunk (and therefore won't be in the 5.1.3 release) and put it in its own repository.  It has been licensed appropriately (GPLv2) and I am already beginning to develop more tools to go with it.

The are no source tarballs and PDFs of the docs for Drizzle Tools yet, but you can get the bzr tree to play with.  The Launchpad page is here.  It requires Libdrizzle 5.1.2 to build against.

Some really cool stuff coming to that tree soon which I will announce when ready :)

Enjoy!


Friday 18 January 2013

Libdrizzle 5.1.2 released and Libdrizzle at FOSDEM

Libdrizzle is getting better and better with every release, and to reflect this we have two announcements to make.

First of all, Libdrizzle 5.1.2 has been released.  This release has several major bug fixes and performance enhancements.  Changes are as follows:
  • Non-blocking Windows connections are now more stable
  • Improvements to Windows building
  • Unix Socket connections are now more stable
  • Memory allocation/freeing cleanups (for performance and ease of code)
  • Network packet buffer now much more flexible
  • Many performance improvements (the bundled drizzle_binlogs tool is now around 10x faster on my i7 laptop)
  • Several other minor bug fixes
API chages:
  • drizzle_query_str() has been removed, drizzle_query() with a 0 byte length parameter now does the same thing.
As always you can download the tarball and documentation from the Libdrizzle Launchpad Page.

I'm also going to be giving a talk entitled "Libdrizzle Redux, the next-gen MySQL compatible connector" on Sunday 3rd Feb in the MySQL devroom at FOSDEM.  This will be a great chance to find out more about the work we have been doing on the connector and how it can benefit you.

Saturday 5 January 2013

Libdrizzle 5.1.1 released!

A new version of the BSD licensed, MySQL compatible C client library, called Libdrizzle (5.1.1 codename Carbrooke) has been released today.

Since the last release (less than 2 weeks ago) the diff is 7725 lines long, 224KB in size.  So we have been really busy :)

There have been a few API changes in this version, especially around the prepared statement API.  We have made this API much simpler to use.  So applications will very likely need slight modifications and recompiling.

Major changes in this version:
  • Windows support (using MinGW) - Big thanks to Brian Aker, he worked very hard on this
  • More cleanups and improvements to the general API
  • Faster, more stable non-blocking connection handling - Something else Brian has been working hard on
  • Almost the entire prepared statement user API has been re-written.  It now uses get/set functions for the statement data.  It can also use column names instead of IDs to get the data
  • Binary log functions now support MySQL 5.6's checksums (and is aware of the new event types)
  • The glib2 dependency which was used for the drizzle_binlogs example utility has been removed
  • Every branch merge to trunk for this release was tested on Jenkins!
  • Many other bug fixes
You can download the source and documentation on the Launchpad downloads page.  We are aiming to have binary releases soon (although this may be around version 5.1.2).

We are still working on some awesome improvements and I intend to blog some examples soon.  Feel free to give at try, file a bug, ask a question and help us make this an even more awesome product :)

Wednesday 2 January 2013

Questions about the MariaDB C Connector

I should first start this blog post with the acronym IANAL (I am not a lawyer).  Also the views in this post are mine and not my employer's (a lawyer did ask me to say that part).

Questions on the MariaDB JDBC Driver have already been raised so I wanted to do something similar for the MariaDB C Connector.  The JDBC's issues are mostly ethical whereas my C Connector questions are mostly legal.

But first a little history...  MySQL 3.23.58 was the last version to include an LGPL licensed connector for MySQL, the connector went GPL (and of course commercial) after this version.  Nowadays the connector is GPL with a FLOSS exception, that exception allows you to compile with certain other licensed software.  The main reason for this is PHP version 4 switched from a dual-licensed under the GPL to PHP licensed only.  The PHP license is incompatible with GPL and LGPL licensed in both directions, this is because clauses 3&4 of the PHP license conflicts with clause 6 of the GPL license (which is also clause 10 of the LGPLv2 license).  The FLOSS exception isn't in 3.23.58, it wasn't needed back then.

Why is this relevant?  The MariaDB C Connector is based on the LGPL 3.23 connector and is coded-up to have the current features of the MySQL connector.  Some of this is based on the PHP licensed MySQLnd connector.

Being LGPL licensed is one of the main selling points of the connector.  It means you can dynamically link the library with a commercial application.  Something you would have to buy a license for to do with the MySQL connector.

So, my questions are:

1. How can MariaDB's C Connector legally include LGPL and PHP licensed code in the same source under the LGPL umbrella?

2. There are questions around the licensing and availability of the native LGPL SDBC (OpenOffice) driver that other parts of the connector are based on.  In the comments of another blog post it was claimed it that the SDBC code was "... developed by MySQL in 2006 and 2007 and never reached GA – discontinued when Sun Microsystems acquired MySQL AB" but I haven't seen any evidence of this.  The only Sun code I can find for SDBC is 2008/2009 and LGPLv3 which can't be re-licensed as LGPLv2.  Now there is a newer MySQL SDBC driver which is Apache2 licensed.  Where can we find the code MaraDB based their work on?

3. Although not distributed in the packages there are GPL licensed test cases in the bzr source.  Can you globally call it LGPL with these in there?

I do hope answers to these can be put to rest so that customers can continue to be happy using the alternative connector.