Skip to content

Free BitKeeper client updated

After I published my article on how to build MySQL with the new Falcon storage engine from source, the free BitKeeper client was updated to version 2.0. I have now updated the instructions accordingly, our manual has been updated to reflect these changes, too.

However, it is currently still not possible to clone the Falcon tree with this client, some kind of obscure locking error message appears, even though the admin console on bkbits.net does not reveal any active locks in the repository:

$ bkf clone bk://mysql.bkbits.net/mysql-5.2-falcon mysql-5.2-falcon
ERROR-unable to lock repo for export, try later.
We're aware of this problem and have already contacted BitKeeper support about this. I hope it can be resolved quickly...

How to compile MySQL with the Falcon Storage Engine from the BitKeeper source tree

Now that the source tree for the new Falcon Storage Engine is finally public, here's a quick HOWTO on how to compile the server from source. This procedure is described in more detail in the MySQL Manual. I assume you use Linux and have the required development toolchain installed.

You first should get the free BK client from http://www.bitmover.com/bk-client2.0.shar, unpack and install it:

$ wget http://www.bitmover.com/bk-client2.0.shar
--17:34:34--  http://www.bitmover.com/bk-client2.0.shar
           => `bk-client2.0.shar'
Resolving www.bitmover.com... 192.132.92.2 Connecting to www.bitmover.com|192.132.92.2|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 17,676 (17K) [application/x-shar] 100%[========================================================>] 17,676 33.56K/s 17:34:35 (33.50 KB/s) - `bk-client2.0.shar' saved [17676/17676] $ sh ./bk-client2.0.shar x - creating lock directory x - creating directory bk-client2.0 x - extracting bk-client2.0/Makefile (text) x - extracting bk-client2.0/bkf.c (text) x - extracting bk-client2.0/demo.sh (text) $ cd bk-client2.0 $ make cc -O2 -Wall -Wno-parentheses bkf.c -o bkf $ sudo install -m755 bkf /usr/local/bin
Now that the BK client is installed, we can create a local clone of the Falcon development tree:
$ bkf clone bk://mysql.bkbits.net/mysql-5.2-falcon mysql-5.2-falcon
This will now perform a check out the most recent source tree from the mysql-5.2-falcon repository (~83 MB of source code). You can now enter the newly created directory and start the build:
$ cd mysql-5.2-falcon
$ ./BUILD/compile-pentium-debug-falcon
If you have a x86_64 Linux system, use compile-amd64-debug-falcon instead. Depending on the performance of your system, this step will take a while, as it performs a full compile of the MySQL server and all related tools. Once the build completed with no errors, you can create a binary tarball distribution:
./scripts/make_binary_distribution
This should leave you with a tarball mysql-5.2.0-falcon-alpha-linux-i686.tar.gz that you can now install to, say, /usr/local:
$ tar zxvf mysql-5.2.0-falcon-alpha-linux-i686.tar.gz -C /usr/local
$ cd /usr/local
$ ln -s mysql-5.2.0-falcon-alpha-linux-i686 mysql
$ cd mysql
$ ./configure
The last command will install the privilege tables and start up the mysql server. You can now fire up the mysql client:
$ ./bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.2.0-falcon-alpha-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Now make sure that falcon has indeed been included:
mysql> SHOW VARIABLES LIKE 'have_falcon';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_falcon | YES |
+---------------+-------+
1 row in set (0.01 sec)
Looks good! Now it's time to actually create a table that uses the Falcon engine:
mysql> use test;
Database changed
mysql> CREATE TABLE names (id INT, fname VARCHAR (20), lname VARCHAR (20)) ENGINE=Falcon;
Query OK, 0 rows affected (2.84 sec)

mysql> describe names;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| fname | varchar(20) | YES | | NULL | |
| lname | varchar(20) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)

mysql> INSERT INTO names VALUES (0, 'Lenz', 'Grimmer');
Query OK, 1 row affected (0.03 sec)

mysql> INSERT INTO names VALUES (1, 'Monty', 'Widenius');
Query OK, 1 row affected (0.06 sec)

mysql> SELECT * FROM names WHERE lname='Widenius';
+------+-------+----------+
| id | fname | lname |
+------+-------+----------+
| 1 | Monty | Widenius |
+------+-------+----------+
1 row in set (0.00 sec)
Congratulations, you are ready to further test and explore this new storage engine! Have fun with testing it - we would appreciate your feedback and experiences! Please share your impressions via the Falcon Forum or report bugs via our Bug Database. Make sure to read the bug reporting guidelines on the MySQL Forge Wiki first!

UPDATE: The people at Bitkeeper updated the free BK client to version 2.0 after I wrote this. I updated the described procedure above accordingly. Currently, the repository seems to have a locking problem that only appears when using the free BK client. We are working with the BitKeeper team on resolving this issue.

tweetbackcheck