summaryrefslogtreecommitdiff
path: root/BUILD/build_mccge.sh
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-02-20 18:51:43 +0200
committerMichael Widenius <monty@askmonty.org>2011-02-20 18:51:43 +0200
commit58bb0769bdf13a9747e900aa2f0955137738ce9d (patch)
tree1b46ea0f72dce27532f0c87c60ba8a1baa453fa0 /BUILD/build_mccge.sh
parent7e497abcfb3e761ba5a368316192ae930fb58f6b (diff)
parentde3c4428b8c759e85631d8d70b5845c872de5400 (diff)
downloadmariadb-git-58bb0769bdf13a9747e900aa2f0955137738ce9d.tar.gz
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
Diffstat (limited to 'BUILD/build_mccge.sh')
-rwxr-xr-xBUILD/build_mccge.sh233
1 files changed, 67 insertions, 166 deletions
diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh
index 72546874b0f..8f44699505f 100755
--- a/BUILD/build_mccge.sh
+++ b/BUILD/build_mccge.sh
@@ -1,5 +1,23 @@
#!/bin/sh
+# Copyright (c) 2008, 2010, Oracle.
+# Copyright (c) 2009-2011 Monty Program Ab
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; version 2
+# of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
die()
{
echo "ERROR: $@"; exit 1;
@@ -13,23 +31,18 @@ get_key_value()
developer_usage()
{
cat <<EOF
-
- This script can be used by developers of MySQL, early adopters wanting
- to try out early versions of MySQL before binary versions are
- available, anyone needing a version with a special patch included that
- needs to be built from source code, or anyone else wanting to exercise
- full control over the MySQL build process.
-
- This help text is targeted towards those that want to debug and test
- MySQL using source code releases. If you have downloaded a source code
- release and simply want to build a usable binary, you should read the
+ This script can be used by developers of MariaDB wanting to try out
+ early versions before binary versions are available, anyone needing
+ a version with a special patch included that needs to be built from
+ source code, or anyone else wanting to exercise full control over
+ the build process.
+
+ This help text is targeted towards those that want to debug and test
+ source code releases. If you have downloaded a source code release
+ and simply want to build a usable binary, you should read the
--sysadmin-help instead.
- The script is also designed to be used by anyone receiving a source
- code release of MySQL Cluster Carrier Grade Edition. The default
- behaviour is to build the standard MySQL Cluster Carrier Grade Edition
- package. Three environment variables can be used to change the
- default behaviour:
+ Three environment variables can be used to define the default behaviour:
MYSQL_DEVELOPER
Defining this variable is similar to setting the --developer flag
@@ -40,11 +53,6 @@ cat <<EOF
Defining this variable sets the --with-debug flag
Options used with this script always override any default behaviour.
- The default package is MySQL Cluster Carrier Grade (standard) Edition.
- For developers, the default package is MySQL Cluster Carrier Grade
- Extended Edition, and the default build behaviour is to build with
- autotools. If you want to skip autotools and start from a source code
- release you can use the --no-autotools flag.
More information for developers can be found in --help,
--sysadmin-help, and --extended-help.
@@ -62,17 +70,12 @@ sysadmin_usage()
{
cat <<EOF
- This script can be used to build MySQL Cluster Carrier Grade Edition
- based on a source code release you received from MySQL. It can also
- be used to build many variants other variants of MySQL, in particular
- various performance-optimised versions of MySQL.
-
It is assumed that you are building on a computer which is of the
- same type as that on which you intend to run MySQL/MySQL Cluster.
+ same type as that on which you intend to run the program.
The simplest possible way to run this script is to allow it to use the
built-in defaults everywhere, invoking it simply as (from top-level
- MySQL directory):
+ MariaDB source directory):
shell> BUILD/build_mccge.sh
@@ -84,21 +87,15 @@ cat <<EOF
with GCC, and x86 + SPARC for Solaris using the Forte compiler and
finally x86 on Linux using the Intel compiler.
3) Invokes the GCC compiler.
- 4) Builds a set of MySQL/MySQL Cluster binaries; for
- more information about these, see --extended-help.
+ 4) Builds a set of of binaries ; for more information about these,
+ see --extended-help.
5) Default compiler is always gcc.
The default version assumes that you have a source code tarball from
which you are building, and thus autoconf and automake do not need to
- be run. If you have downloaded a BitKeeper tree then you should read
+ be run. If you have downloaded a launchpad tree then you should read
--developer-help.
- If you are building MySQL/MySQL Cluster for commercial
- use then you need to set the --commercial flag to ensure that the
- commercial libraries are compiled in, rather than the GPL-only
- libraries. The default is to build a GPL version of MySQL Cluster
- Carrier Grade Edition.
-
If your building on a Solaris SPARC machine and you want to compile
using SunStudio you must set
--compiler=forte; if you want to build using the Intel compiler on
@@ -117,20 +114,16 @@ cat <<EOF
want the binaries installed.
Using a data directory other than the default (PREFIX/data) can be
- done when starting the MySQL Server, or by invoking this script with
+ done when starting the server, or by invoking this script with
the --datadir option.
If you want your binaries stripped of surplus debug or other
information, use the --strip option.
If you want debug information in the binary (for example, to be
- able to send gdb core dumps to MySQL Support), then you should add the
+ able to send gdb core dumps to support), then you should add the
flag --with-debug; if you want a production build with only debugging
information in the binary then use --debug.
-
- If your aim is not to build MySQL Cluster Carrier Grade Edition, you
- can also use this script to build MySQL Classic and MySQL Enterprise Pro
- versions; see the --extended-help for descriptions of these packages.
EOF
}
@@ -141,9 +134,8 @@ cat <<EOF
Usage: $0 [options]
--help Show this help message.
--sysadmin-help Show help for system administrators wishing
- to build MySQL Cluster Carrier Grade Edition
- or other MySQL versions.
- --developer-help Show help for developers trying to build MySQL
+ to build MariaDB
+ --developer-help Show help for developers trying to build MariaDB
--with-help Show extended help on --with-xxx options to
configure
--extended-help Show extended help message
@@ -166,11 +158,9 @@ Usage: $0 [options]
'path'
--debug Build normal version, but add debug
information to binary
- --developer Use extensions that most MySQL developers use
+ --developer Use extensions that most MariaDB developers use
--no-developer Do not use extensions that most developers of
- MySQL use
- --commercial Use commercial libraries
- --gpl Use gpl libraries
+ MariaDB use
--compiler=[gcc|icc|forte|SunStudio] Select compiler
--cpu=[x86|x86_64|sparc|itanium] Select CPU type
x86 => x86 and 32-bit binary
@@ -180,10 +170,10 @@ Usage: $0 [options]
--32 Build a 32-bit binary even if CPU is 64-bit
--64 Build a 64-bit binary even if not sure a
64-bit CPU is being used
- --package=[cge|extended|pro|classic] Select package to build
+ --package=[pro|classic] Select package to build
--parallelism=number Define parallelism in make
--strip Strip binaries
- --error-inject Enable error injection into MySQL Server and
+ --error-inject Enable error injection into MariaDB Server and
data nodes
--valgrind Build with valgrind
--fast Optimise for CPU architecture built on
@@ -201,12 +191,12 @@ extended_usage()
cat <<EOF
Extended help text for this script:
- -----------------------------------
- This script is intended to make it easier for customers using MySQL
- Cluster Carrier Grade Edition, customers using performance-optimised
- MySQL versions and developers to build the product from source on
- these platforms/compilers: Linux/x86 (32-bit and 64-bit) (either using
- gcc or icc), Linux Itanium, Solaris 8,9,10 and 11 x86 and SPARC using
+ -----------------------------------
+
+ This script is intended to make it easier to build
+ performance-optimised MariaDB versions from source on these
+ platforms/compilers: Linux/x86 (32-bit and 64-bit) (either using gcc
+ or icc), Linux Itanium, Solaris 8,9,10 and 11 x86 and SPARC using
gcc or SunStudio and MacOSX/x86/gcc.
The script automatically detects CPU type and operating system; The
@@ -214,49 +204,28 @@ extended_usage()
To build on other platforms you can use the --print-only option on a
supported platform and edit the output for a proper set of commands on
- the specific platform you are using. MySQL also provides custom builds
- for any type of platform that is officially supported for MySQL
- Cluster. For a list of supported platforms, see
- http://www.mysql.com/support/supportedplatforms/cluster.html.
+ the specific platform you are using.
Using the --package option, it is also possible to build a "classic"
- version of MySQL having only the MyISAM storage engine, a "Pro"
- package including all storage engines and other features except MySQL
- Cluster, and an "extended" package including these features plus MySQL
+ version of MariaDB having only the MyISAM storage engine, a "Pro"
+ package including all storage engines and other features except MariaDB
+ Cluster, and an "extended" package including these features plus MariaDB
Cluster (this is the default if the --developer option is used).
- Different MySQL storage engines are included in the build, depending
+ Different MariaDB storage engines are included in the build, depending
on which --package option is used. The comment and version strong
suffix are also set according to the package selected.
- --package=cge
- storage engines:
- ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, NDB
- (All storage engines except InnoDB)
- comment: MySQL Cluster Carrier Grade Edition GPL/Commercial version
- built from source
- version string suffix: -cge
-
- --package=extended
- storage engines:
- ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, INNODB, NDB
- (All storage engines)
- comment: MySQL Cluster Carrier Grade Extended Edition GPL/Commercial
- version built from source
- version string suffix: -cge-extended
-
--package=pro
storage engines:
ARCHIVE, BLACKHOLE, CSV, FEDERATED, INNODB, MYISAM
(All storage engines except NDB)
- comment: MySQL Pro GPL/Commercial version built from
- source
+ comment: Pro versions
version string suffix: [none]
--package=classic
storage engines: CSV, MYISAM
- comment: MySQL Classic GPL/Commercial version built
- from source
+ comment: Version without InnoDB and Maria
version string suffix: [none]
All packages except Classic include support for user-defined
@@ -265,10 +234,6 @@ extended_usage()
If --with-debug is used, an additional "-debug" is appended to the
version string.
- --commercial
- This flag prevents the use of GPL libraries which cannot be used
- under a commercial license, such as the readline library.
-
--with-debug[=full]
This option will ensure that the version is built with debug
information enabled; the optimisation level is decreased to -O.
@@ -357,8 +322,7 @@ extended_usage()
Package-specific options:
-------------------------
--with-innodb
- Specifically included in the "pro" and "extended" packages, and not
- in any of the others.
+ Specifically included in the "pro" package.
--with-comment
Sets the comment for the MySQL version, by package, as described
@@ -371,12 +335,10 @@ extended_usage()
Other options used:
-------------------
--with-readline
- Use the GPL readline library for command editing functions; not
- available with commercial packages.
+ Use the GPL readline library for command editing functions.
--with-libedit
- Use the BSD licensed library for command editing functions; used for
- commercial packages.
+ Use the BSD licensed library for command editing functions.
--with-zlib-dir=bundled
Use the zlib package bundled with MySQL.
@@ -579,9 +541,6 @@ parse_package()
extended )
package="extended"
;;
- cge )
- package="cge"
- ;;
*)
echo "Unknown package '$package'"
exit 1
@@ -712,12 +671,6 @@ parse_options()
--developer)
developer_flag="yes"
;;
- --commercial)
- gpl="no"
- ;;
- --gpl)
- gpl="yes"
- ;;
--compiler=*)
compiler=`get_key_value "$1"`
parse_compiler
@@ -765,7 +718,7 @@ parse_options()
--configure-only)
just_configure="yes"
;;
- --print-only)
+ --print-only|--just-print)
just_print="yes"
;;
--static-linking)
@@ -1168,28 +1121,19 @@ set_base_configs()
base_configs="$base_configs --with-pic"
base_configs="$base_configs --with-csv-storage-engine"
base_configs="$base_configs --with-perfschema"
+ base_configs="$base_configs --with-libevent"
}
#
-# Add all standard engines and partitioning (included as part of MySQL
-# Cluster storage engine as well) as part of MySQL Server. These are
-# added in all packages except the classic package.
+# Add all standard engines and partitioning
#
-set_base_engines()
+set_max_engines()
{
- engine_configs="--with-archive-storage-engine"
- engine_configs="$engine_configs --with-blackhole-storage-engine"
- engine_configs="$engine_configs --without-example-storage-engine"
- engine_configs="$engine_configs --with-federated-storage-engine"
- engine_configs="$engine_configs --with-partition"
+ engine_configs="--with-plugins=max --with-plugin-maria --with-maria-tmp-tables"
+ engine_configs="$engine_configs --without-plugin-innodb_plugin"
base_configs="$base_configs $engine_configs"
}
-set_innodb_engine()
-{
- base_configs="$base_configs --with-innodb"
-}
-
set_ndb_engine()
{
base_configs="$base_configs --with-ndbcluster"
@@ -1199,41 +1143,17 @@ set_ndb_engine()
set_pro_package()
{
if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Enterprise Pro $version_text built from source\""
+ base_configs="$base_configs --with-comment=\"Pro $version_text built from source\""
fi
if test "x$with_debug_flag" = "xyes" ; then
base_configs="$base_configs --with-server-suffix=\"-debug\""
fi
}
-set_cge_extended_package()
-{
- if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
- fi
- if test "x$with_debug_flag" = "xyes" ; then
- base_configs="$base_configs --with-server-suffix=\"-cge-extended-debug\""
- else
- base_configs="$base_configs --with-server-suffix=\"-cge-extended\""
- fi
-}
-
-set_cge_package()
-{
- if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
- fi
- if test "x$with_debug_flag" = "xyes" ; then
- base_configs="$base_configs --with-server-suffix=\"-cge-debug\""
- else
- base_configs="$base_configs --with-server-suffix=\"-cge\""
- fi
-}
-
set_classic_package()
{
if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
+ base_configs="$base_configs --with-comment=\"Classic $version_text built from source\""
fi
if test "x$with_debug_flag" = "xyes" ; then
base_configs="$base_configs --with-server-suffix=\"-debug\""
@@ -1619,11 +1539,7 @@ set_error_inject_configs()
set_default_package()
{
if test "x$package" = "x" ; then
- if test "x$developer_flag" = "xyes" ; then
package="extended"
- else
- package="cge"
- fi
fi
}
@@ -1750,28 +1666,13 @@ set_icc_special_options
#
# Definitions of various packages possible to compile. The default is to
-# build a source variant of MySQL Cluster Carrier Grade Edition
-# including all storage engines except InnoDB, and to use GPL libraries.
+# build a source variant including all storage engines except InnoDB.
#
set_base_configs
-if test "x$gpl" = "xyes" ; then
version_text="GPL version"
-else
- version_text="Commercial version"
-fi
if test "x$package" = "xpro" ; then
- set_base_engines
- set_innodb_engine
+ set_max_engines
set_pro_package
-elif test "x$package" = "xextended" ; then
- set_base_engines
- set_ndb_engine
- set_innodb_engine
- set_cge_extended_package
-elif test "x$package" = "xcge" ; then
- set_base_engines
- set_ndb_engine
- set_cge_package
elif test "x$package" = "xclassic" ; then
set_classic_package
else