Search This Blog

20 March 2009

MySQL 5.1.32 + External Stored Procedures

I have synced the codebase with the 5.1.32 release of MySQL and it appears to work just fine. Sometimes frustrating that Bazaar takes a bizarre amount of time to do a merge.

Download link for the source tarball are available from LaunchPad Download.

As an experiment, I have built a Mac OS 10.5 installer package (x86 32bit) which I have also placed there. Took a bit of fiddling about to discover how to use PackageMaker and how to automate it. It's built to work against Apple's Perl and Java, which have 32bit runtimes. Time permitting, I will later look at how to do a fenced plugin which would enable using an external language plugin of a different architecture. No guarantees - YMMV. If it works, enabling the Perl and Java stored procedure plugins should be as simple as :
~$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.32-wl820 External Language Stored Procedures - https://launchpad.net/mysql-wl820

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> INSTALL PLUGIN Perl SONAME 'psm_perl.so';
Query OK, 0 rows affected (0.01 sec)

mysql> INSTALL PLUGIN Java SONAME 'psm_java.so';
Query OK, 0 rows affected (0.10 sec)

mysql> SHOW PLUGINS;
+------------+--------+----------------+-------------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+-------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| Perl | ACTIVE | PSM LANGUAGE | psm_perl.so | GPL |
| Java | ACTIVE | PSM LANGUAGE | psm_java.so | GPL |
+------------+--------+----------------+-------------+---------+
8 rows in set (0.01 sec)