Caution: You should read this section only if you are interested in helping us test our new code. If you just want to get MySQL up and running on your system, you should use a standard release distribution (either a binary or source distribution).
To obtain our most recent development source tree, first
download and install the BitKeeper free client if you do not
have it. The client can be obtained from
http://www.bitmover.com/bk-client2.0.shar. Note
that you will need gcc and
make to build the BitKeeper free client, and
patch and tar to use the
BitKeeper free client. Note that old
1.1 versions of the BitKeeper free client will not
work!
To install the BitKeeper client on Unix, use these commands:
shell>/bin/sh bk-client2.0.sharshell>cd bk-client2.0shell>make
If you get a cc: command not found error,
invoke this command before running make:
shell> make CC=gcc
The step above will create the utility bkf, which is the BitKeeper free client. You may use the BitKeeper free client in the same way as the main client. For more information on bkf, use:
shell> bkf --help
To install the BitKeeper client on Windows, use these instructions:
Download and install Cygwin from http://cygwin.com.
Make sure patch, tar,
gcc and make have been
installed under Cygwin. You can test this by issuing
which gcc for
each command. If a required tool is not installed, run
Cygwin's package manager, select the required tools and
install them.
For the installation of the BitKeeper free client, use the same installations as given for Unix-like systems above.
The BitKeeper free client is shipped with its source code. The only documentation available for the free client is the source code itself.
After you have installed the BitKeeper client, you can access the MySQL development source tree:
Change location to the directory you want to work from, and then use the following command to make a local copy of the MySQL 5.1 branch:
shell> bkf clone bk://mysql.bkbits.net/mysql-5.1 mysql-5.1
In the preceding example, the source tree is set up in the
mysql-5.1/ subdirectory of
your current directory.
The initial download of the source tree may take a while, depending on the speed of your connection. Please be patient.
You need GNU make, autoconf 2.58 (or newer), automake 1.8, libtool 1.5, and m4 to run the next set of commands. Even though many operating systems come with their own implementation of make, chances are high that the compilation fails with strange error messages. Therefore, it is highly recommended that you use GNU make (sometimes named gmake) instead.
Fortunately, a large number of operating systems ship with the GNU toolchain preinstalled or supply installable packages of these. In any case, they can also be downloaded from the following locations:
To configure MySQL 5.1, you also need GNU bison. You should use the latest version of bison where possible. Version 1.75 and version 2.1 are known to work. There have been reported problems with bison 1.875. If you experience problems, upgrade to a later, rather than earlier, version. Versions of bison older than 1.75 may report this error:
sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded
Note: The maximum table size is not actually exceeded; the error is caused by bugs in older versions of bison.
The following example shows the typical commands required to
configure a source tree. The first cd
command changes location into the top-level directory of the
tree; replace mysql-5.1
with the appropriate directory name. The second line (for
storage/innobase) is needed only before
MySQL 5.1.12.
shell>cd mysql-5.1shell>(cd storage/innobase; autoreconf --force --install)shell>autoreconf --force --installshell>./configure # Add your favorite options hereshell>make
Or you can use BUILD/autorun.sh as a shortcut for the following sequence of commands:
shell>aclocal; autoheadershell>libtoolize --automake --forceshell>automake --force --add-missing; autoconfshell>(cd storage/innobase; aclocal; autoheader; autoconf; automake)
The command line that changes directory into the
storage/innobase directory is used to
configure the InnoDB storage engine. You
can omit this lines if you do not require
InnoDB support.
Note: Beginning with MySQL
5.1, code specific to storage engines has been moved under a
storage directory. For example,
InnoDB code is now found in
storage/innobase and
NDBCluster code is in
storage/ndb.
If you get some strange errors during this stage, verify that you really have libtool installed.
A collection of our standard configuration scripts is
located in the BUILD/ subdirectory. You
may find it more convenient to use the
BUILD/compile-pentium-debug script than
the preceding set of shell commands. To compile on a
different architecture, modify the script by removing flags
that are Pentium-specific.
When the build is done, run make install.
Be careful with this on a production machine; the command
may overwrite your live release installation. If you have
another installation of MySQL, we recommend that you run
./configure with different values for the
--prefix, --with-tcp-port,
and --unix-socket-path options than those
used for your production server.
Play hard with your new installation and try to make the new features crash. Start by running make test. See Section 26.1.2, “MySQL Test Suite”.
If you have gotten to the make stage, but
the distribution does not compile, please enter the problem
into our bugs database using the instructions given in
Section 1.8, “How to Report Bugs or Problems”. If you have installed the
latest versions of the required GNU tools, and they crash
trying to process our configuration files, please report
that also. However, if you execute
aclocal and get a command not
found error or a similar problem, do not report
it. Instead, make sure that all the necessary tools are
installed and that your PATH variable is
set correctly so that your shell can find them.
After initially copying the repository with bkf to obtain the source tree, you should use pull option to periodically update your local copy. To do this any time after you have set up the repository, use this command:
shell> bkf pull
You can examine the changeset comments for the tree by using
the changes option to
bkf:
shell> bkf changes
To get a list of the changes that would be applied with the
next bkf pull:
shell> bkf changes -R
To obtain a patch file for a specific changeset
(CSETID), use:
shell> bkf changes -vvrCSETID
If you see diffs or code that you have a question about, do
not hesitate to send email to the MySQL
internals mailing list. See
Section 1.7.1, “MySQL Mailing Lists”. Also, if you think you have
a better idea on how to do something, send an email message
to the list with a patch.
You can also browse changesets, comments, and source code online. To browse this information for MySQL 5.1, go to http://mysql.bkbits.net:8080/mysql-5.1.

User Comments
When compiling under Cygwin, by default, it uses automake-1.4, which it considers to be the "stable" version. In the Cygwin bash shell, cd into /etc/alternatives. Inside this directory, make sure to re-link the symlinks "aclocal" and "automake" to "/usr/bin/aclocal-1.9" and "/usr/bin/automake-1.9", respectively.
If you develop UI, probably you have ncurses-devel installed. If not, install it before you configure. The included curses termcap library needed for configure.
Watch out for ./BUILD/autorun.sh running an old instance libtoolize named glibtoolize. My system had an old glibtoolize 1.5 that become selected before libtoolize 1.5.23, causing the built to break.
Add your own comment.