Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

2.8.3. Installing from the Development Source Tree

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-client.shar.

To install the BitKeeper client on Unix, use these commands:

shell> sh bk-client.shar
shell> cd bk_client-1.1
shell> make all
shell> PATH=$PWD:$PATH

To install the BitKeeper client on Windows, use these instructions:

  1. Download and install Cygwin from http://cygwin.com.

  2. Make sure gcc and make have been installed under Cygwin. You can test this by issuing which gcc and which make commands. If either one is not installed, run Cygwin's package manager, select gcc, make, or both, and install them.

  3. Under Cygwin, execute these commands:

    shell> sh bk-client.shar
    shell> cd bk_client-1.1
    

    Then edit the Makefile and change the line that reads $(CC) $(CFLAGS) -o sfio -lz sfio.c to this:

    $(CC) $(CFLAGS) -o sfio sfio.c -lz
    

    Now run the make command and set the path:

    shell> make all
    shell> PATH=$PWD:$PATH
    

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 assess the MySQL development source tree:

  1. 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.

  2. 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.

  3. 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.

  4. 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”.

  5. 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.

  6. 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
    
  7. 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.

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.


 
 
  Published under the terms of the GNU General Public License Design by Interspire