summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
Diffstat (limited to 'support-files')
-rw-r--r--support-files/MacOSX/Makefile.am2
-rwxr-xr-xsupport-files/MacOSX/MySQLCOM (renamed from support-files/MacOSX/MySQL)2
-rw-r--r--support-files/MacOSX/StartupItem.Description.plist2
-rwxr-xr-xsupport-files/MacOSX/mwar-wrapper16
-rwxr-xr-xsupport-files/MacOSX/mwcc-wrapper48
-rw-r--r--support-files/MacOSX/postinstall.sh2
-rw-r--r--support-files/Makefile.am15
-rw-r--r--support-files/MySQL-shared-compat.spec.sh28
-rw-r--r--support-files/binary-configure.sh4
-rw-r--r--support-files/my-huge.cnf.sh1
-rw-r--r--support-files/my-innodb-heavy-4G.cnf.sh14
-rw-r--r--support-files/my-large.cnf.sh1
-rw-r--r--support-files/my-medium.cnf.sh2
-rw-r--r--support-files/my-small.cnf.sh2
-rw-r--r--support-files/mysql-log-rotate.sh13
-rw-r--r--support-files/mysql.server.sh84
-rw-r--r--support-files/mysql.spec.sh224
-rw-r--r--support-files/mysqld_multi.server.sh41
-rw-r--r--support-files/ndb-config-2-node.ini.sh43
19 files changed, 460 insertions, 84 deletions
diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am
index 4cdd7348cd7..b521d357022 100644
--- a/support-files/MacOSX/Makefile.am
+++ b/support-files/MacOSX/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST = Info.plist.sh \
postinstall.sh \
preinstall.sh \
ReadMe.txt \
- MySQL \
+ MySQLCOM \
StartupItem.Description.plist \
StartupItem.Info.plist \
StartupItem.postinstall
diff --git a/support-files/MacOSX/MySQL b/support-files/MacOSX/MySQLCOM
index f6579700384..9be5edb56f7 100755
--- a/support-files/MacOSX/MySQL
+++ b/support-files/MacOSX/MySQLCOM
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# /Library/StartupItems/MySQL/MySQL
+# /Library/StartupItems/MySQLCOM/MySQLCOM
#
# A script to automatically start up MySQL on system bootup
# for Mac OS X. This is actually just a wrapper script around
diff --git a/support-files/MacOSX/StartupItem.Description.plist b/support-files/MacOSX/StartupItem.Description.plist
index 1f0023bde0d..e8ceb1ee062 100644
--- a/support-files/MacOSX/StartupItem.Description.plist
+++ b/support-files/MacOSX/StartupItem.Description.plist
@@ -10,6 +10,6 @@
<key>IFPkgDescriptionTitle</key>
<string>MySQL Startup Item</string>
<key>IFPkgDescriptionVersion</key>
- <string>1.0</string>
+ <string>1.1</string>
</dict>
</plist>
diff --git a/support-files/MacOSX/mwar-wrapper b/support-files/MacOSX/mwar-wrapper
new file mode 100755
index 00000000000..4bc5153e7ef
--- /dev/null
+++ b/support-files/MacOSX/mwar-wrapper
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This script can only create a library, not take it apart
+# again to AR files
+
+case $1 in
+ -d*|-m*|-t*|-p*|-r*|-x*|x)
+ echo "$0: can't handle arguments $*"
+ exit 1;
+ ;;
+ -c|c|cr|cru|cu)
+ shift;
+ ;;
+esac
+
+exec mwld -lib -o $*
diff --git a/support-files/MacOSX/mwcc-wrapper b/support-files/MacOSX/mwcc-wrapper
new file mode 100755
index 00000000000..914578aca1d
--- /dev/null
+++ b/support-files/MacOSX/mwcc-wrapper
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+if [ -z "$CWINSTALL" ] ; then
+ echo "ERROR: You need to source 'mwvars' to set CWINSTALL and other variables"
+ exit 1
+fi
+
+if [ `expr "$MWMacOSXPPCLibraryFiles" : ".*BSD.*"` = 0 ] ; then
+ echo "ERROR: You need to source 'mwvars' with the 'bsd' argument"
+ exit 1
+fi
+
+# ==============================================================================
+
+# Extra options that don't change
+
+PREOPTS="-D__SCHAR_MAX__=127 -D__CHAR_BIT__=8 -ext o -gccinc"
+PREOPTS="$PREOPTS -wchar_t on -bool on -relax_pointers -align power_gcc"
+PREOPTS="$PREOPTS -stabs all -fno-handle-exceptions -Cpp_exceptions off"
+
+# ==============================================================================
+
+# We want the "PPC Specific" directory to be last, before the source
+# file. It is to work around a CodeWarrior/Apple bug, that we need a
+# Metrowersk header even though we have configured CodeWarrior to use
+# the BSD headers. But not to conflict, the directory has to be last.
+
+# FIXME this will probably break if one path contains space characters
+
+PREARGS=""
+for i in $* ; do
+ case "$i" in
+ -bind_at_load)
+ # This is a flag some version of libtool adds, when the host
+ # is "*darwin*". It doesn't check that it is gcc.
+ # FIXME add some flag?!
+ ;;
+ *.c|*.cc|*.cpp)
+ break
+ ;;
+ *)
+ PREARGS="$PREARGS $1"
+ ;;
+ esac
+ shift
+done
+#echo "mwcc $PREOPTS $PREARGS -I\"$CWINSTALL/MacOS X Support/Headers/PPC Specific\" $*"
+exec mwcc $PREOPTS $PREARGS -I"$CWINSTALL/MacOS X Support/Headers/PPC Specific" $*
diff --git a/support-files/MacOSX/postinstall.sh b/support-files/MacOSX/postinstall.sh
index f46f4480e3e..ff921d3fee9 100644
--- a/support-files/MacOSX/postinstall.sh
+++ b/support-files/MacOSX/postinstall.sh
@@ -10,7 +10,7 @@
if cd @prefix@ ; then
if [ ! -f data/mysql/db.frm ] ; then
- ./scripts/mysql_install_db -IN-RPM
+ ./scripts/mysql_install_db --rpm
fi
if [ -d data ] ; then
diff --git a/support-files/Makefile.am b/support-files/Makefile.am
index 1f38b4c30c2..5f5a10fc1fc 100644
--- a/support-files/Makefile.am
+++ b/support-files/Makefile.am
@@ -27,7 +27,8 @@ EXTRA_DIST = mysql.spec.sh \
mysql.server.sh \
binary-configure.sh \
magic \
- MySQL-shared-compat.spec.sh
+ MySQL-shared-compat.spec.sh \
+ ndb-config-2-node.ini.sh
SUBDIRS = MacOSX
@@ -38,8 +39,8 @@ pkgdata_DATA = my-small.cnf \
my-innodb-heavy-4G.cnf \
mysql-log-rotate \
mysql-@VERSION@.spec \
- binary-configure \
- MySQL-shared-compat.spec
+ MySQL-shared-compat.spec \
+ ndb-config-2-node.ini
pkgdata_SCRIPTS = mysql.server
@@ -53,8 +54,8 @@ CLEANFILES = my-small.cnf \
mysql-log-rotate \
mysql.server \
binary-configure \
- MySQL-shared-compat.spec
-
+ MySQL-shared-compat.spec \
+ ndb-config-2-node.ini
mysql-@VERSION@.spec: mysql.spec
rm -f $@
@@ -89,7 +90,7 @@ SUFFIXES = .sh
-e 's!@''FIND_PROC''@!@FIND_PROC@!' \
-e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
- -e 's!@''IS_LINUX''@!@IS_LINUX@!' \
+ -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
-e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
-e 's!@''sysconfdir''@!@sysconfdir@!' \
@@ -104,5 +105,7 @@ SUFFIXES = .sh
$< > $@-t
@MV@ $@-t $@
+all: binary-configure
+
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh
index 068daadab58..e3c88c9415f 100644
--- a/support-files/MySQL-shared-compat.spec.sh
+++ b/support-files/MySQL-shared-compat.spec.sh
@@ -26,7 +26,8 @@
#
# Change this to match the version of the shared libs you want to include
#
-%define version4 @MYSQL_NO_DASH_VERSION@
+%define version41 @MYSQL_NO_DASH_VERSION@
+%define version40 4.0.23
%define version3 3.23.58
Name: MySQL-shared-compat
@@ -36,26 +37,31 @@ License: GPL
Group: Applications/Databases
URL: http://www.mysql.com/
Autoreqprov: on
-Version: %{version4}
+Version: %{version41}
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: MySQL-shared, mysql-shared
Provides: MySQL-shared
-Summary: MySQL shared libraries for MySQL %{version4} and %{version3}
-Source0: MySQL-shared-%{version4}-0.%{_arch}.rpm
-Source1: MySQL-shared-%{version3}-1.%{_arch}.rpm
+Summary: MySQL shared client libraries for MySQL %{version41}, %{version40} and %{version3}
+# We simply use the "MySQL-shared" subpackages as input sources instead of
+# rebuilding all from source
+Source0: MySQL-shared-%{version41}-0.%{_arch}.rpm
+Source1: MySQL-shared-%{version40}-0.%{_arch}.rpm
+Source2: MySQL-shared-%{version3}-1.%{_arch}.rpm
# No need to include the RPMs once more - they can be downloaded seperately
# if you want to rebuild this package
NoSource: 0
NoSource: 1
+NoSource: 2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
-This package includes the shared libraries for both MySQL %{version3} and
-MySQL %{version4}. Install this package instead of "MySQL-shared", if you
-have applications installed that are dynamically linked against MySQL
-3.23.xx but you want to upgrade to MySQL 4.0.xx without breaking the library
-dependencies.
+This package includes the shared libraries for both MySQL %{version3},
+MySQL %{version40} as well as MySQL %{version41}.
+Install this package instead of "MySQL-shared", if you have applications
+installed that are dynamically linked against older versions of the MySQL
+client library but you want to upgrade to MySQL 4.1.xx without breaking the
+library dependencies.
%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
@@ -63,6 +69,8 @@ mkdir -p $RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
rpm2cpio %{SOURCE0} | cpio -iv --make-directories
rpm2cpio %{SOURCE1} | cpio -iv --make-directories
+rpm2cpio %{SOURCE2} | cpio -iv --make-directories
+/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
diff --git a/support-files/binary-configure.sh b/support-files/binary-configure.sh
index 107f468bffc..884a8363e22 100644
--- a/support-files/binary-configure.sh
+++ b/support-files/binary-configure.sh
@@ -14,11 +14,11 @@ echo "and start the MySQL server for you. If you run into any trouble, please"
echo "consult the MySQL manual, that you can find in the Docs directory."
echo ""
-./scripts/mysql_install_db
+./scripts/mysql_install_db --no-defaults
if [ $? = 0 ]
then
echo "Starting the mysqld server. You can test that it is up and running"
echo "with the command:"
echo "./bin/mysqladmin version"
- ./bin/mysqld_safe &
+ ./bin/mysqld_safe --no-defaults &
fi
diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh
index e11b85f266f..d25686f1c21 100644
--- a/support-files/my-huge.cnf.sh
+++ b/support-files/my-huge.cnf.sh
@@ -31,6 +31,7 @@ max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
+read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh
index 70944873144..062d106ce6a 100644
--- a/support-files/my-innodb-heavy-4G.cnf.sh
+++ b/support-files/my-innodb-heavy-4G.cnf.sh
@@ -71,7 +71,7 @@ max_connections = 100
# the host will be blocked from connecting to the MySQL server until
# "FLUSH HOSTS" has been run or the server was restarted. Invalid
# passwords and other errors during the connect phase result in
-# increasing this value. See the "Aborted_Connects" status variable for
+# increasing this value. See the "Aborted_connects" status variable for
# global counter.
max_connect_errors = 10
@@ -111,14 +111,14 @@ max_heap_table_size = 64M
# Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
# queries. If sorted data does not fit into the sort buffer, a disk
-# based merge sort is used instead - See "sort_merge_passes". Allocated
-# per thread if sort is needed.
+# based merge sort is used instead - See the "Sort_merge_passes"
+# status variable. Allocated per thread if sort is needed.
sort_buffer_size = 8M
# This buffer is used for the optimization of full JOINs (JOINs without
# indexes). Such JOINs are very bad for performance in most cases
# anyway, but setting this variable to a large value reduces the
-# performance impact. See the "select_full_join" status variable for a
+# performance impact. See the "Select_full_join" status variable for a
# count of full JOINs. Allocated per thread if full join is found
join_buffer_size = 8M
@@ -177,7 +177,7 @@ default_table_type = MYISAM
thread_stack = 192K
# Set the default transaction isolation level. Levels available are:
-# READ-UNCOMMITED, READ-COMMITED, REPEATABLE-READ, SERIALIZABLE
+# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE
transaction_isolation = REPEATABLE-READ
# Maximum size for internal (in-memory) temporary tables. If a table
@@ -317,7 +317,7 @@ key_buffer_size = 32M
read_buffer_size = 2M
# When reading rows in sorted order after a sort, the rows are read
-# through this buffer to avoid a disk seeks. You can improve ORDER BY
+# through this buffer to avoid disk seeks. You can improve ORDER BY
# performance a lot, if set this to a high value.
# Allocated per thread, when needed.
read_rnd_buffer_size = 16M
@@ -331,7 +331,7 @@ read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
# This buffer is allocated when MySQL needs to rebuild the index in
-# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
+# REPAIR, OPTIMIZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
myisam_sort_buffer_size = 128M
diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh
index 5995064fb4e..59aca4b32f2 100644
--- a/support-files/my-large.cnf.sh
+++ b/support-files/my-large.cnf.sh
@@ -31,6 +31,7 @@ max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
+read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh
index f3a99db8019..529740d59f0 100644
--- a/support-files/my-medium.cnf.sh
+++ b/support-files/my-medium.cnf.sh
@@ -32,6 +32,8 @@ max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh
index f1e3654dd88..b2ecca6127e 100644
--- a/support-files/my-small.cnf.sh
+++ b/support-files/my-small.cnf.sh
@@ -31,6 +31,8 @@ key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
diff --git a/support-files/mysql-log-rotate.sh b/support-files/mysql-log-rotate.sh
index a1153c66f40..0ee78b0f7ca 100644
--- a/support-files/mysql-log-rotate.sh
+++ b/support-files/mysql-log-rotate.sh
@@ -1,4 +1,9 @@
-# This logname is set in mysql.server.sh that ends up in /etc/rc.d/init.d/mysql
+# This logname can be set in /etc/my.cnf
+# by setting the variable "err-log"
+# in the [safe_mysqld] section as follows:
+#
+# [safe_mysqld]
+# err-log=@localstatedir@/mysqld.log
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
@@ -22,8 +27,10 @@
compress
postrotate
# just if mysqld is really running
- if test -n "`ps acx|grep mysqld`"; then
- @bindir@/mysqladmin flush-logs
+ if test -x @bindir@/mysqladmin && \
+ @bindir@/mysqladmin ping &>/dev/null
+ then
+ @bindir@/mysqladmin flush-logs
fi
endscript
}
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 7f4987be3a8..150a8a151ba 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -10,7 +10,7 @@
# started and shut down when the systems goes down.
# Comments to support chkconfig on RedHat Linux
-# chkconfig: 2345 90 20
+# chkconfig: 2345 64 36
# description: A very fast and reliable SQL database engine.
# Comments to support LSB init script conventions
@@ -54,6 +54,23 @@ else
bindir="$basedir/bin"
fi
+#
+# Use LSB init script functions for printing messages, if possible
+#
+lsb_functions="/lib/lsb/init-functions"
+if test -f $lsb_functions ; then
+ source $lsb_functions
+else
+ log_success_msg()
+ {
+ echo " SUCCESS! $@"
+ }
+ log_failure_msg()
+ {
+ echo " ERROR! $@"
+ }
+fi
+
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
export PATH
@@ -75,6 +92,33 @@ parse_arguments() {
done
}
+wait_for_pid () {
+ i=0
+ while test $i -lt 35 ; do
+ sleep 1
+ case "$1" in
+ 'created')
+ test -s $pid_file && i='' && break
+ ;;
+ 'removed')
+ test ! -s $pid_file && i='' && break
+ ;;
+ *)
+ echo "wait_for_pid () usage: wait_for_pid created|removed"
+ exit 1
+ ;;
+ esac
+ echo $echo_n ".$echo_c"
+ i=`expr $i + 1`
+ done
+
+ if test -z "$i" ; then
+ log_success_msg
+ else
+ log_failure_msg
+ fi
+}
+
# Get arguments from the my.cnf file,
# groups [mysqld] [mysql_server] and [mysql.server]
if test -x ./bin/my_print_defaults
@@ -125,7 +169,7 @@ then
extra_args="-e $datadir/my.cnf"
fi
-parse_arguments `$print_defaults $extra_args mysqld mysql_server mysql.server`
+parse_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server`
#
# Set pid file if not given
@@ -151,14 +195,17 @@ case "$mode" in
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
+ echo $echo_n "Starting MySQL"
$bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
+ wait_for_pid created
+
# Make lock for RedHat / SuSE
if test -w /var/lock/subsys
then
touch /var/lock/subsys/mysql
fi
else
- echo "Can't execute $bindir/mysqld_safe from dir $basedir"
+ log_failure_msg "Can't execute $bindir/mysqld_safe"
fi
;;
@@ -168,29 +215,18 @@ case "$mode" in
if test -s "$pid_file"
then
mysqld_pid=`cat $pid_file`
- echo "Killing mysqld with pid $mysqld_pid"
+ echo $echo_n "Shutting down MySQL"
kill $mysqld_pid
# mysqld should remove the pid_file when it exits, so wait for it.
+ wait_for_pid removed
- sleep 1
- while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
- do
- [ -z "$flags" ] && echo $echo_n "Wait for mysqld to exit$echo_c" || echo $echo_n ".$echo_c"
- flags=a$flags
- sleep 1
- done
- if [ -s $pid_file ]
- then echo " gave up waiting!"
- elif [ -n "$flags" ]
- then echo " done"
- fi
# delete lock for RedHat / SuSE
if test -f /var/lock/subsys/mysql
then
rm -f /var/lock/subsys/mysql
fi
else
- echo "No mysqld pid file found. Looked for $pid_file."
+ log_failure_msg "MySQL PID file could not be found!"
fi
;;
@@ -199,11 +235,21 @@ case "$mode" in
# running or not, start it again.
$0 stop
$0 start
- ;;
+ ;;
+
+ 'reload')
+ if test -s "$pid_file" ; then
+ mysqld_pid=`cat $pid_file`
+ kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL"
+ touch $pid_file
+ else
+ log_failure_msg "MySQL PID file could not be found!"
+ fi
+ ;;
*)
# usage
- echo "Usage: $0 start|stop|restart"
+ echo "Usage: $0 start|stop|restart|reload"
exit 1
;;
esac
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 2354b44f4fa..d023dfa980a 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -1,5 +1,9 @@
%define mysql_version @VERSION@
-%define release 0
+%ifarch i386
+%define release 0
+%else
+%define release 0.glibc23
+%endif
%define mysqld_user mysql
%define server_suffix -standard
@@ -12,8 +16,8 @@
Name: MySQL
Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases
-Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
+Group(pt_BR): Aplicações/Banco_de_Dados
Version: @MYSQL_NO_DASH_VERSION@
Release: %{release}
License: GPL
@@ -23,7 +27,7 @@ Packager: Lenz Grimmer <build@mysql.com>
Vendor: MySQL AB
Requires: fileutils sh-utils
Provides: msqlormysql MySQL-server mysql
-BuildPrereq: ncurses-devel
+BuildRequires: ncurses-devel
Obsoletes: mysql
# Think about what you use here since the first step is to
@@ -53,8 +57,8 @@ documentation and the manual for more information.
Release: %{release}
Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases
-Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
+Group(pt_BR): Aplicações/Banco_de_Dados
Requires: fileutils sh-utils
Provides: msqlormysql mysql-server mysql MySQL
Obsoletes: MySQL mysql mysql-server
@@ -77,9 +81,8 @@ The MySQL web site (http://www.mysql.com/) provides the latest
news and information about the MySQL software. Also please see the
documentation and the manual for more information.
-This package includes the MySQL server binary (statically linked,
-compiled with InnoDB support) as well as related utilities to run
-and administrate a MySQL server.
+This package includes the MySQL server binary (incl. InnoDB) as well
+as related utilities to run and administrate a MySQL server.
If you want to access and work with the database, you have to install
package "MySQL-client" as well!
@@ -89,7 +92,7 @@ Release: %{release}
Summary: MySQL - Client
Group: Applications/Databases
Summary(pt_BR): MySQL - Cliente
-Group(pt_BR): Aplicações/Banco_de_Dados
+Group(pt_BR): Aplicações/Banco_de_Dados
Obsoletes: mysql-client
Provides: mysql-client
@@ -99,15 +102,62 @@ This package contains the standard MySQL clients and administration tools.
%{see_base}
%description client -l pt_BR
-Este pacote contém os clientes padrão para o MySQL.
+Este pacote contém os clientes padrão para o MySQL.
+
+%package ndb-storage
+Release: %{release}
+Summary: MySQL - ndbcluster storage engine
+Group: Applications/Databases
+
+%description ndb-storage
+This package contains the ndbcluster storage engine.
+It is necessary to have this package installed on all
+computers that should store ndbcluster table data.
+Note that this storage engine can only be used in conjunction
+with the MySQL Max server.
+
+%{see_base}
+
+%package ndb-management
+Release: %{release}
+Summary: MySQL - ndbcluster storage engine management
+Group: Applications/Databases
+
+%description ndb-management
+This package contains ndbcluster storage engine management.
+It is necessary to have this package installed on at least
+one computer in the cluster.
+
+%{see_base}
+
+%package ndb-tools
+Release: %{release}
+Summary: MySQL - ndbcluster storage engine basic tools
+Group: Applications/Databases
+
+%description ndb-tools
+This package contains ndbcluster storage engine basic tools.
+
+%{see_base}
+
+%package ndb-extra
+Release: %{release}
+Summary: MySQL - ndbcluster storage engine extra tools
+Group: Applications/Databases
+
+%description ndb-extra
+This package contains some extra ndbcluster storage engine tools for the advanced user.
+They should be used with caution.
+
+%{see_base}
%package bench
Release: %{release}
Requires: %{name}-client perl-DBI perl
Summary: MySQL - Benchmarks and test system
Group: Applications/Databases
-Summary(pt_BR): MySQL - Medições de desempenho
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
Provides: mysql-bench
Obsoletes: mysql-bench
@@ -117,14 +167,14 @@ This package contains MySQL benchmark scripts and data.
%{see_base}
%description bench -l pt_BR
-Este pacote contém medições de desempenho de scripts e dados do MySQL.
+Este pacote contém medições de desempenho de scripts e dados do MySQL.
%package devel
Release: %{release}
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
-Summary(pt_BR): MySQL - Medições de desempenho
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
Provides: mysql-devel
Obsoletes: mysql-devel
@@ -135,8 +185,8 @@ necessary to develop MySQL client applications.
%{see_base}
%description devel -l pt_BR
-Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
-necessárias para desenvolver aplicações clientes do MySQL.
+Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
+necessárias para desenvolver aplicações clientes do MySQL.
%package shared
Release: %{release}
@@ -149,15 +199,23 @@ languages and applications need to dynamically load and use MySQL.
%package Max
Release: %{release}
-Summary: MySQL - server with Berkeley BD, RAID and UDF support
+Summary: MySQL - server with extended functionality
Group: Applications/Databases
Provides: mysql-Max
Obsoletes: mysql-Max
Requires: MySQL-server >= 4.0
%description Max
-Optional MySQL server binary that supports additional features like
-Berkeley DB, RAID and User Defined Functions (UDFs).
+Optional MySQL server binary that supports additional features like:
+
+ - Berkeley DB Storage Engine
+ - Ndbcluster Storage Engine interface
+ - Archive Storage Engine
+ - CSV Storage Engine
+ - Example Storage Engine
+ - MyISAM RAID
+ - User Defined Functions (UDFs).
+
To activate this binary, just install this package in addition to
the standard MySQL package.
@@ -168,8 +226,8 @@ Release: %{release}
Requires: %{name}-devel
Summary: MySQL - embedded library
Group: Applications/Databases
-Summary(pt_BR): MySQL - Medições de desempenho
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
Obsoletes: mysql-embedded
%description embedded
@@ -189,9 +247,6 @@ client/server version.
%setup -n mysql-%{mysql_version}
%build
-# The all-static flag is to make the RPM work on different
-# distributions. This version tries to put shared mysqlclient libraries
-# in a separate package.
BuildMySQL() {
# The --enable-assembler simply does nothing on systems that does not
@@ -221,7 +276,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--includedir=%{_includedir} \
--mandir=%{_mandir} \
--enable-thread-safe-client \
- --with-comment=\"Official MySQL RPM\";
+ --with-readline ;
# Add this for more debugging support
# --with-debug
# Add this for MyISAM RAID support:
@@ -268,10 +323,17 @@ then
fi
BuildMySQL "--enable-shared \
+ --without-openssl \
--with-berkeley-db \
--with-innodb \
+ --with-ndbcluster \
--with-raid \
+ --with-archive \
+ --with-csv-storage-engine \
+ --with-example-storage-engine \
+ --with-blackhole-storage-engine \
--with-embedded-server \
+ --with-comment=\"MySQL Community Edition - Max (GPL)\" \
--with-server-suffix='-Max'"
# Save everything for debug
@@ -281,6 +343,9 @@ BuildMySQL "--enable-shared \
mv sql/mysqld sql/mysqld-max
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
+# Install the ndb binaries
+(cd ndb; make install DESTDIR=$RBR)
+
# Install embedded server library in the build root
install -m 644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql/
@@ -302,15 +367,18 @@ fi
# Now clean up
make clean
-# RPM:s destroys Makefile.in files, so we generate them here
-# aclocal; autoheader; aclocal; automake; autoconf
-# (cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
-
-# Now build the statically linked 4.0 binary (which includes InnoDB)
+#
+# Only link statically on our i386 build host (which has a specially
+# patched static glibc installed) - ia64 and x86_64 run glibc-2.3 (unpatched)
+# so don't link statically there
+#
BuildMySQL "--disable-shared \
+%ifarch i386
--with-mysqld-ldflags='-all-static' \
--with-client-ldflags='-all-static' \
$USE_OTHER_LIBC_DIR \
+%endif
+ --with-comment=\"MySQL Community Edition - Standard (GPL)\" \
--with-server-suffix='%{server_suffix}' \
--without-embedded-server \
--without-berkeley-db \
@@ -404,7 +472,7 @@ useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/nul
chown -R mysql $mysql_datadir
# Initiate databases
-mysql_install_db -IN-RPM --user=mysql
+mysql_install_db --rpm --user=mysql
# Change permissions again to fix any new files.
chown -R mysql $mysql_datadir
@@ -419,6 +487,14 @@ chmod -R og-rw $mysql_datadir/mysql
# Allow safe_mysqld to start mysqld and print a message before we exit
sleep 2
+
+%post ndb-storage
+mysql_clusterdir=/var/lib/mysql-cluster
+
+# Create cluster directory if needed
+if test ! -d $mysql_clusterdir; then mkdir -m755 $mysql_clusterdir; fi
+
+
%post Max
# Restart mysqld, to use the new binary.
echo "Restarting mysqld."
@@ -457,6 +533,7 @@ fi
%doc COPYING README
%doc support-files/my-*.cnf
+%doc support-files/ndb-*.ini
%doc %attr(644, root, root) %{_infodir}/mysql.info*
@@ -480,12 +557,14 @@ fi
%attr(755, root, root) %{_bindir}/myisamlog
%attr(755, root, root) %{_bindir}/myisampack
%attr(755, root, root) %{_bindir}/mysql_convert_table_format
+%attr(755, root, root) %{_bindir}/mysql_create_system_tables
%attr(755, root, root) %{_bindir}/mysql_explain_log
%attr(755, root, root) %{_bindir}/mysql_fix_extensions
%attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables
%attr(755, root, root) %{_bindir}/mysql_install_db
%attr(755, root, root) %{_bindir}/mysql_secure_installation
%attr(755, root, root) %{_bindir}/mysql_setpermission
+%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql
%attr(755, root, root) %{_bindir}/mysql_zap
%attr(755, root, root) %{_bindir}/mysqlbug
%attr(755, root, root) %{_bindir}/mysqld_multi
@@ -536,6 +615,32 @@ fi
%postun shared
/sbin/ldconfig
+%files ndb-storage
+%defattr(-,root,root,0755)
+%attr(755, root, root) %{_sbindir}/ndbd
+
+%files ndb-management
+%defattr(-,root,root,0755)
+%attr(755, root, root) %{_sbindir}/ndb_mgmd
+%attr(755, root, root) %{_bindir}/ndb_mgm
+
+%files ndb-tools
+%defattr(-,root,root,0755)
+%attr(755, root, root) %{_bindir}/ndb_mgm
+%attr(755, root, root) %{_bindir}/ndb_restore
+%attr(755, root, root) %{_bindir}/ndb_waiter
+%attr(755, root, root) %{_bindir}/ndb_select_all
+%attr(755, root, root) %{_bindir}/ndb_select_count
+%attr(755, root, root) %{_bindir}/ndb_desc
+%attr(755, root, root) %{_bindir}/ndb_show_tables
+%attr(755, root, root) %{_bindir}/ndb_test_platform
+
+%files ndb-extra
+%defattr(-,root,root,0755)
+%attr(755, root, root) %{_bindir}/ndb_drop_index
+%attr(755, root, root) %{_bindir}/ndb_drop_table
+%attr(755, root, root) %{_bindir}/ndb_delete_all
+
%files devel
%defattr(-, root, root, 0755)
%doc EXCEPTIONS-CLIENT
@@ -591,15 +696,45 @@ fi
- Added a "make clean" between separate calls to "BuildMySQL".
+* Wed Apr 20 2005 Lenz Grimmer <lenz@mysql.com>
+
+- Enabled the "blackhole" storage engine for the Max RPM
+
* Wed Apr 13 2005 Lenz Grimmer <lenz@mysql.com>
- removed the MySQL manual files (html/ps/texi) - they have been removed
from the MySQL sources and are now available seperately.
+* Mon Feb 14 2005 Lenz Grimmer <lenz@mysql.com>
+
+- Fixed the compilation comments and moved them into the separate build sections
+ for Max and Standard
+
+* Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com>
+
+- enabled the "Ndbcluster" storage engine for the max binary
+- added extra make install in ndb subdir after Max build to get ndb binaries
+- added packages for ndbcluster storage engine
+
+* Fri Jan 14 2005 Lenz Grimmer <lenz@mysql.com>
+
+- replaced obsoleted "BuildPrereq" with "BuildRequires" instead
+
+* Thu Dec 31 2004 Lenz Grimmer <lenz@mysql.com>
+
+- enabled the "Archive" storage engine for the max binary
+- enabled the "CSV" storage engine for the max binary
+- enabled the "Example" storage engine for the max binary
+
* Thu Aug 26 2004 Lenz Grimmer <lenz@mysql.com>
- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860)
+* Fri Aug 20 2004 Lenz Grimmer <lenz@mysql.com>
+
+- do not link statically on IA64/AMD64 as these systems do not have
+ a patched glibc installed
+
* Tue Aug 10 2004 Lenz Grimmer <lenz@mysql.com>
- Added libmygcc.a to the devel subpackage (required to link applications
@@ -609,6 +744,21 @@ fi
- Added EXCEPTIONS-CLIENT to the "devel" package
+* Thu Jul 29 2004 Lenz Grimmer <lenz@mysql.com>
+
+- disabled OpenSSL in the Max binaries again (the RPM packages were the
+ only exception to this anyway) (BUG 1043)
+
+* Wed Jun 30 2004 Lenz Grimmer <lenz@mysql.com>
+
+- fixed server postinstall (mysql_install_db was called with the wrong
+ parameter)
+
+* Thu Jun 24 2004 Lenz Grimmer <lenz@mysql.com>
+
+- added mysql_tzinfo_to_sql to the server subpackage
+- run "make clean" instead of "make distclean"
+
* Mon Apr 05 2004 Lenz Grimmer <lenz@mysql.com>
- added ncurses-devel to the build prerequisites (BUG 3377)
@@ -622,6 +772,10 @@ fi
- added myisam_ftdump to the Server package
+* Tue Jan 13 2004 Lenz Grimmer <lenz@mysql.com>
+
+- link the mysql client against libreadline instead of libedit (BUG 2289)
+
* Mon Dec 22 2003 Lenz Grimmer <lenz@mysql.com>
- marked /etc/logrotate.d/mysql as a config file (BUG 2156)
@@ -634,6 +788,10 @@ fi
- made testing for gcc3 a bit more robust
+* Fri Dec 05 2003 Lenz Grimmer <lenz@mysql.com>
+
+- added missing file mysql_create_system_tables to the server subpackage
+
* Fri Nov 21 2003 Lenz Grimmer <lenz@mysql.com>
- removed dependency on MySQL-client from the MySQL-devel subpackage
diff --git a/support-files/mysqld_multi.server.sh b/support-files/mysqld_multi.server.sh
new file mode 100644
index 00000000000..aaf3f2ebb40
--- /dev/null
+++ b/support-files/mysqld_multi.server.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# A simple startup script for mysqld_multi by Tim Smith and Jani Tolonen.
+# This script assumes that my.cnf file exists either in /etc/my.cnf or
+# /root/.my.cnf and has groups [mysqld_multi] and [mysqldN]. See the
+# mysqld_multi documentation for detailed instructions.
+#
+# This script can be used as /etc/init.d/mysql.server
+#
+# Version 1.0
+#
+
+basedir=/usr/local/mysql
+bindir=/usr/local/mysql/bin
+
+if test -x $bindir/mysqld_multi
+then
+ mysqld_multi="$bindir/mysqld_multi";
+else
+ echo "Can't execute $bindir/mysqld_multi from dir $basedir";
+ exit;
+fi
+
+case "$1" in
+ 'start' )
+ "$mysqld_multi" start $2
+ ;;
+ 'stop' )
+ "$mysqld_multi" stop $2
+ ;;
+ 'report' )
+ "$mysqld_multi" report $2
+ ;;
+ 'restart' )
+ "$mysqld_multi" stop $2
+ "$mysqld_multi" start $2
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|report|restart}" >&2
+ ;;
+esac
diff --git a/support-files/ndb-config-2-node.ini.sh b/support-files/ndb-config-2-node.ini.sh
new file mode 100644
index 00000000000..be80f1dd0b3
--- /dev/null
+++ b/support-files/ndb-config-2-node.ini.sh
@@ -0,0 +1,43 @@
+# Example Ndbcluster storage engine config file.
+#
+[ndbd default]
+NoOfReplicas= 2
+MaxNoOfConcurrentOperations= 10000
+DataMemory= 80M
+IndexMemory= 24M
+TimeBetweenWatchDogCheck= 30000
+DataDir= /var/lib/mysql-cluster
+MaxNoOfOrderedIndexes= 512
+
+[ndb_mgmd default]
+DataDir= /var/lib/mysql-cluster
+
+[ndb_mgmd]
+Id=1
+HostName= localhost
+
+[ndbd]
+Id= 2
+HostName= localhost
+
+[ndbd]
+Id= 3
+HostName= localhost
+
+[mysqld]
+Id= 4
+
+[mysqld]
+Id= 5
+
+[mysqld]
+Id= 6
+
+[mysqld]
+Id= 7
+
+# choose an unused port number
+# in this configuration 63132, 63133, and 63134
+# will be used
+[tcp default]
+PortNumber= 63132