Mailinglist Archive: opensuse-commit (999 mails)

< Previous Next >
commit mysql for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 17 Jul 2009 17:28:54 +0200
  • Message-id: <20090717152855.668046201@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package mysql for openSUSE:Factory
checked in at Fri Jul 17 17:28:54 CEST 2009.


--------
--- mysql/mysql.changes 2009-03-30 01:06:47.000000000 +0200
+++ mysql/mysql.changes 2009-06-23 19:34:24.000000000 +0200
@@ -1,0 +2,207 @@
+Tue Jun 23 19:33:08 CEST 2009 - mhrusecky@xxxxxxx
+
+- extra escaping in rc script just to be sure
+- creating parent directories for logs when they don't exists
+- rc script didn't always exited when it should
+- checking for incompatible databases in way it can be logged
+
+-------------------------------------------------------------------
+Fri Jun 19 13:17:44 CEST 2009 - mhrusecky@xxxxxxx
+
+- actualized README.SuSE
+
+-------------------------------------------------------------------
+Tue Jun 16 14:32:00 CEST 2009 - mhrusecky@xxxxxxx
+
+- updated to 5.1.35, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-35.html
+- fixed some tests
+
+-------------------------------------------------------------------
+Mon Jun 8 13:33:35 CEST 2009 - mhrusecky@xxxxxxx
+
+- putting all log files to subdirectory in /var/log
+
+-------------------------------------------------------------------
+Mon Jun 1 18:33:43 CEST 2009 - mhrusecky@xxxxxxx
+
+- moving socket back to /var/lib/mysql for people with old distributions
+
+-------------------------------------------------------------------
+Sat May 2 13:43:40 CEST 2009 - chris@xxxxxxxxxxxxxxxx
+
+- fdupes fix for fedora
+
+-------------------------------------------------------------------
+Fri May 1 17:55:12 CEST 2009 - chris@xxxxxxxxxxxxxxxx
+
+- beautify spec file
+ o some if's to get Fedora, Centos build
+- to minimize effort for admins
+ o with-charset=utf8
+ o with-collation=utf8_unicode_ci
+
+-------------------------------------------------------------------
+Thu Apr 30 10:58:29 CEST 2009 - mhrusecky@xxxxxxx
+
+- adding upgrade log
+
+-------------------------------------------------------------------
+Tue Apr 28 18:33:22 CEST 2009 - mhrusecky@xxxxxxx
+
+- fixed update so only one at the time is allowed
+
+-------------------------------------------------------------------
+Fri Apr 24 17:27:11 CEST 2009 - mhrusecky@xxxxxxx
+
+- updated to 5.1.34, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-34.html
+- added README.SuSE with notes about version 5.1
+- fixed migration problem from 5.0.X regarding moved pidfile
+
+-------------------------------------------------------------------
+Fri Apr 10 14:40:54 CEST 2009 - mhrusecky@xxxxxxx
+
+- Fixed SSL support on 64-bit machines
+
+-------------------------------------------------------------------
+Tue Apr 7 18:33:16 CEST 2009 - mhrusecky@xxxxxxx
+
+- Merging with development version of MySQL 5.1
+ - following changes were committed since
+ Mon Oct 1 19:55:46 CEST 2007 when package development was
+ branched
+ * Fri Apr 3 16:05:02 CEST 2009 - mhrusecky@xxxxxxx
+ - better fix for rc status
+ - my_safe_process moved to %_bindir
+ * Thu Apr 2 18:41:08 CEST 2009 - mhrusecky@xxxxxxx
+ - updated to 5.1.33, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-33.html
+ - fixed path dependent build of scripts
+ * Tue Mar 17 19:10:09 CET 2009 - mhrusecky@xxxxxxx
+ - localstatedir is back to /var/lib/mysql as it is used as
+ default value for datadir
+ - fixed upgrade using datadir
+ * Tue Mar 17 18:23:35 CET 2009 - mhrusecky@xxxxxxx
+ - mysql_install_db now uses group option too
+ - log file migrated to /var/log
+ * Thu Mar 12 18:07:24 CET 2009 - mhrusecky@xxxxxxx
+ - Fixing mysql-test so it can be installed in
+ /usr/share/mysql-test
+ * Mon Mar 9 20:17:32 CET 2009 - mhrusecky@xxxxxxx
+ - Adjusting suse-test-run as there is no longer mysql-Max
+ package
+ * Fri Mar 6 15:59:40 CET 2009 - mhrusecky@xxxxxxx
+ - updated to 5.1.32, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-32.html
+ - mysql-5.1.31-test-allowed-packets.patch no longer needed
+ as it was fixed upstream
+ * Tue Mar 3 19:53:11 CET 2009 - mhrusecky@xxxxxxx
+ - moving tmp and socket/pidfiles directories to the better
+ location
+ * Mon Mar 2 14:40:19 CET 2009 - mhrusecky@xxxxxxx
+ - dropping mysql-storage-plugins package (now part of mysql
+ base package)
+ * Fri Feb 27 16:04:57 CET 2009 - mhrusecky@xxxxxxx
+ - fixed main.variables-big test
+ * Thu Feb 26 17:48:51 CET 2009 - mhrusecky@xxxxxxx
+ - fixed federated plugin to avoid versioning
+ - fixed main.mysqlbinlog_row_big test
+ - fixed dependencies and other things because of dropped
+ mysql-Max
+ * Mon Feb 23 17:28:38 CET 2009 - mhrusecky@xxxxxxx
+ - updated to 5.1.31, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-31.html
+ * mysql-5.1.30-test-daemon-sbin.patch no longer needed as
+ something better was accepted upstream
+ * mysql-openssl-test.patch is already in upstream too
+ * Mon Feb 23 15:25:22 CET 2009 - mhrusecky@xxxxxxx
+ - dropping unused rc.mysql file
+ - fixed status detection
+ * Fri Feb 20 15:06:22 CET 2009 - mhrusecky@xxxxxxx
+ - innodb support compiled as a static part of MySQL
+ - getting rid of sysconfig
+ * Tue Jan 20 18:39:38 CET 2009 - mhrusecky@xxxxxxx
+ - automatic plugins loading
+ * Mon Jan 5 18:34:40 CET 2009 - mhrusecky@xxxxxxx
+ - init script checks for relative paths (bnc#463586)
+ * Mon Dec 8 17:27:29 CET 2008 - mhrusecky@xxxxxxx
+ - updated to 5.1.30, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-28.html
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-29.html
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-30.html
+ - indentation in rc scripts fixed (bnc#435519)
+ - more comments and minor fixes in spec file
+ - using symlinks for mysql-test-run and mtr as these are the
+ same files and they needs some patching
+ - fixed some of the automatic tests
+ - dropping some patches which are no longer used
+ * Thu Sep 25 12:05:46 CEST 2008 - mmarek@xxxxxxx
+ - merged init script changes from the 5.0 package
+ * Wed Jul 30 14:57:46 CEST 2008 - mmarek@xxxxxxx
+ - updated to 5.1.26-rc, see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-26.html
+ * Fri Jul 4 12:58:41 CEST 2008 - mmarek@xxxxxxx
+ - updated to 5.1.25-rc, for changes see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-24.html
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-25.html
+ * Fri Mar 14 14:19:36 CET 2008 - mmarek@xxxxxxx
+ - fixed mysqld_multi.patch (bnc#371000)
+ * Fri Mar 14 13:31:01 CET 2008 - mmarek@xxxxxxx
+ - add 'user = mysql' to mysqld_multi example groups
+ * Fri Mar 14 09:06:11 CET 2008 - mmarek@xxxxxxx
+ - dropped README.SUSE (bnc#357634)
+ - moved mysql_upgrade to the server package (bnc#366820)
+ * Thu Mar 13 17:29:32 CET 2008 - mmarek@xxxxxxx
+ - adjusted license tags
+ * Wed Mar 12 18:48:52 CET 2008 - mmarek@xxxxxxx
+ - finally convert err-log to log-error in my.cnf
+ * Wed Mar 12 17:58:03 CET 2008 - mmarek@xxxxxxx
+ - shortened the comment in sysconfig.mysql, a detailed
+ description or HOWTO can be added to a README (created a
+ draft)
+ * Wed Mar 12 16:03:16 CET 2008 - mmarek@xxxxxxx
+ - don't preinstall /var/lib/mysql-databases, create datadirs
+ in mysqld_multi on first startup insteal
+ * Tue Mar 11 13:38:33 CET 2008 - mmarek@xxxxxxx
+ - updated to 5.1.23-rc
+ * fixes CVE-2007-5970
+ * for other changes see
+ http://dev.mysql.com/doc/refman/5.1/en/news-5-1-23.html
+ * Tue Feb 12 12:00:00 CET 2008 - richard@xxxxxxxxxx
+ - Added multi database support by
+ o updating /etc/init.d/mysql, it has now 2 legs the existing
+ one to start a single database, and a new one to start and
+ stop multiple database.
+ o Added a sysconfig variable
+ o Added a directory /var/lib/mysql-databases to hold
+ databases,
+ o Updated /etc/my.cnf with some examples database
+ configurations
+ * Fri Nov 9 15:51:08 CET 2007 - mmarek@xxxxxxx
+ - removed the sles9 workaround that's not needed anymore and
+ breaks sles9 builds instead
+ * Wed Oct 10 22:30:44 CEST 2007 - mmarek@xxxxxxx
+ - merged the standard and Max server packages
+ - example, csv and federated storage engines are packaged in
+ mysql-storage-plugins
+ - build the NDB cluster:
+ * mysql-ndb-storage
+ * mysql-ndb-management
+ * mysql-ndb-tools
+ * mysql-ndb-extra
+ - removed libmysqlclient static libraries and .la files
+ - moved libmysqlclient and libmysqld to %%_libdir, %%_libdir/mysql
+ will only be used for the server plugins
+ * Mon Oct 1 19:55:46 CEST 2007 - mmarek@xxxxxxx
+ - initial 5.1 packaging (5.1.22-rc)
++++ 10 more lines (skipped)
++++ between mysql/mysql.changes
++++ and mysql/mysql.changes

calling whatdependson for head-i586


Old:
----
minmem
mysql-5.0.67-CVE-2008-2079.patch
mysql-5.0.67-compiler-warnings.patch
mysql-5.0.67-mysql_config.patch
mysql-5.0.67-mysql_install_db-localhost.patch
mysql-5.0.67.tar.bz2
mysql-vpath.patch
rc.mysql
sysconfig.mysql

New:
----
README.SuSE
libmysql-no-pkglibdir.patch
mysql-5.1.23-vpath.patch
mysql-5.1.30-federated-workaround.patch
mysql-5.1.31-shebang.patch
mysql-5.1.32-myslq-test.patch
mysql-5.1.33-safe-process-in-bin.patch
mysql-5.1.33-scripts-paths.patch
mysql-5.1.33-ssl-lib64-macro.patch
mysql-5.1.34-code-cleanup.patch
mysql-5.1.35-test-events_stress-cleanup.patch
mysql-5.1.35-test-rpl_ndb_circular.patch
mysql-5.1.35-test-utf8.patch
mysql-5.1.35-test-variables-big.patch
mysql-5.1.35.tar.bz2
mysql-enable-plugins.patch
mysql-plugins-avoid-version.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mysql.spec ++++++
++++ 965 lines (skipped)
++++ between mysql/mysql.spec
++++ and mysql/mysql.spec

++++++ README.SuSE ++++++
Notes about MySQL 5.1 package:
==============================

With MySQL 5.1 package we introduced some changes you may like to know. Most of
them will affect you only if you are upgrading from previous version and you
did some changes to your configuration, but I'll try to explain most notable
changes.

1) Plugins:
===========

One of the new features in MySQL 5.1 is support for plugins. So some of the
storage engines are now shipped like that. You can use following plugins:

- archive
- blackhole
- federated
- example

As you see, InnoDB is still compiled as internal part of MySQL. If you are
upgrading from version 5.0 or if this is your first installation of MySQL 5.1,
all plugins will be enabled by default and you can disable them manually later
(see http://dev.mysql.com/doc/refman/5.1/en/uninstall-plugin.html).

With this change you need to remove skip-federated option from your my.cnf file
if you have changed it manually. This option was there by default in previous
versions of MySQL.

2) File locations:
==================

There were some changes in files locations. Most of them was made in default
configuration file so if you are experiencing problems and you have made some
manual adjustments to your /etc/my.cnf, try to merge this file with
/etc/my.cnf.rpmnew.

First of them is that MySQL socket file and pid file were moved from
/var/lib/mysql to more reasonable location ( /var/run/mysql ) by default.
Second change is that MySQL log files are in /var/log/mysql.

3) BerkeleyDB:
==============

Other important change is that MySQL no longer contains BerkeleyDB as storage
engine. There is no fix for that and if you used it before, you have to migrate
your data to different storage engine BEFORE updating. This can be done for
example using following command:
ALTER TABLE foo ENGINE = INNODB;

4) MySQL Upgrade Log
====================

Last thing you may find useful is that if you missed messages displayed during
automatic MySQL database upgrade, you can find them from now on in
/var/log/mysql/mysql_upgrade.log

++++++ libmysql-no-pkglibdir.patch ++++++
---
libmysql/Makefile.shared | 2 +-
libmysqld/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

--- libmysql/Makefile.shared.orig
+++ libmysql/Makefile.shared
@@ -26,7 +26,7 @@ MYSQLBASEdir= $(prefix)
## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
## until someone complains that they need separate options.
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
-pkglib_LTLIBRARIES = $(target)
+lib_LTLIBRARIES = $(target)

noinst_PROGRAMS = conf_to_src

--- libmysqld/Makefile.am.orig
+++ libmysqld/Makefile.am
@@ -36,7 +36,7 @@ INCLUDES= -I$(top_builddir)/include -I$
@condition_dependent_plugin_includes@

noinst_LIBRARIES = libmysqld_int.a
-pkglib_LIBRARIES = libmysqld.a
+lib_LIBRARIES = libmysqld.a
SUBDIRS = . examples
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
++++++ mysql-5.1.23-vpath.patch ++++++
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- configure.in.orig
+++ configure.in
@@ -2495,7 +2495,7 @@ else
fi

# if there is no readline, but we want to build with readline, we fail
- if [test "$want_to_use_readline" = "yes"] && [test ! -d
"./cmd-line-utils/readline"]
+ if [test "$want_to_use_readline" = "yes"] && [test ! -d
"$srcdir/cmd-line-utils/readline"]
then
AC_MSG_ERROR([This commercially licensed MySQL source package can't
be built with libreadline. Please use --with-libedit to use
++++++ mysql-5.1.30-federated-workaround.patch ++++++
--- storage/federated/ha_federated.cc
+++ storage/federated/ha_federated.cc
@@ -385,6 +385,12 @@

#include <mysql/plugin.h>

+
+// Quick and ugly plugin workaround
+#ifdef MYSQL_DYNAMIC_PLUGIN
+#include "../../mysys/string.c"
+#endif
+
/* Variables for federated share methods */
static HASH federated_open_tables; // To track open tables
pthread_mutex_t federated_mutex; // To init the hash
++++++ mysql-5.1.31-shebang.patch ++++++
diff -Naru mysql-5.1.31-bak/mysql-test/t/long_tmpdir-master.sh
mysql-5.1.31/mysql-test/t/long_tmpdir-master.sh
--- mysql-5.1.31-bak/mysql-test/t/long_tmpdir-master.sh 2009-02-23
17:18:48.000000000 +0100
+++ mysql-5.1.31/mysql-test/t/long_tmpdir-master.sh 2009-02-24
17:57:42.000000000 +0100
@@ -1,3 +1,4 @@
+#!/bin/sh

d="$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789"
test -d "$d" || mkdir "$d"
rm -f "$d"/*
diff -Naru mysql-5.1.31-bak/mysql-test/t/lowercase_mixed_tmpdir-master.sh
mysql-5.1.31/mysql-test/t/lowercase_mixed_tmpdir-master.sh
--- mysql-5.1.31-bak/mysql-test/t/lowercase_mixed_tmpdir-master.sh
2009-02-23 17:18:48.000000000 +0100
+++ mysql-5.1.31/mysql-test/t/lowercase_mixed_tmpdir-master.sh 2009-02-24
17:58:12.000000000 +0100
@@ -1,3 +1,4 @@
+#!/bin/sh
# This test requires a non-lowercase tmpdir directory on a case-sensitive
# filesystem.

diff -Naru mysql-5.1.31-bak/sql-bench/graph-compare-results.sh
mysql-5.1.31/sql-bench/graph-compare-results.sh
--- mysql-5.1.31-bak/sql-bench/graph-compare-results.sh 2009-02-23
17:18:49.000000000 +0100
+++ mysql-5.1.31/sql-bench/graph-compare-results.sh 2009-02-24
18:00:16.000000000 +0100
@@ -1,3 +1,4 @@
+#/usr/bin/perl
####
#### Hello ... this is a heavily hacked script by Luuk
#### instead of printing the result it makes a nice gif
++++++ mysql-5.1.32-myslq-test.patch ++++++
--- mysql-test/Makefile.am 2009-03-08 23:37:11.000000000 +0100
+++ mysql-test/Makefile.am 2009-03-08 23:38:26.000000000 +0100
@@ -17,7 +17,7 @@

## Process this file with automake to create Makefile.in

-testdir = $(prefix)/mysql-test
+testdir = $(datadir)/mysql-test

test_SCRIPTS = mtr \
mysql-test-run \
--- mysql-test/lib/My/SafeProcess/Makefile.am 2009-03-09 12:50:57.521700294
+0100
+++ mysql-test/lib/My/SafeProcess/Makefile.am 2009-03-09 12:51:37.539325167
+0100
@@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-safedir = $(prefix)/mysql-test/lib/My/SafeProcess
+safedir = $(datadir)/mysql-test/lib/My/SafeProcess
#nobase_bin_PROGRAMS = ...
safe_PROGRAMS = my_safe_process

--- mysql-test/lib/mtr_cases.pm 2009-03-12 17:58:00.000000000 +0100
+++ mysql-test/lib/mtr_cases.pm 2009-03-12 18:02:28.000000000 +0100
@@ -231,7 +231,10 @@
["mysql-test/suite",
"mysql-test",
# Look in storage engine specific suite dirs
- "storage/*/mysql-test-suites"
+ "storage/*/mysql-test-suites",
+ # Look in subdirectories too
+ "*/mysql-test/suite",
+ "*/mysql-test"
],
[$suite]);
}
++++++ mysql-5.1.33-safe-process-in-bin.patch ++++++
--- mysql-test/lib/My/SafeProcess.pm 2009-04-03 15:14:38.000000000 +0200
+++ mysql-test/lib/My/SafeProcess.pm 2009-03-13 22:49:26.000000000 +0100
@@ -86,7 +86,7 @@
my $safe_kill;
if (IS_WIN32PERL or IS_CYGWIN){
# Use my_safe_process.exe
+ my $exe= my_find_bin(".", ["../../bin","lib/My/SafeProcess",
"My/SafeProcess"],
- my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
"my_safe_process");
push(@safe_process_cmd, $exe);

@@ -96,7 +96,7 @@
else
{
# Use my_safe_process
+ my $exe= my_find_bin(".", ["../../bin", "lib/My/SafeProcess",
"My/SafeProcess"],
- my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
"my_safe_process");
push(@safe_process_cmd, $exe);
}
++++++ mysql-5.1.33-scripts-paths.patch ++++++
--- scripts/Makefile.am 2009-04-02 18:29:00.292563355 +0200
+++ scripts/Makefile.am 2009-04-02 18:21:50.462559739 +0200
@@ -110,7 +110,7 @@
mysql_fix_privilege_tables.sql: mysql_system_tables.sql \
mysql_system_tables_fix.sql
@echo "Building $@";
- @cat mysql_system_tables.sql mysql_system_tables_fix.sql > $@
+ @cat $(top_srcdir)/scripts/mysql_system_tables.sql
$(top_srcdir)/scripts/mysql_system_tables_fix.sql > $@

#
# Build mysql_fix_privilege_tables_sql.c from
@@ -123,7 +123,7 @@
sleep 2
$(top_builddir)/scripts/comp_sql$(EXEEXT) \
mysql_fix_privilege_tables \
- $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@
+ $(top_builddir)/scripts/mysql_fix_privilege_tables.sql $@


SUFFIXES = .sh
++++++ mysql-5.1.33-ssl-lib64-macro.patch ++++++
--- config/ac-macros/ssl.m4 2009-04-10 14:05:07.000000000 +0200
+++ config/ac-macros/ssl.m4 2009-04-10 14:15:15.000000000 +0200
@@ -102,7 +102,7 @@
#
# Try to link with openSSL libs in <location>
#
- openssl_libs="-L$location/lib/ -lssl -lcrypto"
+ openssl_libs="-L$location/lib -L$location/lib64 -lssl -lcrypto"
MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])

if test "$mysql_ssl_found" == "no"
++++++ mysql-5.1.34-code-cleanup.patch ++++++
diff -Naru mysql-5.1.34-bak/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
mysql-5.1.34/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
--- mysql-5.1.34-bak/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
2009-03-31 16:40:38.000000000 +0200
+++ mysql-5.1.34/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
2009-04-20 19:50:32.000000000 +0200
@@ -7522,7 +7522,7 @@
}
releaseSections(signal);

- DictObject * old_ptr_p = old_ptr_p = get_object(tableName, len);
+ DictObject * old_ptr_p = get_object(tableName, len);
if(old_ptr_p)
obj_id = old_ptr_p->m_id;
} else {
diff -Naru mysql-5.1.34-bak/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
mysql-5.1.34/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
--- mysql-5.1.34-bak/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
2009-03-31 16:40:47.000000000 +0200
+++ mysql-5.1.34/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
2009-04-20 19:47:28.000000000 +0200
@@ -209,8 +209,8 @@

char tmpLine[MAX_LINE_LENGTH];
BaseString::snprintf(tmpLine, MAX_LINE_LENGTH, "EXTERNAL SYSTEM_");
- strncat(tmpLine, system, MAX_LINE_LENGTH);
- strncat(tmpLine, ":NoOfConnections", MAX_LINE_LENGTH);
+ strncat(tmpLine, system, MAX_LINE_LENGTH-strlen(tmpLine)-1);
+ strncat(tmpLine, ":NoOfConnections", MAX_LINE_LENGTH-strlen(tmpLine)-1);
ctx.m_config->put(tmpLine, nExtConnections);

Config * ret = new Config();
++++++ mysql-5.1.35-test-events_stress-cleanup.patch ++++++
Index: mysql-test/r/events_stress.result
===================================================================
--- mysql-test/r/events_stress.result.orig
+++ mysql-test/r/events_stress.result
@@ -63,3 +63,4 @@ DROP TABLE fill_it1;
DROP TABLE fill_it2;
DROP TABLE fill_it3;
DROP DATABASE events_test;
+SET GLOBAL event_scheduler=off;
Index: mysql-test/t/events_stress.test
===================================================================
--- mysql-test/t/events_stress.test.orig
+++ mysql-test/t/events_stress.test
@@ -135,3 +135,4 @@ DROP USER event_user3@localhost;
#

DROP DATABASE events_test;
+SET GLOBAL event_scheduler=off;
++++++ mysql-5.1.35-test-rpl_ndb_circular.patch ++++++
Index: mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
===================================================================
--- mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result.orig
+++ mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
@@ -99,5 +99,5 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
-STOP SLAVE;
DROP TABLE t1;
+STOP SLAVE;
Index: mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
===================================================================
--- mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result.orig
+++ mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
@@ -102,3 +102,4 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
+DROP TABLE t1;
Index: mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
===================================================================
--- mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test.orig
+++ mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
@@ -53,8 +53,5 @@ SELECT * FROM t1 ORDER BY a;
# stop replication on "master" as not to replicate
# shutdown circularly, eg drop table
--connection master
-STOP SLAVE;
-
-# cleanup
---connection master
DROP TABLE t1;
+STOP SLAVE;
Index: mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
===================================================================
--- mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test.orig
+++ mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
@@ -78,3 +78,6 @@ SELECT * FROM t1 ORDER BY a;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;
+
+connection master;
+DROP TABLE t1;
++++++ mysql-5.1.35-test-utf8.patch ++++++
Index: mysql-test/r/information_schema.result
===================================================================
--- mysql-test/r/information_schema.result.orig
+++ mysql-test/r/information_schema.result
@@ -9,7 +9,7 @@ create user mysqltest_3@localhost;
create user mysqltest_3;
select * from information_schema.SCHEMATA where schema_name > 'm';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME
DEFAULT_COLLATION_NAME SQL_PATH
-NULL mtr latin1 latin1_swedish_ci NULL
+NULL mtr utf8 utf8_unicode_ci NULL
NULL mysql latin1 latin1_swedish_ci NULL
NULL test latin1 latin1_swedish_ci NULL
select schema_name from information_schema.schemata;
Index: mysql-test/r/mysql_comments.result
===================================================================
--- mysql-test/r/mysql_comments.result.orig
+++ mysql-test/r/mysql_comments.result
@@ -13,23 +13,23 @@ drop trigger if exists t1_bi;
foofct("call 1")
call 1
Function sql_mode Create Function character_set_client
collation_connection Database Collation
-foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nreturn\n\n\n\nx latin1
latin1_swedish_ci latin1_swedish_ci
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nreturn\n\n\n\nx utf8 utf8_unicode_ci
latin1_swedish_ci
foofct("call 2")
call 2
Function sql_mode Create Function character_set_client
collation_connection Database Collation
-foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nbegin\n \n \n \n\n \n\n \n return
x;\nend latin1 latin1_swedish_ci latin1_swedish_ci
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nbegin\n \n \n \n\n \n\n \n return
x;\nend utf8 utf8_unicode_ci latin1_swedish_ci
Procedure sql_mode Create Procedure character_set_client
collation_connection Database Collation
-empty CREATE DEFINER=`root`@`localhost` PROCEDURE
`empty`()\nbegin\nend latin1 latin1_swedish_ci latin1_swedish_ci
+empty CREATE DEFINER=`root`@`localhost` PROCEDURE
`empty`()\nbegin\nend utf8 utf8_unicode_ci latin1_swedish_ci
id data
foo 42
Procedure sql_mode Create Procedure character_set_client
collation_connection Database Collation
-foosp CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert
into test.t1\n\n\n\n\n \n\n \n values ("foo", 42) latin1
latin1_swedish_ci latin1_swedish_ci
+foosp CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert
into test.t1\n\n\n\n\n \n\n \n values ("foo", 42) utf8
utf8_unicode_ci latin1_swedish_ci
Procedure sql_mode Create Procedure character_set_client
collation_connection Database Collation
-nicesp CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a
int)\nbegin\n \n declare b int;\n declare c float;\n\n \n \n\n \nend
latin1 latin1_swedish_ci latin1_swedish_ci
+nicesp CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a
int)\nbegin\n \n declare b int;\n declare c float;\n\n \n \n\n \nend
utf8 utf8_unicode_ci latin1_swedish_ci
Trigger sql_mode SQL Original Statement character_set_client
collation_connection Database Collation
-t1_empty CREATE DEFINER=`root`@`localhost` trigger t1_empty
after delete on t1\nfor each row\nbegin\nend latin1 latin1_swedish_ci
latin1_swedish_ci
+t1_empty CREATE DEFINER=`root`@`localhost` trigger t1_empty
after delete on t1\nfor each row\nbegin\nend utf8 utf8_unicode_ci
latin1_swedish_ci
Trigger sql_mode SQL Original Statement character_set_client
collation_connection Database Collation
-t1_bi CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert
on t1\nfor each row\nbegin\n\n\n\n \n declare b int;\n declare c float;\n\n
\n \n\n \n set NEW.data := 12;\nend latin1 latin1_swedish_ci
latin1_swedish_ci
+t1_bi CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert
on t1\nfor each row\nbegin\n\n\n\n \n declare b int;\n declare c float;\n\n
\n \n\n \n set NEW.data := 12;\nend utf8 utf8_unicode_ci
latin1_swedish_ci
id data
trig 12
"Pass 2 : --enable-comments"
@@ -40,23 +40,23 @@ trig 12
foofct("call 1")
call 1
Function sql_mode Create Function character_set_client
collation_connection Database Collation
-foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nreturn\n-- comment 1a\n# comment 1b\n/*
comment 1c */\nx # after body, on same line latin1 latin1_swedish_ci
latin1_swedish_ci
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nreturn\n-- comment 1a\n# comment 1b\n/*
comment 1c */\nx # after body, on same line utf8 utf8_unicode_ci
latin1_swedish_ci
foofct("call 2")
call 2
Function sql_mode Create Function character_set_client
collation_connection Database Collation
-foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nbegin\n -- comment 1a\n # comment 1b\n /*\n
comment 1c\n */\n\n -- empty line below\n\n -- empty line above\n
return x;\nend latin1 latin1_swedish_ci latin1_swedish_ci
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20))
RETURNS char(20) CHARSET latin1\nbegin\n -- comment 1a\n # comment 1b\n /*\n
comment 1c\n */\n\n -- empty line below\n\n -- empty line above\n
return x;\nend utf8 utf8_unicode_ci latin1_swedish_ci
Procedure sql_mode Create Procedure character_set_client
collation_connection Database Collation
-empty CREATE DEFINER=`root`@`localhost` PROCEDURE
`empty`()\nbegin\nend latin1 latin1_swedish_ci latin1_swedish_ci
+empty CREATE DEFINER=`root`@`localhost` PROCEDURE
`empty`()\nbegin\nend utf8 utf8_unicode_ci latin1_swedish_ci
id data
foo 42
Procedure sql_mode Create Procedure character_set_client
collation_connection Database Collation
-foosp CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert
into test.t1\n## These comments are part of the procedure body, and should be
kept.\n# Comment 2a\n-- Comment 2b\n/* Comment 2c */\n -- empty line below\n\n
-- empty line above\n values ("foo", 42) # comment 3, still part of the body
latin1 latin1_swedish_ci latin1_swedish_ci
+foosp CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert
into test.t1\n## These comments are part of the procedure body, and should be
kept.\n# Comment 2a\n-- Comment 2b\n/* Comment 2c */\n -- empty line below\n\n
-- empty line above\n values ("foo", 42) # comment 3, still part of the body
utf8 utf8_unicode_ci latin1_swedish_ci
Procedure sql_mode Create Procedure character_set_client
collation_connection Database Collation
-nicesp CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a
int)\nbegin\n -- declare some variables here\n declare b int;\n declare c
float;\n\n -- do more stuff here\n -- commented nicely and so on\n\n --
famous last words ...\nend latin1 latin1_swedish_ci
latin1_swedish_ci
+nicesp CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a
int)\nbegin\n -- declare some variables here\n declare b int;\n declare c
float;\n\n -- do more stuff here\n -- commented nicely and so on\n\n --
famous last words ...\nend utf8 utf8_unicode_ci latin1_swedish_ci
Trigger sql_mode SQL Original Statement character_set_client
collation_connection Database Collation
-t1_empty CREATE DEFINER=`root`@`localhost` trigger t1_empty
after delete on t1\nfor each row\nbegin\nend latin1 latin1_swedish_ci
latin1_swedish_ci
+t1_empty CREATE DEFINER=`root`@`localhost` trigger t1_empty
after delete on t1\nfor each row\nbegin\nend utf8 utf8_unicode_ci
latin1_swedish_ci
Trigger sql_mode SQL Original Statement character_set_client
collation_connection Database Collation
-t1_bi CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert
on t1\nfor each row\nbegin\n# comment 1a\n-- comment 1b\n/*\n comment
1c\n*/\n -- declare some variables here\n declare b int;\n declare c
float;\n\n -- do more stuff here\n -- commented nicely and so on\n\n --
famous last words ...\n set NEW.data := 12;\nend latin1
latin1_swedish_ci latin1_swedish_ci
+t1_bi CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert
on t1\nfor each row\nbegin\n# comment 1a\n-- comment 1b\n/*\n comment
1c\n*/\n -- declare some variables here\n declare b int;\n declare c
float;\n\n -- do more stuff here\n -- commented nicely and so on\n\n --
famous last words ...\n set NEW.data := 12;\nend utf8 utf8_unicode_ci
latin1_swedish_ci
id data
trig 12
End of 5.0 tests
++++++ mysql-5.1.35-test-variables-big.patch ++++++
Index: mysql-test/t/variables-big.test
===================================================================
--- mysql-test/t/variables-big.test.orig
+++ mysql-test/t/variables-big.test
@@ -38,18 +38,18 @@
--disable_warnings
SET SESSION transaction_prealloc_size=1024*1024*1024*1;
--replace_column 1 <Id> 6 <Time>
-SHOW PROCESSLIST;
+SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size';
SET SESSION transaction_prealloc_size=1024*1024*1024*2;
--replace_column 1 <Id> 6 <Time>
-SHOW PROCESSLIST;
+SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size';
SET SESSION transaction_prealloc_size=1024*1024*1024*3;
--replace_column 1 <Id> 6 <Time>
-SHOW PROCESSLIST;
+SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size';
SET SESSION transaction_prealloc_size=1024*1024*1024*4;
--replace_column 1 <Id> 6 <Time>
-SHOW PROCESSLIST;
+SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size';
SET SESSION transaction_prealloc_size=1024*1024*1024*5;
--replace_column 1 <Id> 6 <Time>
-SHOW PROCESSLIST;
+SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size';
--enable_warnings

++++++ mysql-5.0.67.tar.bz2 -> mysql-5.1.35.tar.bz2 ++++++
mysql/mysql-5.0.67.tar.bz2 mysql/mysql-5.1.35.tar.bz2 differ: char 11, line 1

++++++ mysql-cnf.patch ++++++
--- /var/tmp/diff_new_pack.ylcAX3/_old 2009-07-17 17:26:44.000000000 +0200
+++ /var/tmp/diff_new_pack.ylcAX3/_new 2009-07-17 17:26:44.000000000 +0200
@@ -1,67 +1,67 @@
----
- support-files/my-huge.cnf.sh | 4 ++++
- support-files/my-large.cnf.sh | 4 ++++
- support-files/my-medium.cnf.sh | 6 +++++-
- support-files/my-small.cnf.sh | 4 ++++
- 4 files changed, 17 insertions(+), 1 deletion(-)
-
---- support-files/my-huge.cnf.sh.orig
-+++ support-files/my-huge.cnf.sh
-@@ -133,6 +133,10 @@ server-id = 1
+diff -Naru mysql-5.1.33-bak/support-files/my-huge.cnf.sh
mysql-5.1.33/support-files/my-huge.cnf.sh
+--- mysql-5.1.33-bak/support-files/my-huge.cnf.sh 2009-04-03
15:24:32.000000000 +0200
++++ mysql-5.1.33/support-files/my-huge.cnf.sh 2009-04-03 15:24:49.000000000
+0200
+@@ -134,6 +134,10 @@
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

+# The safe_mysqld script
+[safe_mysqld]
-+log-error=@localstatedir@/mysqld.log
++log-error=/var/log/mysql/mysqld.log
+
[mysqldump]
quick
max_allowed_packet = 16M
---- support-files/my-large.cnf.sh.orig
-+++ support-files/my-large.cnf.sh
-@@ -133,6 +133,10 @@ server-id = 1
+diff -Naru mysql-5.1.33-bak/support-files/my-large.cnf.sh
mysql-5.1.33/support-files/my-large.cnf.sh
+--- mysql-5.1.33-bak/support-files/my-large.cnf.sh 2009-04-03
15:24:32.000000000 +0200
++++ mysql-5.1.33/support-files/my-large.cnf.sh 2009-04-03 15:24:49.000000000
+0200
+@@ -134,6 +134,10 @@
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

+# The safe_mysqld script
+[safe_mysqld]
-+log-error=@localstatedir@/mysqld.log
++log-error=/var/log/mysql/mysqld.log
+
[mysqldump]
quick
max_allowed_packet = 16M
---- support-files/my-medium.cnf.sh.orig
-+++ support-files/my-medium.cnf.sh
-@@ -46,7 +46,7 @@ myisam_sort_buffer_size = 8M
-
- # Replication Master Server (default)
- # binary logging is required for replication
--log-bin=mysql-bin
-+# log-bin=mysql-bin
-
- # required unique id between 1 and 2^32 - 1
- # defaults to 1 if master-host is not set
-@@ -131,6 +131,10 @@ server-id = 1
+diff -Naru mysql-5.1.33-bak/support-files/my-medium.cnf.sh
mysql-5.1.33/support-files/my-medium.cnf.sh
+--- mysql-5.1.33-bak/support-files/my-medium.cnf.sh 2009-04-03
15:24:32.000000000 +0200
++++ mysql-5.1.33/support-files/my-medium.cnf.sh 2009-04-03
15:24:49.000000000 +0200
+@@ -26,6 +26,8 @@
+ [mysqld]
+ port = @MYSQL_TCP_PORT@
+ socket = @MYSQL_UNIX_ADDR@
++# Change following line if you want to store your database elsewhere
++datadir = /var/lib/mysql
+ skip-locking
+ key_buffer = 16M
+ max_allowed_packet = 1M
+@@ -132,7 +134,13 @@
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

+# The safe_mysqld script
+[safe_mysqld]
-+log-error=@localstatedir@/mysqld.log
++log-error = /var/log/mysql/mysqld.log
++socket = @MYSQL_UNIX_ADDR@
+
[mysqldump]
++socket = @MYSQL_UNIX_ADDR@
quick
max_allowed_packet = 16M
---- support-files/my-small.cnf.sh.orig
-+++ support-files/my-small.cnf.sh
-@@ -66,6 +66,10 @@ server-id = 1
+
+diff -Naru mysql-5.1.33-bak/support-files/my-small.cnf.sh
mysql-5.1.33/support-files/my-small.cnf.sh
+--- mysql-5.1.33-bak/support-files/my-small.cnf.sh 2009-04-03
15:24:32.000000000 +0200
++++ mysql-5.1.33/support-files/my-small.cnf.sh 2009-04-03 15:24:49.000000000
+0200
+@@ -65,6 +65,10 @@
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

+# The safe_mysqld script
+[safe_mysqld]
-+log-error=@localstatedir@/mysqld.log
++log-error = /var/log/mysql/mysqld.log
+
[mysqldump]
quick

++++++ mysql-enable-plugins.patch ++++++
diff -Naru scripts/mysql_fix_privilege_tables.sql
scripts/mysql_fix_privilege_tables.sql
--- scripts/mysql_fix_privilege_tables.sql 2008-11-14 18:03:14.000000000
+0100
+++ scripts/mysql_fix_privilege_tables.sql 2009-01-09 18:57:47.000000000
+0100
@@ -24,6 +24,17 @@

CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL,
dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER
SET utf8 COLLATE utf8_bin comment='MySQL plugins';

+-- Remember for later if plugin table already existed
+set @had_plugin_table= @@warning_count != 0;
+
+-- Install plugins by default if they didn't existed
+CREATE TEMPORARY TABLE tmp_plugin LIKE plugin;
+INSERT INTO tmp_plugin (name,dl) VALUES ('ARCHIVE','ha_archive.so');
+INSERT INTO tmp_plugin (name,dl) VALUES ('FEDERATED','ha_federated.so');
+INSERT INTO tmp_plugin (name,dl) VALUES ('BLACKHOLE','ha_blackhole.so');
+INSERT INTO tmp_plugin (name,dl) VALUES ('EXAMPLE','ha_example.so');
+INSERT INTO plugin SELECT * FROM tmp_plugin WHERE @had_plugin_table=0;
+DROP TABLE tmp_plugin;

CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '',
Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username
char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port
INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper
char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY
(Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';

diff -Naru scripts/mysql_fix_privilege_tables_sql.c
scripts/mysql_fix_privilege_tables_sql.c
--- scripts/mysql_fix_privilege_tables_sql.c 2008-11-14 18:03:19.000000000
+0100
+++ scripts/mysql_fix_privilege_tables_sql.c 2009-01-09 19:02:35.000000000
+0100
@@ -36,6 +36,17 @@
"\n "
"CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL,
dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER
SET utf8 COLLATE utf8_bin comment='MySQL plugins';\n "
"\n "
+"-- Remember for later if plugin table already existed\n "
+"set @had_plugin_table= @@warning_count != 0;\n "
+"\n "
+"-- Install plugins by default if they didn't existed\n "
+"CREATE TEMPORARY TABLE tmp_plugin LIKE plugin;\n "
+"INSERT INTO tmp_plugin (name,dl) VALUES ('ARCHIVE','ha_archive.so');\n "
+"INSERT INTO tmp_plugin (name,dl) VALUES ('FEDERATED','ha_federated.so');\n "
+"INSERT INTO tmp_plugin (name,dl) VALUES ('BLACKHOLE','ha_blackhole.so');\n "
+"INSERT INTO tmp_plugin (name,dl) VALUES ('EXAMPLE','ha_example.so');\n "
+"INSERT INTO plugin SELECT * FROM tmp_plugin WHERE @had_plugin_table=0;\n "
+"DROP TABLE tmp_plugin;\n "
"\n "
"CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT
'', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '',
Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '',
Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper
char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY
(Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';\n "
"\n "
diff -Naru scripts/mysql_system_tables.sql scripts/mysql_system_tables.sql
--- scripts/mysql_system_tables.sql 2008-11-14 17:37:05.000000000 +0100
+++ scripts/mysql_system_tables.sql 2009-01-09 19:00:35.000000000 +0100
@@ -24,6 +24,17 @@

CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL,
dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER
SET utf8 COLLATE utf8_bin comment='MySQL plugins';

+-- Remember for later if plugin table already existed
+set @had_plugin_table= @@warning_count != 0;
+
+-- Install plugins by default if they didn't existed
+CREATE TEMPORARY TABLE tmp_plugin LIKE plugin;
+INSERT INTO tmp_plugin (name,dl) VALUES ('ARCHIVE','ha_archive.so');
+INSERT INTO tmp_plugin (name,dl) VALUES ('FEDERATED','ha_federated.so');
+INSERT INTO tmp_plugin (name,dl) VALUES ('BLACKHOLE','ha_blackhole.so');
+INSERT INTO tmp_plugin (name,dl) VALUES ('EXAMPLE','ha_example.so');
+INSERT INTO plugin SELECT * FROM tmp_plugin WHERE @had_plugin_table=0;
+DROP TABLE tmp_plugin;

CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '',
Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username
char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port
INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper
char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY
(Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';

++++++ mysql-group.patch ++++++
--- /var/tmp/diff_new_pack.ylcAX3/_old 2009-07-17 17:26:44.000000000 +0200
+++ /var/tmp/diff_new_pack.ylcAX3/_new 2009-07-17 17:26:44.000000000 +0200
@@ -1,30 +1,144 @@
---- scripts/mysqld_safe.sh
-+++ scripts/mysqld_safe.sh
-@@ -69,6 +69,10 @@
- --pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
- --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;;
-
-+ --group=*)
-+ group=`echo "$arg" | sed -e "s;--group=;;"`
-+ ;;
+diff -Naru mysql-5.1.34-bak/configure.in mysql-5.1.34/configure.in
+--- mysql-5.1.34-bak/configure.in 2009-03-31 16:35:39.000000000 +0200
++++ mysql-5.1.34/configure.in 2009-04-20 16:49:56.000000000 +0200
+@@ -772,6 +772,14 @@
+ [ MYSQLD_USER=mysql ]
+ )
+ AC_SUBST(MYSQLD_USER)
++AC_ARG_WITH(mysqld-group,
++ [ --with-mysqld-group=groupname
++ What group the mysqld daemon shall be run as.],
++ [ MYSQLD_GROUP=$withval ],
++ [ MYSQLD_GROUP=mysql ]
++ )
++AC_SUBST(MYSQLD_GROUP)
+
- # these two might have been set in a [mysqld_safe] section of my.cnf
- # they are added to mysqld command line to override settings from my.cnf
- --socket=*) mysql_unix_port=`echo "$arg" | sed -e "s;--socket=;;"` ;;
-@@ -173,6 +177,7 @@
- export MYSQL_HOME
-
- user=@MYSQLD_USER@
-+group=mysql
- niceness=0

- # these rely on $DATADIR by default, so we'll set them later on
-@@ -315,7 +320,7 @@
+ # If we should allow LOAD DATA LOCAL
+ AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
+diff -Naru mysql-5.1.34-bak/scripts/Makefile.am
mysql-5.1.34/scripts/Makefile.am
+--- mysql-5.1.34-bak/scripts/Makefile.am 2009-03-31 16:38:52.000000000
+0200
++++ mysql-5.1.34/scripts/Makefile.am 2009-04-20 16:49:56.000000000 +0200
+@@ -185,6 +185,7 @@
+ -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
+ -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
+ -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
++ -e 's!@''MYSQLD_GROUP''@!@MYSQLD_GROUP@!' \
+ -e 's!@''STATIC_NSS_FLAGS''@!@STATIC_NSS_FLAGS@!' \
+ -e 's!@''NON_THREADED_LIBS''@!@NON_THREADED_LIBS@!' \
+ -e 's!@''ZLIB_DEPS''@!@ZLIB_DEPS@!' \
+diff -Naru mysql-5.1.34-bak/scripts/mysqld_safe.sh
mysql-5.1.34/scripts/mysqld_safe.sh
+--- mysql-5.1.34-bak/scripts/mysqld_safe.sh 2009-03-31 16:38:52.000000000
+0200
++++ mysql-5.1.34/scripts/mysqld_safe.sh 2009-04-20 16:50:41.000000000
+0200
+@@ -19,6 +19,7 @@
+ want_syslog=0
+ syslog_tag=
+ user='@MYSQLD_USER@'
++group='@MYSQLD_GROUP@'
+ pid_file=
+ err_log=
+
+@@ -162,6 +163,7 @@
+ --datadir=*) DATADIR="$val" ;;
+ --pid-file=*) pid_file="$val" ;;
+ --user=*) user="$val"; SET_USER=1 ;;
++ --group=*) group="$val"; SET_USER=1 ;;
+
+ # these might have been set in a [mysqld_safe] section of my.cnf
+ # they are added to mysqld command line to override settings from my.cnf
+@@ -388,11 +390,17 @@
+ if test "$user" != "root" -o $SET_USER = 1
+ then
USER_OPTION="--user=$user"
++ GROUP_OPTION="--group=$group"
+ fi
+ # Change the err log to the right user, if it is in use
+ if [ $want_syslog -eq 0 ]; then
+ touch $err_log
+- chown $user $err_log
++ if [ "$user" -a "$group" ]; then
++ chown $user:$group $err_log
++ else
++ [ "$user" ] && chown $user $err_log
++ [ "$group" ] && chgrp $group $err_log
++ fi
fi
- # If we are root, change the err log to the right user.
-- touch $err_log; chown $user $err_log
-+ touch $err_log; chown $user.$group $err_log
if test -n "$open_files"
then
- ulimit -n $open_files
+@@ -407,7 +415,12 @@
+ if [ ! -d $mysql_unix_port_dir ]
+ then
+ mkdir $mysql_unix_port_dir
+- chown $user $mysql_unix_port_dir
++ if [ "$user" -a "$group" ]; then
++ chown $user:$group $mysql_unix_port_dir
++ else
++ [ "$user" ] && chown $user $mysql_unix_port_dir
++ [ "$group" ] && chgrp $group $mysql_unix_port_dir
++ fi
+ chmod 755 $mysql_unix_port_dir
+ fi
+
+diff -Naru mysql-5.1.34-bak/scripts/mysql_install_db.sh
mysql-5.1.34/scripts/mysql_install_db.sh
+--- mysql-5.1.34-bak/scripts/mysql_install_db.sh 2009-03-31
16:38:52.000000000 +0200
++++ mysql-5.1.34/scripts/mysql_install_db.sh 2009-04-20 16:49:56.000000000
+0200
+@@ -28,6 +28,7 @@
+ defaults=""
+ mysqld_opt=""
+ user=""
++group=""
+
+ force=0
+ in_rpm=0
+@@ -63,6 +64,11 @@
+ user. You must be root to use this option. By default
+ mysqld runs using your current login name and files and
+ directories that it creates will be owned by you.
++ --group=group_name The login group to use for running mysqld. Files and
++ directories created by mysqld will be owned by this
++ group. You must be root to use this option. By default
++ mysqld runs using your current group and files and
++ directories that it creates will be owned by you.
+
+ All other options are passed to the mysqld program
+
+@@ -103,11 +109,11 @@
+ --builddir=*) builddir=`parse_arg "$arg"` ;;
+ --srcdir=*) srcdir=`parse_arg "$arg"` ;;
+ --ldata=*|--datadir=*) ldata=`parse_arg "$arg"` ;;
+- --user=*)
+ # Note that the user will be passed to mysqld so that it runs
+ # as 'user' (crucial e.g. if log-bin=/some_other_path/
+ # where a chown of datadir won't help)
+- user=`parse_arg "$arg"` ;;
++ --user=*) user=`parse_arg "$arg"` ;;
++ --group=*) group=`parse_arg "$arg"` ;;
+ --skip-name-resolve) ip_only=1 ;;
+ --verbose) verbose=1 ;; # Obsolete
+ --rpm) in_rpm=1 ;;
+@@ -360,7 +366,12 @@
+ fi
+ if test -w / -a ! -z "$user"
+ then
+- chown $user $dir
++ if test -z "$group"
++ then
++ chown $user $dir
++ else
++ chown $user:$group $dir
++ fi
+ fi
+ done
+
+@@ -369,6 +380,11 @@
+ args="$args --user=$user"
+ fi
+
++if test -n "$group"
++then
++ args="$args --group=$group"
++fi
++
+ # When doing a "cross bootstrap" install, no reference to the current
+ # host should be added to the system tables. So we filter out any
+ # lines which contain the current host name.

++++++ mysql-install_db-quiet.patch ++++++
--- /var/tmp/diff_new_pack.ylcAX3/_old 2009-07-17 17:26:44.000000000 +0200
+++ /var/tmp/diff_new_pack.ylcAX3/_new 2009-07-17 17:26:44.000000000 +0200
@@ -1,18 +1,30 @@
---- scripts/mysql_install_db.sh.orig
-+++ scripts/mysql_install_db.sh
-@@ -296,10 +296,11 @@ then
- fi
- fi
-
+--- scripts/mysql_install_db.sh 2008-11-24 14:41:54.000000000 +0100
++++ scripts/mysql_install_db.sh 2008-11-24 15:46:58.000000000 +0100
+@@ -392,9 +392,10 @@
+ # the screen.
+ if test "$cross_bootstrap" -eq 0 && test -z "$srcdir"
+ then
- s_echo
- s_echo "To start mysqld at boot time you have to copy"
- s_echo "support-files/mysql.server to the right place for your system"
-- s_echo
+# Output disabled, since the SUSE RPM comes with an init script installed
-+# s_echo ""
++# s_echo
+# s_echo "To start mysqld at boot time you have to copy"
+# s_echo "support-files/mysql.server to the right place for your system"
-+# s_echo

- if test "$windows" -eq 0
+ echo
+ echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
+@@ -416,10 +417,10 @@
then
+ echo
+ echo "You can start the MySQL daemon with:"
+- echo "cd $basedir ; $bindir/mysqld_safe &"
++ echo "rcmysql start"
+ echo
+- echo "You can test the MySQL daemon with mysql-test-run.pl"
+- echo "cd $basedir/mysql-test ; perl mysql-test-run.pl"
++ echo "You can test the MySQL daemon with mysql-test package"
++# echo "cd $basedir/mysql-test ; perl mysql-test-run.pl"
+ fi
+
+ echo

++++++ mysql-logrotate.patch ++++++
--- /var/tmp/diff_new_pack.ylcAX3/_old 2009-07-17 17:26:44.000000000 +0200
+++ /var/tmp/diff_new_pack.ylcAX3/_new 2009-07-17 17:26:44.000000000 +0200
@@ -1,5 +1,16 @@
---- support-files/mysql-log-rotate.sh
+Index: support-files/mysql-log-rotate.sh
+===================================================================
+--- support-files/mysql-log-rotate.sh.orig
+++ support-files/mysql-log-rotate.sh
+@@ -18,7 +18,7 @@
+ # ATTENTION: This /root/.my.cnf should be readable ONLY
+ # for root !
+
+-@localstatedir@/mysqld.log {
++/var/log/mysql/mysqld.log {
+ # create 600 mysql mysql
+ notifempty
+ daily
@@ -31,6 +31,14 @@
@bindir@/mysqladmin ping &>/dev/null
then

++++++ mysql-plugins-avoid-version.patch ++++++
--- storage/blackhole/Makefile.am
+++ storage/blackhole/Makefile.am
@@ -34,7 +34,7 @@ noinst_HEADERS = ha_blackhole.h

EXTRA_LTLIBRARIES = ha_blackhole.la
pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@
-ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir)
+ha_blackhole_la_LDFLAGS=-module -avoid-version -rpath $(pkgplugindir)
ha_blackhole_la_CXXFLAGS=$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_blackhole_la_CFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_blackhole_la_SOURCES=ha_blackhole.cc
--- storage/archive/Makefile.am
+++ storage/archive/Makefile.am
@@ -35,7 +35,7 @@ noinst_PROGRAMS = archive_test archive_r

EXTRA_LTLIBRARIES = ha_archive.la
pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@
-ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir)
+ha_archive_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir)
ha_archive_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_archive_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_archive_la_SOURCES = ha_archive.cc azio.c
--- storage/example/Makefile.am
+++ storage/example/Makefile.am
@@ -34,7 +34,7 @@ noinst_HEADERS = ha_example.h

EXTRA_LTLIBRARIES = ha_example.la
pkgplugin_LTLIBRARIES = @plugin_example_shared_target@
-ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir)
+ha_example_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir)
ha_example_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_example_la_SOURCES = ha_example.cc
--- storage/federated/Makefile.am
+++ storage/federated/Makefile.am
@@ -34,7 +34,7 @@

EXTRA_LTLIBRARIES = ha_federated.la
pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
-ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir)
+ha_federated_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir)
ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federated_la_SOURCES = ha_federated.cc
++++++ rc.mysql-multi ++++++
--- /var/tmp/diff_new_pack.ylcAX3/_old 2009-07-17 17:26:44.000000000 +0200
+++ /var/tmp/diff_new_pack.ylcAX3/_new 2009-07-17 17:26:44.000000000 +0200
@@ -49,13 +49,21 @@
# with force-reload (in case signalling is not supported) are
# considered a success.

+# Check for the location of initscript
+if [ "`echo "$0" | grep "^\."`" ] || [ "`echo "$0" | grep "^[^/].*/"`" ]; then
+ MYSELF="`pwd`/$0"
+else
+ MYSELF="$0"
+fi
+
parse_arguments() {
for arg do
case "$arg" in
- --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- --socket=*) socket=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --basedir=*) basedir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
+ --datadir=*) datadir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
+ --pid-file=*) pid_file="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
+ --socket=*) socket="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
+ --log-error=*) log_error="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;;
esac
done
}
@@ -88,7 +96,7 @@
fi
test -L "/proc/$pid/exe" || return 7
exe=`readlink "/proc/$pid/exe"` || return 4
- test "$exe" = "$MYSQLD" || return 7
+ test "`echo "$exe" | grep "^$MYSQLD"`" || return 7
kill -STOP "$pid"
kill -TERM "$pid" || return 4 # suboptimal
kill -CONT "$pid"
@@ -101,8 +109,43 @@
return 1
}

-# Read the value of:
-# MYSQLD_MULTI
+# Helper function which can end with any status
+set_return_value() {
+ return $1
+}
+
+# Checks for obsolete database
+check_obsolete() {
+ # check for ISAM tables
+ tables="`find "$datadir" -name '*.ISM' 2> /dev/null | sed
"s@$datadir/*@@; s@.ISM@@; s@/@.@;"`"
+ if test "$tables" ; then
+ echo
+ echo "Some tables still use ISAM format, which is NO LONGER
SUPPORTED"
+ echo "since mysql 5.0. To use these tables, you would need to
open them"
+ echo "from an older mysql server and convert to something
better (eg. MyISAM)."
+ echo
+ echo "Tables using ISAM are: "
+ echo " $tables "
+ echo
+ fi
+ # check for bdb tables
+ tables="`find "$datadir" -name '*.db' 2> /dev/null | sed
"s@$datadir/*@@; s@.db@@; s@/@.@;"`"
+ if test -n "$tables" ; then
+ echo
+ echo "Some tables still use BerkeleyDB format, which is NO
LONGER SUPPORTED"
+ echo "since mysql 5.1. To use these tables, you would need to
open them"
+ echo "from an older mysql server and convert to something
better (eg. MyISAM)."
+ echo
+ echo "Tables using BerkeleyDB are: "
+ echo " $tables "
+ echo
+ fi
+}
+
+# Check if we want to run multiple instances.
+[[ "`cat /etc/my.cnf | sed -n -e 's|#.*||' -e 's|\[mysqld[0-9]\+\]|yes|p'`" ]]
&& MYSQLD_MULTI=yes
+
+# This was old way how to specify this, left for backward compatibility.
[[ -f /etc/sysconfig/mysql ]] && . /etc/sysconfig/mysql

if [[ "$MYSQLD_MULTI" == "yes" ]]; then
@@ -143,7 +186,7 @@
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
- $0 status >/dev/null && $0 restart
+ "$MYSELF" status >/dev/null && "$MYSELF" restart

# Remember status and be quiet
rc_status
@@ -151,18 +194,15 @@

restart|force-reload)
echo "Restarting service multi MySQL "
- $0 stop
- $0 start
+ "$MYSELF" stop
+ "$MYSELF" start

rc_status
;;

reload)
echo -n "Reloading service multi MySQL "
- # FIXME:
- # Don't know what to do in this case
- # killproc -p $pid_file -HUP $MYSQLD
- # touch $pid_file
+ mysqld_multi reload
rc_status -v
;;

@@ -175,7 +215,7 @@
;;

*)
- echo "Usage: $0
{start|stop|status|reload|restart|try-restart|force-reload}"
+ echo "Usage: $MYSELF
{start|stop|status|reload|restart|try-restart|force-reload}"
exit 1
;;
esac
@@ -209,29 +249,40 @@
datadir=/var/lib/mysql
mysql_daemon_user=mysql
mysql_daemon_group=mysql
- pid_file=/var/lib/mysql/mysqld.pid
- socket=/var/lib/mysql/mysql.sock
+ pid_file=/var/run/mysql/mysqld.pid
+ socket=/var/run/mysql/mysql.sock
print_defaults=/usr/bin/my_print_defaults
+ log_error=/var/log/mysql/mysqld.log

mode=$1 # start or stop

+ log_base="`echo "$log_error" | sed 's|\.log$||'`"
+ [ "$log_base" \!= "$log_error" ] || log_base="/var/log/mysql/mysql"
+ log_upgrade="${log_base}-upgrade.log"
+ log_query="${log_base}-query.log"
+
parse_arguments `$print_defaults $defaults mysqld mysql_server`
- export TMPDIR=$datadir/.tmp
- if ! test -d "$TMPDIR"; then
- mkdir "$TMPDIR"
- chown mysql:mysql "$TMPDIR"
- chmod 755 "$TMPDIR"
- fi
+ export TMPDIR=/var/tmp/mysql

# Safeguard (relative paths, core dumps..)
- cd $basedir
+ cd "$basedir"

case "$1" in
start)
# exit gracefully, if we are already running
- $0 status >/dev/null && echo -n "Starting service MySQL " && \
+ "$MYSELF" status >/dev/null && echo -n "Starting service MySQL
" && \
rc_status -v && rc_exit

+ # prepare tmp dir
+ rm -rf "$TMPDIR"
+ mkdir -p "$TMPDIR"
+ chown mysql:mysql "$TMPDIR"
+ chmod 755 "$TMPDIR"
+ [ "`ls -ld "$TMPDIR" | grep
"^drwxr-xr-x[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`"
] || {
+ echo "Can't create secure $TMPDIR"
+ rc_failed; rc_status -v; rc_exit;
+ }
+
# Test, if safe_mysqld actually exists
SAFE_MYSQLD=/usr/bin/mysqld_safe
test -x $SAFE_MYSQLD || {
@@ -245,7 +296,7 @@
if ! $print_defaults mysqld | \
grep -q -e '--log$' -e '--log[[:blank:]=]'
then
- debug_flags="--log=$datadir/mysqld-query.log"
+ debug_flags="--log=${log_query}"
fi
if ! $print_defaults mysqld | grep -q -e '^--debug\>' &&
test "$MYSQLD" = /usr/sbin/mysqld-debug
@@ -258,92 +309,105 @@
fi
fi

- # check for ISAM tables
- tables=`find $datadir -name '*.ISM' | sed "s@$datadir/*@@;
s@.ISM@@; s@/@.@;"`
- if test "$tables" ; then
- echo
- echo "Some tables still use ISAM format, which is NO
LONGER SUPPORTED"
- echo "since mysql 5.0. To use these tables, you would
need to open them"
- echo "from an older mysql server and convert to
something better (eg. MyISAM)."
- echo
- echo "Tables using ISAM are: "
- echo " $tables "
- echo
- fi
- # check for bdb tables
- tables=`find $datadir -name '*.db' | sed "s@$datadir/*@@;
s@.db@@; s@/@.@;"`
- if test -n "$tables" ; then
- echo
- echo "Some tables still use BerkeleyDB format, please
convert them to something "
- echo "else. BerkeleyDB support will be dropped in
future releases. "
- echo "You can use mysql_convert_table_format script to
do this conversion. "
- echo
- echo "Tables using BerkeleyDB are: "
- echo " $tables "
- echo
- fi
+ # Creating parent directories for logs
+ for i in "$log_upgrade" "$log_query" "$log_error"; do
+ log_dir="`dirname "$i"`"
+ if [ \! -d "$log_dir" ]; then
+ mkdir -p "$log_dir"
+ chmod 660 "$log_dir"
+ fi
+ done

# We assume a fresh install if the directory $datadir/mysql
# does not exist and create the privilege database
- if ! test -d $datadir/mysql; then
+ if ! test -d "$datadir/mysql"; then
echo "Creating MySQL privilege database... "
- mysql_install_db --user=$mysql_daemon_user
--datadir=$datadir ||{
+ mysql_install_db --user="$mysql_daemon_user"
--datadir="$datadir" ||{
rc_failed; rc_status -v; rc_exit
}
fi
+ check_obsolete
# Run mysql_upgrade on every package install/upgrade. Not
allways
# necessary, but doesn't do any harm.
- if test -f $datadir/.run-mysql_upgrade ; then
- echo "Updating MySQL privilege database... "
+ if test -f "$datadir/.run-mysql_upgrade" ; then
+ echo >> "$log_upgrade"
+ echo "`LANG="" date` - upgrading MySQL..." >>
"$log_upgrade"
+ echo >> "$log_upgrade"
+ echo "Will update MySQL now, if you encounter any
problems, please read following file:" | tee -a "$log_upgrade"
+ echo " /usr/share/doc/packages/mysql/README.SuSE" |
tee -a "$log_upgrade"
+ check_obsolete >> "$log_upgrade"
# instead of running mysqld --bootstrap, which wouldn't
allow
# us to run mysql_upgrade, we start a full-featured
server with
# --skip-grant-tables and restict access to it by unix
# permissions of the named socket
- protected=$datadir/.protected
- chown $mysql_daemon_user:$mysql_daemon_group $protected
- chmod 700 $protected
+ protected=/var/run/mysql/protected
+ if [ -d "$protected" ]; then
+ pid="`cat "$protected/mysqld.pid" 2> /dev/null`"
+ if [ "$pid" ] && [ -d "/proc/$pid" ] &&
+ [ "`readlink "/proc/$pid/exe" | grep
"mysql"`" ]; then
+ echo "Can't update as another
updating process is currently running" | tee -a "$log_upgrade"
+ echo "Please check process $pid
and terminate it before restarting MySQL" | tee -a "$log_upgrade"
+ rc_failed; rc_status -v;
rc_exit;
+ fi
+ fi
+ rm -rf "$protected"
+ mkdir -p "$protected"
+ chown "$mysql_daemon_user:$mysql_daemon_group"
"$protected"
+ chmod 700 "$protected"
+ [ "`ls -ld "$protected" | grep
"^drwx------[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`"
] || {
+ echo "Can't create secure $protected" | tee -a
"$log_upgrade"
+ rc_failed; rc_status -v; rc_exit;
+ }
+
+ echo "Running protected MySQL... " | tee -a
"$log_upgrade"
$SAFE_MYSQLD \
--mysqld=${MYSQLD#/usr/sbin/} \
$debug_flags \
+ --datadir="$datadir" \
--skip-grant-tables \
--skip-networking \
- --user=$mysql_daemon_user \
- --pid-file=$protected/mysqld.pid \
- --socket=$protected/mysql.sock \
- --group=$mysql_daemon_group &>/dev/null &
- wait_for_socket $protected/mysql.sock || {
+ --user="$mysql_daemon_user" \
+ --pid-file="$protected/mysqld.pid" \
+ --socket="$protected/mysql.sock" \
+ --group="$mysql_daemon_group" &>/dev/null &
+ wait_for_socket "$protected/mysql.sock" || {
+ echo "error: $protected/mysql.sock file didn't
appeared... " | tee -a "$log_upgrade"
rc_failed; rc_status -v; rc_exit;
}
+ echo "Upgrading MySQL... " | tee -a "$log_upgrade"
/usr/bin/mysql_upgrade \
- --basedir=$basedir \
- --socket=$protected/mysql.sock || {
+ --basedir="$basedir" \
+ --socket="$protected/mysql.sock" | tee -a
"$log_upgrade"
+ [ "$PIPESTATUS" -ne 0 ] && {
rc_failed; rc_status -v;
- killproc -p $protected/mysqld.pid -TERM $MYSQLD
- rc_exit;
- }
- killproc -p $protected/mysqld.pid -TERM $MYSQLD
+ killproc -p "$protected/mysqld.pid" -TERM
"$MYSQLD"
+ rc_exit; }
+ killproc -p "$protected/mysqld.pid" -TERM "$MYSQLD"
+ rm -rf "$protected"
# Fix ownerships and permissions for $datadir
- chmod 755 $datadir
- chown -R $mysql_daemon_user:$mysql_daemon_group $datadir
- rm -f $datadir/.run-mysql_upgrade \
- $datadir/{update-stamp-*,mysql/stamp-4.1} # used in the
past
- if test -f $datadir/mysql/stamp-4.1 ; then
- rm $datadir/mysql/stamp-4.1
- fi
+ chmod 755 "$datadir"
+ chown -R "$mysql_daemon_user:$mysql_daemon_group"
"$datadir"
+ rm -f "$datadir/.run-mysql_upgrade" \
+ "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in
the past
+ if test -f "$datadir/mysql/stamp-4.1" ; then
+ rm "$datadir/mysql/stamp-4.1"
+ fi
+ chown mysql:mysql "$log_upgrade"
+ chmod 660 "$log_upgrade"
+ fi

- fi

echo -n "Starting service MySQL "

$SAFE_MYSQLD \
--mysqld=${MYSQLD#/usr/sbin/} \
$debug_flags \
- --user=$mysql_daemon_user \
- --pid-file=$pid_file \
- --socket=$socket \
- --datadir=$datadir &>/dev/null &
+ --user="$mysql_daemon_user" \
+ --pid-file="$pid_file" \
+ --socket="$socket" \
+ --datadir="$datadir" &>/dev/null &

- wait_for_socket $socket || {
+ wait_for_socket "$socket" || {
# let's not treat this as a fatal error
echo "warning: $socket didn't appear within 30 seconds"
}
@@ -355,6 +419,7 @@
stop)
echo -n "Shutting down service MySQL "
kill_mysql
+ rm -rf "$TMPDIR"

# Remember status and be verbose
rc_status -v
@@ -364,7 +429,7 @@
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
- $0 status >/dev/null && $0 restart
+ "$MYSELF" status >/dev/null && "$MYSELF" restart

# Remember status and be quiet
rc_status
@@ -372,16 +437,16 @@

restart|force-reload)
echo "Restarting service MySQL "
- $0 stop
- $0 start
+ "$MYSELF" stop
+ "$MYSELF" start

rc_status
;;

reload)
echo -n "Reloading service MySQL "
- killproc -p $pid_file -HUP $MYSQLD
- touch $pid_file
+ killproc -p "$pid_file" -HUP "$MYSQLD"
+ touch "$pid_file"
rc_status -v
;;

@@ -396,13 +461,38 @@
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running

- # NOTE: checkproc returns LSB compliant status values.
- checkproc -p $pid_file $MYSQLD
+ # NOTE: checkproc returns LSB compliant status values,
+ # but it checks for running binary first and only
+ # if it doesn't find running process with proper
+ # name it checks pidfile. So we can't use it because
+ # akonadi runs it's own database.
+ # checkproc -p $pid_file $MYSQLD
+ if [ -f "$pid_file" ]; then
+ if ! [ -e /proc/version ]; then
+ mount -n -t proc proc /proc
+ test -e /proc/version || set_return_value 100
+ fi
+ if [ -d "/proc/`cat "$pid_file"`" ]; then
+ if exe=`readlink "/proc/$pid/exe"`; then
+ if [ "`echo "$exe" | grep "^$MYSQLD"`"
]; then
+ set_return_value 0
+ else
+ set_return_value 1
+ fi
+ else
+ set_return_value 100
+ fi
+ else
+ set_return_value 1
+ fi
+ else
+ set_return_value 3
+ fi
rc_status -v
;;

*)
- echo "Usage: $0
{start|stop|status|reload|restart|try-restart|force-reload}"
+ echo "Usage: $MYSELF
{start|stop|status|reload|restart|try-restart|force-reload}"
exit 1
;;
esac

++++++ suse-test-run ++++++
--- /var/tmp/diff_new_pack.ylcAX3/_old 2009-07-17 17:26:44.000000000 +0200
+++ /var/tmp/diff_new_pack.ylcAX3/_new 2009-07-17 17:26:44.000000000 +0200
@@ -4,7 +4,6 @@

my $id = getpwnam("mysql") or die "can't find user \"mysql\": $!";
my $dir = "/usr/share/mysql-test/";
-my $binary = "/usr/sbin/mysqld";

if ($< == 0) {
($<, $>) = ($id, $id);
@@ -13,10 +12,6 @@
}
}

-if ($0 =~ /\/suse-test-run-max$/i) {
- $binary .= "-max";
-}
-
chdir($dir) or die "can't cd to $dir: $!";
-exec("./mysql-test-run.pl", "--master-binary=$binary",
"--slave-binary=$binary", "--big-test", @ARGV);
+exec("./mysql-test-run.pl", "--big-test", @ARGV);
die "can't execute mysql-test-run.pl: $!";


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread