maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #01340
bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2792)
#At lp:maria based on revid:knielsen@xxxxxxxxxxxxxxx-20091023114317-mypsimwtn0ehksnq
2792 Michael Widenius 2009-10-23 [merge]
Automatic merge
modified:
Docs/INSTALL-BINARY
Docs/mysql.info
README
configure.in
libmysql/libmysql.c
scripts/make_binary_distribution.sh
scripts/mysql_secure_installation.sh
sql/mysqld.cc
storage/maria/Makefile.am
storage/myisam/Makefile.am
support-files/Makefile.am
support-files/config.huge.ini.sh*
support-files/config.medium.ini.sh*
support-files/config.small.ini.sh*
support-files/mysql.server.sh
=== modified file 'Docs/INSTALL-BINARY'
--- a/Docs/INSTALL-BINARY 2009-09-16 12:03:18 +0000
+++ b/Docs/INSTALL-BINARY 2009-10-23 16:48:54 +0000
@@ -1,25 +1,20 @@
+MariaDB and MySQL have identical install methods. In this document we
+describe how to install MariaDB; However all documentation at www.mysql.com
+also applies.
-2.9. Installing MySQL from tar.gz Packages on Other Unix-Like Systems
- This section covers the installation of MySQL binary distributions
- that are provided for various platforms in the form of compressed
- tar files (files with a .tar.gz extension). See Section 2.1.2.4,
- "MySQL Binaries Compiled by Sun Microsystems, Inc.," for a
- detailed list.
+2.9. Installing MariaDB from tar.gz Packages on Other Unix-Like Systems
- To obtain MySQL, see Section 2.1.3, "How to Get MySQL."
+ This section covers the installation of MariaDB binary distributions
+ that are provided for various platforms in the form of compressed
+ tar files (files with a .tar.gz extension).
- MySQL tar file binary distributions have names of the form
- mysql-VERSION-OS.tar.gz, where VERSION is a number (for example,
+ MariaDB tar file binary distributions have names of the form
+ mariadb-VERSION-OS.tar.gz, where VERSION is a number (for example,
5.1.39), and OS indicates the type of operating system for which
the distribution is intended (for example, pc-linux-i686).
- In addition to these generic packages, we also offer binaries in
- platform-specific package formats for selected platforms. See
- Section 2.2, "Standard MySQL Installation Using a Binary
- Distribution," for more information on how to install these.
-
- You need the following tools to install a MySQL tar file binary
+ You need the following tools to install a MariaDB tar file binary
distribution:
* GNU gunzip to uncompress the distribution.
@@ -33,11 +28,14 @@
program. On other systems with a deficient tar, you should
install GNU tar first.
- If you run into problems and need to file a bug report, please use
- the instructions in Section 1.6, "How to Report Bugs or Problems."
+ If you run into problems and need to file a bug report,
+ please report them to: http://bugs.launchpad.net/maria
+
+ See the instructions in Section 1.6, "How to Report Bugs or Problems."
The basic commands that you must execute to install and use a
- MySQL binary distribution are:
+ MariaDB binary distribution are:
+
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
@@ -53,7 +51,7 @@ shell> bin/mysqld_safe --user=mysql &
Note
- This procedure does not set up any passwords for MySQL accounts.
+ This procedure does not set up any passwords for MariaDB accounts.
After following the procedure, proceed to Section 2.11,
"Post-Installation Setup and Testing."
@@ -80,8 +78,8 @@ shell> useradd -g mysql mysql
shell> cd /usr/local
3. Obtain a distribution file using the instructions in Section
- 2.1.3, "How to Get MySQL." For a given release, binary
- distributions for all platforms are built from the same MySQL
+ 2.1.3, "How to Get MariaDB." For a given release, binary
+ distributions for all platforms are built from the same MariaDB
source distribution.
4. Unpack the distribution, which creates the installation
@@ -106,7 +104,7 @@ shell> cd mysql
+ The bin directory contains client programs and the
server. You should add the full path name of this
directory to your PATH environment variable so that your
- shell finds the MySQL programs properly. See Section
+ shell finds the MariaDB programs properly. See Section
2.14, "Environment Variables."
+ The scripts directory contains the mysql_install_db
@@ -126,8 +124,8 @@ shell> chgrp -R mysql .
the mysql user. The second changes the group attribute to the
mysql group.
- 7. If you have not installed MySQL before, you must create the
- MySQL data directory and initialize the grant tables:
+ 7. If you have not installed MariaDB before, you must create the
+ MariaDB data directory and initialize the grant tables:
shell> scripts/mysql_install_db --user=mysql
If you run the command as root, include the --user option as
shown. If you run the command while logged in as that user,
@@ -137,25 +135,26 @@ shell> scripts/mysql_install_db --user=m
After creating or updating the grant tables, you need to
restart the server manually.
- 8. Most of the MySQL installation can be owned by root if you
+ 8. Most of the MariaDB installation can be owned by root if you
like. The exception is that the data directory must be owned
by mysql. To accomplish this, run the following commands as
root in the installation directory:
+
shell> chown -R root .
shell> chown -R mysql data
- 9. If you want MySQL to start automatically when you boot your
+ 9. If you want MariaDB to start automatically when you boot your
machine, you can copy support-files/mysql.server to the
location where your system has its startup files. More
information can be found in the support-files/mysql.server
script itself and in Section 2.11.2.2, "Starting and Stopping
- MySQL Automatically."
+ MariaDB Automatically."
10. You can set up new accounts using the bin/mysql_setpermission
script if you install the DBI and DBD::mysql Perl modules. See
Section 4.6.14, "mysql_setpermission --- Interactively Set
Permissions in Grant Tables." For Perl module installation
instructions, see Section 2.15, "Perl Installation Notes."
- 11. If you would like to use mysqlaccess and have the MySQL
+ 11. If you would like to use mysqlaccess and have the MariaDB
distribution in some nonstandard location, you must change the
location where mysqlaccess expects to find the mysql client.
Edit the bin/mysqlaccess script at approximately line 18.
@@ -166,7 +165,7 @@ $MYSQL = '/usr/local/bin/mysql';
error will occur when you run mysqlaccess.
After everything has been unpacked and installed, you should test
- your distribution. To start the MySQL server, use the following
+ your distribution. To start the MariaDB server, use the following
command:
shell> bin/mysqld_safe --user=mysql &
@@ -185,7 +184,7 @@ shell> bin/mysqld_safe --user=mysql &
Note
- The accounts that are listed in the MySQL grant tables initially
+ The accounts that are listed in the MariaDB grant tables initially
have no passwords. After starting the server, you should set up
passwords for them using the instructions in Section 2.11,
"Post-Installation Setup and Testing."
=== modified file 'Docs/mysql.info'
--- a/Docs/mysql.info 2007-11-02 11:29:13 +0000
+++ b/Docs/mysql.info 2009-10-23 16:48:54 +0000
@@ -1,3 +1,10 @@
+MariaDB is in most aspects identical to MySQL.
+
+Differences between MySQL and MariaDB can be found at:
+http://askmonty.org/wiki/index.php/MariaDB_versus_MySQL
+
+The MariaDB references manual can be found at:
+http://askmonty.org/wiki/index.php/Manual
The MySQL Reference Manual is available in various formats on
http://dev.mysql.com/doc; if you're interested in the DocBook XML
=== modified file 'README'
--- a/README 2009-09-15 10:46:35 +0000
+++ b/README 2009-10-23 16:48:54 +0000
@@ -1,5 +1,4 @@
This is a release of MariaDB, a branch of MySQL.
-MySQL is brought to you by the MySQL team at Sun Microsystems, Inc.
MariaDB is a drop-in replacement of MySQL, with more features, less
bugs and better performance.
=== modified file 'configure.in'
--- a/configure.in 2009-10-16 06:18:37 +0000
+++ b/configure.in 2009-10-23 19:26:26 +0000
@@ -2897,13 +2897,11 @@ AC_CONFIG_COMMANDS_POST(ac_configure_arg
AC_OUTPUT
echo
-echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
-echo "latest release, upcoming features, and other information to make your"
-echo "work or play with MySQL more productive. There you can also find"
-echo "information about mailing lists for MySQL discussion."
+echo "You can find information about MariaDB at"
+echo http://askmonty.org/wiki/index.php/MariaDB
echo
echo "Remember to check the platform specific part of the reference manual for"
-echo "hints about installing MySQL on your platform. Also have a look at the"
+echo "hints about installing MariaDB on your platform. Also have a look at the"
echo "files in the Docs directory."
echo
@@ -2922,5 +2920,5 @@ echo "---"
# The following text is checked in ./Do-compile to verify that configure
# ended sucessfully - don't remove it.
-echo "Thank you for choosing MySQL!"
+echo "Thank you for choosing MariaDB!"
echo
=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c 2009-10-02 10:36:28 +0000
+++ b/libmysql/libmysql.c 2009-10-23 16:48:54 +0000
@@ -1432,7 +1432,8 @@ mysql_get_server_info(MYSQL *mysql)
my_bool STDCALL mariadb_connection(MYSQL *mysql)
{
- return strinstr(mysql->server_version, "MariaDB") != 0;
+ return (strinstr(mysql->server_version, "MariaDB") != 0 ||
+ strinstr(mysql->server_version, "-maria-") != 0);
}
const char * STDCALL
=== modified file 'scripts/make_binary_distribution.sh'
--- a/scripts/make_binary_distribution.sh 2009-10-20 23:32:21 +0000
+++ b/scripts/make_binary_distribution.sh 2009-10-23 16:48:54 +0000
@@ -239,8 +239,8 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; t
# ----------------------------------------------------------------------
cd scripts
- rm -f mysql_install_db
- @MAKE@ mysql_install_db \
+ rm -f mysql_install_db mysqld_safe mysql_fix_privilege_tables
+ @MAKE@ mysql_install_db mysqld_safe mysql_fix_privilege_tables \
prefix=. \
bindir=./bin \
sbindir=./bin \
@@ -257,7 +257,7 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; t
sbindir=./bin \
scriptdir=./bin \
libexecdir=./bin \
- pkgdatadir=@pkgdatadir@
+ pkgdatadir=./share
cd ..
# ----------------------------------------------------------------------
@@ -320,6 +320,33 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; t
mkdir $DEST/data $DEST/data/mysql $DEST/data/test
chmod o-rwx $DEST/data $DEST/data/mysql $DEST/data/test
+ # Remove not needed files
+ rm $DEST/share/mysql/errmsg.txt
+
+ # Remove NDB files
+ rm -f $DEST/share/mysql/ndb-config-2-node.ini \
+ $DEST/share/mysql/config*
+
+ #
+ # Move things to make them easier to find in tar installation
+ #
+ mv $DEST/libexec/* $DEST/bin
+ mv $DEST/share/man $DEST
+ mv $DEST/share/mysql/binary-configure $DEST/configure
+ mv $DEST/share/mysql/*.sql $DEST/share
+ mv $DEST/share/mysql/*.cnf $DEST/share/mysql/*.server $DEST/share/mysql/mysql-log-rotate $DEST/support-files
+ rmdir $DEST/libexec
+
+ #
+ # Move some scripts that are only run once to 'scripts' directory
+ # but add symbolic links instead to old place for compatibility
+ #
+ for i in mysql_secure_installation mysql_fix_extensions mysql_fix_privilege_tables
+ do
+ mv $DEST/bin/$i $DEST/scripts
+ ln -s "../scripts/$i" $DEST/bin/$i
+ done
+
# ----------------------------------------------------------------------
# Create the result tar file
# ----------------------------------------------------------------------
@@ -496,12 +523,21 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in
$BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution \
$BASE/bin/make_win_* \
$BASE/bin/setsomevars $BASE/support-files/Makefile* \
- $BASE/support-files/*.sh
+ $BASE/support-files/*.sh \
+ $BASE/share/mysql/errmsg.txt
+
+# Remove NDB files
+rm -f $BASE/share/ndb-config-2-node.ini \
+ $BASE/share/mysql/config*
#
-# Copy system dependent files
+# Move things to make things easier to find in tar installation
#
-./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql
+
+mv $BASE/share/man $BASE
+mv $BASE/share/mysql/binary-configure $BASE/configure
+mv $BASE/share/mysql/*.sql $BASE/share
+mv $BASE/share/mysql/*.cnf $BASE/share/mysql/*.server $BASE/share/mysql/mysql-log-rotate $BASE/support-files
#
# Remove system dependent files
@@ -515,12 +551,6 @@ rm -f $BASE/support-files/magic \
$BASE/support-files/MySQL-shared-compat.spec \
$BASE/INSTALL-BINARY
-# Clean up if we did this from a bk tree
-if [ -d $BASE/sql-bench/SCCS ] ; then
- find $BASE/share -name SCCS -print | xargs rm -rf
- find $BASE/sql-bench -name SCCS -print | xargs rm -rf
-fi
-
BASE2=$TMP/$NEW_NAME
rm -rf $BASE2
mv $BASE $BASE2
=== modified file 'scripts/mysql_secure_installation.sh'
--- a/scripts/mysql_secure_installation.sh 2007-01-01 04:31:23 +0000
+++ b/scripts/mysql_secure_installation.sh 2009-10-23 16:48:54 +0000
@@ -23,6 +23,157 @@ trap "interrupt" 2
rootpass=""
echo_n=
echo_c=
+basedir=
+bindir=
+
+parse_arg()
+{
+ echo "$1" | sed -e 's/^[^=]*=//'
+}
+
+parse_arguments()
+{
+ # We only need to pass arguments through to the server if we don't
+ # handle them here. So, we collect unrecognized options (passed on
+ # the command line) into the args variable.
+ pick_args=
+ if test "$1" = PICK-ARGS-FROM-ARGV
+ then
+ pick_args=1
+ shift
+ fi
+
+ for arg
+ do
+ case "$arg" in
+ --basedir=*) basedir=`parse_arg "$arg"` ;;
+ --no-defaults|--defaults-file=*|--defaults-extra-file=*)
+ defaults="$arg" ;;
+ *)
+ if test -n "$pick_args"
+ then
+ # This sed command makes sure that any special chars are quoted,
+ # so the arg gets passed exactly to the server.
+ # XXX: This is broken; true fix requires using eval and proper
+ # quoting of every single arg ($basedir, $ldata, etc.)
+ #args="$args "`echo "$arg" | sed -e 's,\([^a-zA-Z0-9_.-]\),\\\\\1,g'`
+ args="$args $arg"
+ fi
+ ;;
+ esac
+ done
+}
+
+# Try to find a specific file within --basedir which can either be a binary
+# release or installed source directory and return the path.
+find_in_basedir()
+{
+ return_dir=
+ case "$1" in
+ --dir)
+ return_dir=1; shift
+ ;;
+ esac
+
+ file=$1; shift
+
+ for dir in "$@"
+ do
+ if test -f "$basedir/$dir/$file"
+ then
+ if test -n "$return_dir"
+ then
+ echo "$basedir/$dir"
+ else
+ echo "$basedir/$dir/$file"
+ fi
+ break
+ fi
+ done
+}
+
+cannot_find_file()
+{
+ echo
+ echo "FATAL ERROR: Could not find $1"
+
+ shift
+ if test $# -ne 0
+ then
+ echo
+ echo "The following directories were searched:"
+ echo
+ for dir in "$@"
+ do
+ echo " $dir"
+ done
+ fi
+
+ echo
+ echo "If you compiled from source, you need to run 'make install' to"
+ echo "copy the software into the correct location ready for operation."
+ echo
+ echo "If you are using a binary release, you must either be at the top"
+ echo "level of the extracted archive, or pass the --basedir option"
+ echo "pointing to that location."
+ echo
+}
+
+# Ok, let's go. We first need to parse arguments which are required by
+# my_print_defaults so that we can execute it first, then later re-parse
+# the command line to add any extra bits that we need.
+parse_arguments PICK-ARGS-FROM-ARGV "$@"
+
+#
+# We can now find my_print_defaults. This script supports:
+#
+# --srcdir=path pointing to compiled source tree
+# --basedir=path pointing to installed binary location
+#
+# or default to compiled-in locations.
+#
+
+if test -n "$basedir"
+then
+ print_defaults=`find_in_basedir my_print_defaults bin extra`
+ echo "print: $print_defaults"
+ if test -z "$print_defaults"
+ then
+ cannot_find_file my_print_defaults $basedir/bin $basedir/extra
+ exit 1
+ fi
+else
+ print_defaults="@bindir@/my_print_defaults"
+fi
+
+if test ! -x "$print_defaults"
+then
+ cannot_find_file "$print_defaults"
+ exit 1
+fi
+
+# Now we can get arguments from the group [client]
+# in the my.cfg file, then re-run to merge with command line arguments.
+parse_arguments `$print_defaults $defaults client`
+parse_arguments PICK-ARGS-FROM-ARGV "$@"
+
+# Configure paths to support files
+if test -n "$basedir"
+then
+ bindir="$basedir/bin"
+elif test -f "./bin/mysql"
+ then
+ bindir="./bin"
+else
+ bindir="@bindir@"
+fi
+
+mysql_command=`find_in_basedir mysql $bindir`
+if test -z "$print_defaults"
+then
+ cannot_find_file mysql $bindir
+ exit 1
+fi
set_echo_compat() {
case `echo "testing\c"`,`echo -n testing` in
@@ -39,7 +190,7 @@ prepare() {
do_query() {
echo $1 >$command
- mysql --defaults-file=$config <$command
+ $bindir/mysql --defaults-file=$config <$command
return $?
}
@@ -185,14 +336,9 @@ prepare
set_echo_compat
echo
-echo
-echo
-echo
echo "NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL"
echo " SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!"
echo
-echo
-
echo "In order to log into MySQL to secure it, we'll need the current"
echo "password for the root user. If you've just installed MySQL, and"
echo "you haven't set the root password yet, the password will be blank,"
@@ -310,13 +456,8 @@ echo
cleanup
echo
-echo
-echo
echo "All done! If you've completed all of the above steps, your MySQL"
echo "installation should now be secure."
echo
echo "Thanks for using MySQL!"
-echo
-echo
-
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-10-23 11:43:17 +0000
+++ b/sql/mysqld.cc 2009-10-23 19:26:26 +0000
@@ -4560,7 +4560,13 @@ we force server id to 2, but this MySQL
{
select_thread_in_use= 0; // Allow 'kill' to work
bootstrap(stdin);
- unireg_abort(bootstrap_error ? 1 : 0);
+ if (!kill_in_progress)
+ unireg_abort(bootstrap_error ? 1 : 0);
+ else
+ {
+ sleep(2); // Wait for kill
+ exit(0);
+ }
}
if (opt_init_file)
{
=== modified file 'storage/maria/Makefile.am'
--- a/storage/maria/Makefile.am 2008-06-26 05:18:28 +0000
+++ b/storage/maria/Makefile.am 2009-10-23 16:48:54 +0000
@@ -32,7 +32,7 @@ SUBDIRS = . unittest
EXTRA_DIST = ma_test_all.sh ma_test_all.res ma_test_big.sh \
ma_ft_stem.c CMakeLists.txt plug.in ma_test_recovery
-pkgdata_DATA = ma_test_all ma_test_all.res ma_test_recovery
+pkgdata_DATA =
pkglib_LIBRARIES = libmaria.a
bin_PROGRAMS = maria_chk maria_pack maria_ftdump maria_read_log \
maria_dump_log
=== modified file 'storage/myisam/Makefile.am'
--- a/storage/myisam/Makefile.am 2007-02-28 16:50:51 +0000
+++ b/storage/myisam/Makefile.am 2009-10-23 16:48:54 +0000
@@ -28,7 +28,7 @@ LDADD =
DEFS = @DEFS@
EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in
-pkgdata_DATA = mi_test_all mi_test_all.res
+pkgdata_DATA =
pkglib_LIBRARIES = libmyisam.a
bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
=== modified file 'support-files/Makefile.am'
--- a/support-files/Makefile.am 2009-02-24 16:54:03 +0000
+++ b/support-files/Makefile.am 2009-10-23 16:48:54 +0000
@@ -53,7 +53,9 @@ pkgsupp_DATA = my-small.cnf \
ndb-config-2-node.ini
pkgsupp_SCRIPTS = mysql.server \
- mysqld_multi.server
+ mysqld_multi.server \
+ binary-configure \
+ mysql-log-rotate
aclocaldir = $(datadir)/aclocal
aclocal_DATA = mysql.m4
=== modified file 'support-files/config.huge.ini.sh' (properties changed: +x to -x)
=== modified file 'support-files/config.medium.ini.sh' (properties changed: +x to -x)
=== modified file 'support-files/config.small.ini.sh' (properties changed: +x to -x)
=== modified file 'support-files/mysql.server.sh'
--- a/support-files/mysql.server.sh 2009-10-16 06:15:30 +0000
+++ b/support-files/mysql.server.sh 2009-10-23 19:26:26 +0000
@@ -77,7 +77,12 @@ else
datadir="$basedir/data"
fi
sbindir="$basedir/sbin"
- libexecdir="$basedir/libexec"
+ if test -f "$basedir/bin/mysqld"
+ then
+ libexecdir="$basedir/bin"
+ else
+ libexecdir="$basedir/libexec"
+ fi
fi
# datadir_set is used to determine if datadir was set (and so should be
@@ -126,6 +131,12 @@ parse_server_arguments() {
datadir="$basedir/data"
fi
sbindir="$basedir/sbin"
+ if test -f "$basedir/bin/mysqld"
+ then
+ libexecdir="$basedir/bin"
+ else
+ libexecdir="$basedir/libexec"
+ fi
libexecdir="$basedir/libexec"
;;
--datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'`