Thursday, February 08, 2007

The first binary distribution of PBXT!

It's quite an effort to compile and test 3 versions of MySQL on 4 different machines, but that is what I have done for the first binary distribution of the PrimeBase XT pluggable storage engine.

Of course, its worth the effort because this is the "holy grail" of the pluggable storage engine strategy. Namely, binary plug-ins that work with the binary distributions prepared by MySQL and others in the community.

And by creating an installer script I have made it easier than ever to install the plug-in. So after you have downloaded the binary package from, all you have to do is:

1. Start your MySQL server.

2. Enter: sudo ./install

The installer will automatically determine the version of the server running and install the corresponding plug-in.

The package includes plug-ins for MySQL 5.1.14, 5.1.15 and 5.2.0 on Linux (32/64-bit) and Mac OS X (x86/PowerPC). Nevertheless you may wonder why the download is 22MB in size.

The reason is I have had to include patched versions of mysqld with the plug-ins for MySQL 5.1.14 and 5.2.0. The patch fixes a bug that causes MySQL to crash when restarted after a plug-in has been installed. The installer generates an uninstall script which restores the unpatched mysqld and removes the plug-in.

The bug is fixed in MySQL 5.1.15, so in the future the package should be much smaller, even when it includes more platforms.


Anonymous said...

Hi ..

I do not think is is that easy! On SuSE 10 I get

peterlinux:~/Desktop/New Folder/pbxt-0.9.8-plugins # ./install --socket=/var/lib/mysql/mysql.sock /usr/
This script will install the PrimeBase XT 0.9.8 pluggable storage engine for MySQL versions:
5.1.14, 5.1.15, 5.2.0

* The server must be running in order to install the plug-in.
* You may be required to run this script as root, depending on where the MySQL plug-ins
directory is located.
* If you are using MySQL 5.1.14 or 5.2.0 this script will backup and relace your version
of mysqld because of a bug in these versions (see README for details).

Checking if MySQL is running...
Checking MySQL version...
Please enter MySQL server root password:
Enter password:
OK - MySQL version: 5.2.0, OS: linux, Processor: i686
Locating plug-in directory...
Found: /usr/lib/mysql
Copying to the plug-in directory...
Registering PBXT with MySQL...
Please enter MySQL server root password:
Enter password:
Searching for mysqld...

***ERROR: Cannot find mysqld (in /)!
Unable to patch mysqld!

To avoid a crash due to bug #22694, PBXT will be uninstalled...
Please enter MySQL server root password:
Enter password:

.. please advice. I am no Linux geek1 Undoubtedly I would be able to solve it by experimenting, but I'd rather take an advice!

Peter Laursen

Paul McCullagh said...

Hi Peter,

The installer failed to find the 5.2 mysqld, which it needs to patch (because of bug #22694).

So there must be a case I have not handled. I should be able to fix the problem if you e-mail me the result of "SHOW VARIABLES;".

I can then fix the 'install' script, and send you an update.

My e-mail address is at the bottom of the README file.

Thanks for the bug report :)


Anonymous said...

Thanks ..

The new and patched script worked fine on SuSE 10.0 and MySQL 5.2.0. Maybe I'll try with MySQL 5.2.3 one of the days.

We now have a MySQL installation so that we can get all features including Foreign Keys with Primebase implemented and tested.

Peter Laursen

Paul McCullagh said...

Glad to hear it worked!

I have updated the archives that are available for download on and

I have also included plug-ins for MySQL 5.2.3 in the new package.

Thanks for your help in getting this fixed.


Anonymous said...

SQLyog 5.23 RC3 with support for PBXT (including Foreign Key support) was just released.

Use it, report any bug .. and do not forget to recommend it!

Thanks to Paul for the help to get the test server up!

Peter Laursen

Paul McCullagh said...

And thanks for being the first MySQL GUI to support PBXT! :)

Roland Bouman said...


Thank you for the effort of providing binaries! This really makes it a lot easier. I can't help but feel that this sets a new standard, and I hope you'll be able to continue to provide binaries.

Just want to let you know I plugged in PBXT into MySQL 5.1.15 without issue.

Instead of using the install script, I installed it manually. (Not because of any issue with the installation script - it just seemed easier to do it manually)

If anybody has any trouble installing, you can try the following:

1) make sure that mysqld is running, and connect a client (f.e. the mysql command line client)

2) use the following statement to locate the plugin directory:

mysql> show variables like '%plugin%';
| Variable_name | Value |
| plugin_dir |/opt/mysql-5.1.15/lib/mysql |
1 row in set (0.00 sec)

3) In my case, the mysql directory was not yet present in the lib directory, so I created it:

cd /opt/mysql-5.1.15/lib/
sudo mkdir mysql

4) Copy the appropriate pbxt binary to that location.

5) set the right privileges

sudo chown -Rf mysql /opt/mysql-5.1.15/lib/
sudo chgrp -Rf mysql /opt/mysql-5.1.15/lib/
sudo chmod -Rf ug+rwx /opt/mysql-5.1.15/lib/

6) Then, in the mysql command line client, install the plugin as described in the README in the pbxt download:


That's it.

I did a few quick tests, and it looks like PBXT is noticably faster than InnoDB for large write operations (though not as fast as MyISAM). This was a test without concurrency BTW.

Thanks again,

Roland Bouman

Paul McCullagh said...

Hi Roland,

Yes, it really is that simple!

And I know some people prefer to know what's happening, so thanks for the explanation.

And, yes, I do plan to continue to provide binaries.

But I am hoping to find help to build some of the other platforms like Solaris, FreeBSD and HP-UX.

Best regards,


pabloj said...

No love for MsWindows?

pabloj said...

Sorry, after posting this comment I clicked on and "Binary distribution of the PBXT 0.9.86 Beta pluggable storage engine for MySQL 5.1.16 and 5.2.3 running on Linux (32/64-bit), Mac OS X (x86/ppc) and Windows."