A few months ago we announced the EXPLAIN Analyzer, a simple tool to help you understand how MariaDB / MySQL was running queries. For users of HeidiSQL this is now even easier. As discussed in their news post you can now send a query to the EXPLAIN analyzer with a single click.

We hope this helps both new and experienced users better understand the queries they run.

More information about the EXPLAIN Analyzer and the simple API client authors can use to add support to their apps is available in the AskMonty Knowledgebase:

About a week ago I was looking at MySQL 5.5.27, and noticed a curious thing. Despite the fact that the new MySQL release contained its usual share of bug fixes, not a single one of them was accompanied with a test case.

Now, let me tell you something about tests. For many years MySQL was using its own testing framework, called mysql-test. The first version was written as early as 1999. Over the years it has accumulated a lot of tests. Tests for new features and regression tests — those that guarantee that a bug, once fixed, will never ever show up again. We had pretty strict policies about it in MySQL AB (and, later, Sun Microsystems) — every new bug fix always had to come with a test case for the bug. And because these tests were always run on many platforms for every push (by the continuous integration tool called Pushbuild — developed in-house by Kristian Nielsen) we were reasonably sure that any bug, once fixed, will stay fixed forever. I’m not with MySQL anymore, but I still cannot imagine that Oracle would weaken that rule. So, it must be something else then.

One of the changes that 5.5.27 brings in an extension to the mysql-test-run script — the driver script of the mysql-test suite — which makes it look for test cases in a new directory. In addition to the usual location (that is, the mysql-test/ directory in the source tree), it will now look for test cases in the internal/mysql-test/ directory. Does this mean that test cases are no longer open source? Oracle did not reply to my question. But indeed, there is evidence that this guess is true. For example, this commit mail shows that new test cases, indeed, go in this “internal” directory, which is not included in the MySQL source distribution.

MySQL test cases were always an important part of the MySQL source tree. They were particularly useful for storage engine developers and for other people extending MySQL, for example, at Facebook, Twitter, and Taobao.  But also for Linux distributions which add their patches to the base MySQL, and even to users, who don’t modify the sources — they still want to confirm that a particular bug was fixed or that their custom-built binary has no obvious flaws.

In May, at the Ubuntu Developer Summit in Oakland, Oracle had 7 representatives there, and they promised that Oracle will be more contributor- and distribution-friendly. It is sad to see that instead of that the MySQL source tree is being closed down.

MySQL AB was never very good at building a development community around the product. There weren’t many MySQL developers or contributors to the project outside of MySQL AB, and the company didn’t do much to increase their number. But now Oracle has noticed them — and it intentionally kills whatever is left of the MySQL development community. Without test cases MySQL becomes as opaque to external developers as any piece of closed source software, and only those most experienced and familiar with the MySQL code base will be able to continue working with it.

UPDATE: It’s difficult to find anything more valuable to external developers than test cases. But arguably the revision history is. It groups changes to these millions of lines of source code into change sets, one change set per a distinct feature or a particular bug fix. It allows to see who changed a specific line of code, when, and why. And it seems that Oracle is going to keep this information to itself too. Public MySQL trees on launchpad with the revision history are not being updated.

Now, is there a single successful Open Source project with no developer community at all ?

UPDATE 2: We’re not the only ones this issue affects. See also:

 

Like others we were not satisfied with the fix for a bug in MySQL which caused the query cache and partitioning to not work reliably together. The bug, in simple terms, was that if the query cache was enabled and you used partitioned tables and if a partitioned table was using a transactional engine like InnoDB or XtraDB, the query cache could, under certain circumstances, return incorrect results.

Returning incorrect results is a definite, high-priority bug. However, the upstream fix was to disable all caching of queries from partitioned tables. We wanted a better solution because the query cache can be very useful and beneficial for partitioned tables, just like it is useful and beneficial for non-partitioned tables.

The root of the problem was that the query cache did not have any visibility into partitioned tables. In particular it didn’t know anything about a given table’s storage engine, including if the table was transactional or not. This lack of information prevented the query cache from intelligently caching and returning the cached results of queries.

We solved this by creating a way for the query cache to talk to the underlying storage engine of a partitioned table to see if it is:

  1. OK to cache the result of a query
  2. OK to return a cached result

With that information in hand the query cache can now properly cache new queries and provide correct cached results for duplicate queries every time, no matter if the table is partitioned (or not), or transactional (or not).

The patch is already in the MariaDB 5.5 source on Launchpad and will be in our next release of MariaDB 5.5.

Update: Monty has also written about this on his blog.