Archive for the ‘Open Source’ Category
The state of MySQL client libraries
Those who’ve been around the MySQL world are probably aware of the much-discussed topics of GPL licensing, dual licensing, and in particular, licensing of the client libraries (also called connectors or drivers) and the FOSS exception to that licensing. This is newly relevant with the announcement of a permissively-licensed MySQL-compatible client library for MariaDB.
The difference is that this time there’s been some question about the provenance and history of the source code. Some people asked me about this. Some of them were aware of a relatively obscure detail: there’ve been permissively licensed MySQL client libraries for years, in the form of libdrizzle, a BSD-licensed library for the Drizzle fork of MySQL.
Here are some of the thoughts that seemed to be going through peoples’ minds:
- This changes everything, doesn’t it? Now I don’t have to to open-source my application or pay Oracle licensing fees.
- Is the source code of these new connectors untainted, or am I exposing myself to liability problems by using it?
- Isn’t MariaDB’s driver just a copy-paste and LGPL relicense of the BSD-licensed Drizzle driver? Sure, that’s legal, but is it ethical?
- Are these connectors really compatible, or will they cause problems?
Many people seem constitutionally incapable of understanding the GPL. I consider myself forever done with discussions about what the GPL permits or forbids, so I won’t address that. But I thought some of these things were worth looking into, at least quickly.
In particular, I was curious whether the allegations of plagiarism on MariaDB’s behalf were true. So I downloaded the latest release of the Drizzle and MariaDB C libraries, unpacked the source code, and just took a quick look. Here’s what I found.
The first thing I wanted to check was the allegation that MariaDB’s drivers were just an LGPL wrapper or copy-paste of Drizzle’s libraries. A few minutes of study showed no obvious plagiarism from Drizzle’s source. The MariaDB drivers appear to have a lot more code, documentation, tests, and so on, and it looks to be organized very differently than the Drizzle drivers. Files are in different directory hierarchies, code appears to be split up among files very differently, files are named differently, and so on. After about ten minutes of reading source, I saw no code that looks similar. A cursory grepping of the source code also shows words like “infile” that appear only in the MariaDB code. If there’s plagiarism from Drizzle’s library source code, it’s going to take a little more work to find it. In fact, from what I see, the Drizzle libraries don’t implement all of the protocol’s features, and that tangentially answers one of the other questions about true compatibility.
The next question is about MariaDB’s code versus MySQL’s code. The MariaDB library’s source looks and feels very similar to MySQL’s source. This is no surprise to me. If Monty sat alone in a room and coded a library from scratch, based only on the MySQL protocol documents and his memory, I’d expect the result to look a lot like MySQL’s source code anyway. But when I opened some of the files, things got less clear to me. For example, the copyright header in include/my_list.h begins with this:
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
I was surprised. I thought I’d see a “clean-room” reimplementation of the protocol, with no relationship to MySQL’s source code. But this file appears to be the same code as MySQL’s, although the header says that the file is licensed under the LGPL. I compared that with the same header file in MySQL 5.6′s source code, and here’s the result:
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
So that file is licensed under the “viral” copyleft GPL version 2 only, not the more permissive LGPL version 2 or later. Did the license terms on that file get changed over time? I am not surprised to see Oracle erasing prior copyright history and updating it to show themselves as the owners, but did they change the license from LGPL to GPL too? One way to find out is to check the MySQL 5.0 source code, because that was released before Sun or Oracle entered the picture. Here’s the header file’s copyright notice for MySQL 5.0.28:
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
The license matches Oracle’s, although of course the copyright owner has changed since then. So it looks to me like Oracle didn’t change the license terms; they just updated the ownership information.
Some important questions arise from this. I’m not qualified to answer them because I’m neither a lawyer nor a MySQL historian, but I’m qualified to ask them and I’d surely like to know the answers:
- Is a legitimately LGPL-licensed copy of these header files available?
- What’s the origin of the triple copyright ownership listed in MariaDB’s header file, to include “MySQL Finland AB” and “TCX DataKonsult AB” ? What’s the relationship between these entities and MySQL AB?
I think that perhaps someone from Monty Program or SkySQL is in the best position to answer these questions; in fact, Monty himself is probably the most knowledgeable. I’m looking forward to understanding more of the history around the source code and its licensing and provenance.
Planned change in Maatkit & Aspersa development
I’ve just sent an email to the Maatkit discussion list to announce a planned change to how Maatkit (and Aspersa) are developed. In short, Percona plans to create a Percona Toolkit of MySQL-related utilities, as a fork of Maatkit and Aspersa. I’m very happy about this change, and I welcome your responses to that thread on the discussion list.
Using the Nook Color as a full-featured Android tablet
I bought a Barnes and Noble Nook Color e-book reader and ripped out the Nook software, replacing it with the CyanogenMod distribution of the Android OS. It’s really, really nice hardware, and CyanogenMod (CM) is really, really nice software. I love them both, and my regular readers will remember that I’m not a gadget guy. Read on for more.
I never thought I’d get a tablet, until my phone died and I got a Droid 2 as a replacement. With all those gadgets, I just started to find myself using my phone for reading my RSS feeds and so on — but hating how small the screen was. I started to think again about a tablet after experiencing how handy the smartphone’s extra features are.
The Nook Color Hardware
The Nook Color is a medium-sized Android tablet with a screen that’s the same size as the Samsung Galaxy Tab. It’s a perfect size for carrying around — much better than iPads and Xooms and so on, which are just too big for my taste. This device literally fits in the pocket of my jeans (specs).
The screen is amazing. It’s super sharp. But the Nook Color doesn’t have a microphone or a camera, and it doesn’t have any phone service. This is fine. I don’t want these items. I want a tablet to use primarily at home for consuming content such as blogs, books, newspapers, music, movies, and so on.
The best parts: 1) it’s way cheaper than a Galaxy Tab or similar tablets. It’s $250 at the store. And 2) it’s really easy to take off the stripped-down version of Android that comes with it, and put something better on it. Which brings me to my next point.
The Software
When you unpack the box, the Nook has a pretty nice little e-reader installed, with a simplified Android interface. It has limited functionality, which is fine. It does have a web browser and a couple other things, and BN recently added their own application store. But it’s really kind of lame. You can only get a small fraction of the apps that you could get through the Android Market.
I updated to CyanogenMod in two stages. First, I simply rooted the device and made it possible to install arbitrary apps from the Android Market. There’s a nice, easy process to do this. It’s called Manual Nooter. I tried this first instead of just going to CyanogenMod because I wanted to see what it was like. It was okay, but it was really obvious that it was a sort of layer on top of the underlying Nook. Pressing the Home button, for example, brought up a prompt to use the Nook home screen or the hijacked home screen for the new software. I tinkered around with this for a while, enough to determine that I didn’t like the patched look and feel. At the same time, I learned that the applications I wanted would work just fine.
So I moved on to CyanogenMod. Early reviews I’d read of this said it wasn’t ready for prime time on the Nook, but the newer updates seemed to be well received. So I backed up everything and took the plunge.
It’s really ridiculously easy to install CyanogenMod on the Nook, even easier if you don’t first update your Nook operating system. It took me longer to burn a bootable ROM on a MicroSD card than anything else. Full instructions can be found beginning at this page.
The result is just brilliant. I’ve now installed my preferred apps, stripped down the interface by removing some stuff I don’t want, such as multiple desktops (CyanogenMod is jammed with features), and I have a simple, elegant, perfectly functioning Android tablet. And I really mean it — there are no rough edges or crashes or anything you might expect from a third-party OS on your tablet. In fact, one of the things I like the most is that it doesn’t come with pre-installed adware, as my Droid did (and the stuff on the Droid can’t be uninstalled without rooting it and voiding the warranty, which is not something I’m going to do on my work phone).
Summary
If you want a small, light, thin tablet with WiFi that you can hold in one hand for reading books and newspapers and so on, which is easy to put in a pocket or purse and carry with you, and doesn’t cost much, then consider the Nook Color. If you want to turn it into something much more full-featured, then consider ripping out the Nook software and replacing it with CyanogenMod. The result is really superb.


