-
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> sfioball -r+ bk://mysql.bkbits.net/mysql-5.1-new 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 1.75 or later. Older versions of
bison 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.
shell> cd mysql-5.1
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
shell> (cd storage/innobase; aclocal; autoheader; autoconf; automake)
shell> (cd storage/bdb/dist; sh s_all)
shell> ./configure # Add your favorite options here
shell> make
Or you can use BUILD/autorun.sh as a
shortcut for the following sequence of commands:
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
shell> (cd storage/innobase; aclocal; autoheader; autoconf; automake)
shell> (cd storage/bdb/dist; sh s_all)
The command lines that change directory into the
storage/innobase
and
storage/bdb/dist
directories are used
to configure the InnoDB
and Berkeley DB
(BDB
) storage engines. You can omit these
command lines if you to not require
InnoDB
or BDB
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 27.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
sfioball to obtain the source tree, you
should use update periodically to update
your local copy. To do this any time after you have set up
the repository, use this command:
shell> update bk://mysql.bkbits.net/mysql-5.1-new
You can examine the change history for the tree with all the
diffs by viewing the BK/ChangeLog
file
in the source tree and looking at the
ChangeSet
descriptions listed there. To
examine a particular changeset, you would have to use the
sfioball command to extract two
particular revisions of the source tree, and then use an
external diff command to compare them. If
you see some funny 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.