Changes of Revision 3
[-] | Added | mysql-community-server.changes |
x 1
2 +------------------------------------------------------------------- 3 +Tue Feb 15 18:44:07 UTC 2011 - cs@linux-administrator.com 4 + 5 +- updated to 5.5.9 GA 6 + http://dev.mysql.com/doc/refman/5.5/en/news-5-5-9.html 7 + 8 +------------------------------------------------------------------- 9 +Tue Jan 4 11:01:17 CET 2011 - mhrusecky@suse.cz 10 + 11 +- fixed cmake compilation options to have same values as the 12 + autotools ones 13 + 14 +------------------------------------------------------------------- 15 +Mon Jan 3 14:43:48 CET 2011 - mhrusecky@suse.cz 16 + 17 +- updated to 5.5.8 GA 18 + http://dev.mysql.com/doc/refman/5.5/en/news-5-5-8.html 19 + 20 +------------------------------------------------------------------- 21 +Mon Nov 22 14:32:48 CET 2010 - mhrusecky@suse.cz 22 + 23 +- updated to 5.5.7 release candidate 24 + http://dev.mysql.com/doc/refman/5.5/en/news-5-5-7.html 25 + 26 +------------------------------------------------------------------- 27 +Thu Oct 21 10:50:29 CEST 2010 - mhrusecky@suse.cz 28 + 29 +- fixed building on Mandriva 30 + 31 +------------------------------------------------------------------- 32 +Tue Oct 19 05:47:06 CEST 2010 - mhrusecky@suse.cz 33 + 34 +- updated to 5.5.6 release candidate 35 + http://dev.mysql.com/doc/refman/5.5/en/news-5-5-6.html 36 + 37 +------------------------------------------------------------------- 38 +Mon Oct 18 16:21:40 CEST 2010 - mhrusecky@suse.cz 39 + 40 +- rewritten spec file 41 + - build and install parts are in separate file now 42 + - patches in the archive 43 + - contains more documentation 44 + - contains tags 45 + - adding/removing patches just at in one configuration file 46 + 47 +------------------------------------------------------------------- 48 +Wed Sep 29 12:49:25 CEST 2010 - mhrusecky@suse.cz 49 + 50 +- fixed init script to work on SELinux machines (bnc#635645) 51 + 52 +------------------------------------------------------------------- 53 +Wed Sep 29 11:47:47 CEST 2010 - mhrusecky@suse.cz 54 + 55 +- updated to 5.1.51, see 56 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-51.html 57 + 58 +------------------------------------------------------------------- 59 +Wed Aug 11 01:53:06 CEST 2010 - mhrusecky@suse.cz 60 + 61 +- updated to 5.1.49 (maintenance update), see 62 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-49.html 63 + - fixes several security issues 64 + 65 +------------------------------------------------------------------- 66 +Tue Jun 29 10:33:01 CEST 2010 - mhrusecky@suse.cz 67 + 68 +- updated to 5.1.48 (maintenance update), see 69 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-48.html 70 + 71 +------------------------------------------------------------------- 72 +Wed May 26 13:48:10 CEST 2010 - mhrusecky@suse.cz 73 + 74 +- updated to 5.1.47 (maintenance update), see 75 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-47.html 76 +- fixed Fedora 12 build 77 + 78 +------------------------------------------------------------------- 79 +Fri May 7 11:31:24 CEST 2010 - dmueller@suse.de 80 + 81 +- remove incorrect dependency of libmysqld0 on libmysqlclient-devel 82 +- handle /var/run on tmpfs (fate#303793) 83 + 84 +------------------------------------------------------------------- 85 +Sat Apr 24 00:12:25 CEST 2010 - mhrusecky@suse.cz 86 + 87 +- updated to 5.1.46, see 88 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-46.html 89 + 90 +------------------------------------------------------------------- 91 +Sun Apr 11 21:06:44 CEST 2010 - mhrusecky@suse.cz 92 + 93 +- updated to 5.1.45, see 94 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-45.html 95 + 96 +------------------------------------------------------------------- 97 +Mon Mar 8 15:13:11 UTC 2010 - mhrusecky@suse.cz 98 + 99 +- updated to 5.1.44, see 100 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-43.html 101 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-44.html 102 +- splitting out shared libmysqld shared library (quick dirty way) 103 +- preparing spec file to be more general and easily adjustable to 104 + other MySQL flavours 105 + 106 +------------------------------------------------------------------- 107 +Sun Jan 10 00:57:25 CET 2010 - mhrusecky@suse.cz 108 + 109 +- updated to 5.1.42, see 110 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-42.html 111 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-41.html 112 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-40.html 113 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-39.html 114 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-38.html 115 + http://dev.mysql.com/doc/refman/5.1/en/news-5-1-37.html 116 + 117 +------------------------------------------------------------------- 118 +Tue Dec 15 01:23:16 CET 2009 - jengelh@medozas.de 119 + 120 +- add baselibs.conf as a source 121 + 122 +------------------------------------------------------------------- 123 +Tue Dec 1 17:52:18 CET 2009 - mhrusecky@suse.cz 124 + 125 +- removing compatibility symlink 126 + - intended for 11.2 but never get there 127 +- fixing various security issues (bnc#557669) 128 + - upstream #47320 - checking server certificates (CVE-2009-4028) 129 + - upstream #48291 - error handling in subqueries (CVE-2009-4019) 130 + - upstream #47780 - preserving null_value flag in GeomFromWKB() 131 + (CVE-2009-4019) 132 + - upstream #39277 - symlink behaviour fixed (CVE-2008-7247) 133 + - upstream #32167 - symlink behaviour refixed (CVE-2009-4030) 134 + 135 +------------------------------------------------------------------- 136 +Wed Nov 11 14:23:43 CET 2009 - mhrusecky@suse.cz 137 + 138 +- making pid file readable by everybody 139 +- fixing 'rcmysql status' for non-root 140 + 141 +------------------------------------------------------------------- 142 +Thu Oct 29 14:11:09 CET 2009 - mhrusecky@suse.cz 143 + 144 +- adding /var/lib/mysql/mysql.sock symlink for compatibility with 145 + applications for older versions 146 +- using kill instead of killproc as killproc matches by default all 147 + running MySQL instances (even KDE ones) 148 +- checking for log consistency in rc script instead of post of spec 149 + as it makes more sense 150 + 151 +------------------------------------------------------------------- 152 +Fri Oct 16 09:32:35 UTC 2009 - adrian@suse.de 153 + 154 +- fix PreRequires or mysql package can't be used in build enviroment 155 +- do not fail on usermod call in %pre as specified 156 + 157 +------------------------------------------------------------------- 158 +Mon Oct 12 18:36:04 UTC 2009 - coolo@novell.com 159 + 160 +- fix prereq for usermod 161 + 162 +------------------------------------------------------------------- 163 +Mon Oct 5 11:11:35 CEST 2009 - mhrusecky@suse.cz 164 + 165 +- fixed my.cnf rights (bnc#539249) 166 +- fixed restart on update (bnc#520876) 167 + 168 +------------------------------------------------------------------- 169 +Tue Sep 15 16:45:23 CEST 2009 - mhrusecky@suse.cz 170 + 171 +- Few better formulations in README.SuSE (bnc#539243) 172 + 173 +------------------------------------------------------------------- 174 +Tue Aug 25 10:19:04 CEST 2009 - mhrusecky@suse.cz 175 + 176 +- Refixing bnc#420313 so mysql_config will return better values 177 + 178 +------------------------------------------------------------------- 179 +Wed Aug 12 13:29:09 CEST 2009 - mhrusecky@suse.cz 180 + 181 +- Using configure option to enforce pthreads rwlocks on s390 instead 182 + of sed substitution 183 + 184 +------------------------------------------------------------------- 185 +Tue Jul 28 17:10:31 CEST 2009 - mhrusecky@suse.cz 186 + 187 +- Applying upstream patch for upstream bug#43594 188 + (hotcopy will ignore log tables) (bnc#525325) 189 +- Not using bmove512 as it may slow things down 190 + (see upstream bug#19975) 191 + 192 +------------------------------------------------------------------- 193 +Mon Jul 27 14:45:24 CEST 2009 - mhrusecky@suse.cz 194 + 195 +- Applying upstream patch for upstream bug#36259 196 + 'Optimizing with ORDER BY' 197 + 198 +------------------------------------------------------------------- 199 +Fri Jul 24 17:35:07 CEST 2009 - dmueller@suse.de 200 + 201 |
||
[-] | Added | mysql-community-server.spec ^ |
201 1
2 +# 3 +# spec file for package mysql-community-server (Version 5.5.9) 4 +# 5 +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. 6 +# 7 +# All modifications and additions to the file contributed by third parties 8 +# remain the property of their copyright owners, unless otherwise agreed 9 +# upon. The license for this file, and modifications and additions to the 10 +# file, is the same license as for the pristine package itself (unless the 11 +# license for the pristine package is not an Open Source License, in which 12 +# case the license is the MIT License). An "Open Source License" is a 13 +# license that conforms to the Open Source Definition (Version 1.9) 14 +# published by the Open Source Initiative. 15 + 16 +# Please submit bugfixes or comments via http://bugs.opensuse.org/ 17 +# 18 + 19 +# norootforbuild 20 + 21 +# Few definitions which will alter build 22 +%define prefered 0 23 +%define use_cmake 1 24 +%define cluster 0 25 +%define builtin_plugins partition,csv,heap,myisam,innobase 26 + 27 +%if %{?rel:0}%{!?rel:1} 28 +%define rel 1 29 +%endif 30 +#Distribution: %dist 31 +#Packager: %packager 32 +#Vendor: %vendor 33 + 34 +Name: mysql-community-server_55 35 +Summary: A True Multiuser, Multithreaded SQL Database Server 36 +Version: 5.5.9 37 +%define srv_vers 5.5.9 38 +Release: 1 39 +License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT 40 +Group: Productivity/Databases/Servers 41 +Url: http://www.mysql.com 42 +# http://dev.mysql.com/get/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz/from/pick 43 +Source: mysql-%{version}.tar.bz2 44 +Source2: baselibs.conf 45 +Source3: README.debug 46 +Source4: suse-test-run 47 +Source5: mysql.SuSEfirewall2 48 +Source7: rc.mysql-multi 49 +Source8: README.SuSE 50 +Source9: mysql-patches.tar.bz2 51 +Source10: build.inc 52 +Source11: install.inc 53 +Source12: series 54 +BuildRoot: %{_tmppath}/%{name}-%{version}-build 55 +%if 0%{?suse_version} 56 +PreReq: pwdutils 57 +%else 58 +#PreReq: /usr/sbin/useradd /usr/sbin/usermod /usr/sbin/groupadd 59 +%endif 60 +#PreReq: coreutils sed grep 61 +%if 0%{?suse_version} 62 +PreReq: %install_info_prereq %insserv_prereq 63 +%endif 64 +BuildRequires: gcc-c++ ncurses-devel openssl-devel procps readline-devel 65 +BuildRequires: cmake zlib-devel 66 +%if 0%{?suse_version} 67 +BuildRequires: pwdutils tcpd-devel 68 +%endif 69 +%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8 70 +BuildRequires: fdupes 71 +%endif 72 +%if 0%{?fedora_version} > 11 73 +BuildRequires: sqlite 74 +%endif 75 +%if 0%{?suse_version} > 1030 76 +Recommends: logrotate 77 +%else 78 +Requires: logrotate 79 +%endif 80 +# required by rcmysql 81 +Requires: %{name}-client perl-base 82 +Obsoletes: mysql-Max < %{srv_vers} 83 +Provides: mysql-Max = %{srv_vers} 84 +Obsoletes: mysql < %{srv_vers} 85 +Provides: mysql = %{srv_vers} 86 +Conflicts: otherproviders(mysql) 87 + 88 +%description 89 +SQL is the most popular database language in the world. MySQL is a 90 +client/server implementation that consists of a server daemon (mysqld) 91 +and many different client programs and libraries. 92 + 93 +The main goals of MySQL are speed, robustness, and ease of use. MySQL 94 +was originally developed because the developers at TcX needed an SQL 95 +server that could handle very large databases an order of magnitude 96 +faster than what any database vendor could offer them. They have now 97 +been using MySQL since 1996 in an environment with more than 40 98 +databases containing 10,000 tables, of which more than 500 have more 99 +than 7 million rows. This is about 100 gigabytes of mission-critical 100 +data. 101 + 102 +The base upon which MySQL is built is a set of routines that have been 103 +used in a highly demanding production environment for many years. While 104 +MySQL is still in development, it already offers a rich and highly 105 +useful function set. 106 + 107 +The official way to pronounce MySQL is "My Ess Que Ell" (Not 108 +MY-SEQUEL). 109 + 110 +This package only contains the server-side programs. 111 + 112 +Authors: 113 +-------- 114 + Michael Widenius <monty@mysql.com> 115 + David Axmark <davida@mysql.com> 116 + 117 + 118 + 119 +%if 0%{?prefered} > 0 120 +#------------------------------------------------------------------------------- 121 +%package -n libmysqlclient-devel 122 +#------------------------------------------------------------------------------- 123 +# mysql-devel was last used in openSUSE 10.2 124 +Provides: mysql-devel = %srv_vers-%release 125 +Obsoletes: mysql-devel < %srv_vers 126 +Requires: libmysqlclient16 = %version libmysqlclient_r16 = %version glibc-devel zlib-devel openssl-devel 127 +Summary: MySQL Development Header Files and Libraries 128 +License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT 129 +Group: Development/Libraries/C and C++ 130 + 131 +%description -n libmysqlclient-devel 132 +This package contains the development header files and libraries 133 +necessary to develop MySQL client applications. 134 + 135 +Authors: 136 +-------- 137 + Michael Widenius <monty@mysql.com> 138 + David Axmark <davida@mysql.com> 139 + 140 +#------------------------------------------------------------------------------- 141 +%package -n libmysqld0 142 +#------------------------------------------------------------------------------- 143 +License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT 144 +Summary: MySQL embedded server development files 145 +Group: Development/Libraries/C and C++ 146 + 147 +%description -n libmysqld0 148 +This package contains the development header files and libraries 149 +for developing application that embed the MySQL server 150 + 151 + 152 +#------------------------------------------------------------------------------- 153 +%package -n libmysqld-devel 154 +#------------------------------------------------------------------------------- 155 +License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT 156 +Summary: MySQL embedded server development files 157 +# the headers files are the shared 158 +Requires: libmysqlclient-devel = %version tcpd-devel 159 +Requires: libmysqld0 = %version 160 +Group: Development/Libraries/C and C++ 161 + 162 +%description -n libmysqld-devel 163 +This package contains the development header files and libraries 164 +for developing application that embed the MySQL server 165 +%endif 166 + 167 +#------------------------------------------------------------------------------- 168 +%package -n libmysql55client16 169 +#------------------------------------------------------------------------------- 170 +Summary: MySQL Shared Libraries 171 +License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT 172 +Group: Development/Libraries/Other 173 + 174 +%description -n libmysql55client16 175 +This package contains the shared libraries (.so) which certain 176 +languages and applications need to dynamically load and use MySQL. 177 + 178 +Authors: 179 +-------- 180 + Michael Widenius <monty@mysql.com> 181 + David Axmark <davida@mysql.com> 182 + 183 + 184 +#------------------------------------------------------------------------------- 185 +%package -n libmysql55client_r16 186 +#------------------------------------------------------------------------------- 187 +Summary: MySQL Shared Libraries 188 +License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT 189 +Group: Development/Libraries/Other 190 + 191 +%description -n libmysql55client_r16 192 +This package contains the shared libraries (.so) which certain 193 +languages and applications need to dynamically load and use MySQL. 194 + 195 +Authors: 196 +-------- 197 + Michael Widenius <monty@mysql.com> 198 + David Axmark <davida@mysql.com> 199 + 200 +#------------------------------------------------------------------------------- 201 |
||
Added | mysql-patches.tar.bz2 ^ | |
[+] | Added | README.SuSE ^ |
@@ -0,0 +1,57 @@ +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. + +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 + +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 were made in the +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. + +File locations changes: + - MySQL socket file and pid file were moved from /var/lib/mysql to more + reasonable location ( /var/run/mysql ) by default. + - MySQL log files are in /var/log/mysql. + +3) BerkeleyDB: +============== + +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 +==================== + +If you missed messages displayed during automatic MySQL database upgrade, you +can find them from now on in + + /var/log/mysql/mysqld-upgrade.log + | ||
[+] | Added | README.debug ^ |
@@ -0,0 +1,102 @@ +Debugging mysqld crashes +======================== +Author: Michal Marek <mmarek@suse.cz> +Last modified: 2006-07-31 + +Contents +-------- +1) Query log +2) Coredumps and Backtraces +3) Trace files + +In case your MySQL server crashes, here are some hints on what to +include in a bugreport at https://bugzilla.novell.com/ . Please report +there only bugs in the MySQL packages packaged by Novell/SUSE, bugs in +binaries / source provided by MySQL AB should be reported at +http://bugs.mysql.com/ . + +1) Query log +------------ + Note: Skip this chapter if you already have an exact query that + crashes the server + +To find out which query possibly crashed the server, add the following +line to your /etc/my.cnf into section [mysqld]: + + log=/var/lib/mysql/mysqld-query.log + +Mysqld then will, at some performance cost, log all queries into this +file. After a server crash, you can examine the queries from the time it +crashed and try to reproduce the crash with single queries (this might +not allways work, eg. if the crash is caused by some race condition). + +Note that this log file may become extremly large, so if you decide to +attach it whole to the bugzilla, don't forget to + + bzip2 -k /var/lib/mysql/mysqld-query.log + +and attach the bzipped file instead. + +2) Coredumps and Backtraces +--------------------------- +Another valuable information for the developers is the backtrace. The +easies way to get one is to let mysqld produce a coredump. Add the +following line to your /etc/my.cnf into section [mysqld]: + + core-file + + Note: this unfortunatelly doesn't work in SUSE Linux 10.1 and older. + On these systems, you need to run safe_mysqld directly under user + mysql: + + su - mysql + mysqld_safe --socket=/var/lib/mysql/mysql.sock \ + --datadir=/var/lib/mysql --core-file & + +The core file will be written to the /var/lib/mysql/ directory. I +suggest setting the kernel variable kernel.core_uses_pid to 1 + + sysctl -w kernel.core_uses_pid=1 + +so that the coredumps don't overwrite each other if you experience +multiple crashes. + +After you got the core file, install the gdb and mysql-debuginfo +packages and run + + gdb /usr/sbin/mysqld /var/lib/mysql/core + (gdb) bt + +Replace mysqld with the mysqld version you used (mysqld, mysqld-max or +mysqld-debug) and core with the actual name of the coredump. + +3) Trace files +-------------- +You'll need the mysqld-debug binary from the mysql-debug package to get +a trace file. Install the mysqld-debug package and the start mysqld +using following command: + + $ MYSQLD_DEBUG=yes rcmysql start + + Note: The init script doesn't automatically pick up the mysqld-debug + binary (as it does with mysqld-max), because it is expected to be used + just temporarily to help solving a particular problem. + +The init script will then start mysqld-debug and add the --core-file, +--log and --debug options for you. The query log will be stored in + + /var/lib/mysql/myqld-query.log + +and the trace file in + + /var/lib/mysql/mysqld.trace + +If you don't like the options set by the init script, just put your own +into /etc/my.cnf and the init script will honor it. For information +about the --debug option, see "The DBUG Package": +http://dev.mysql.com/doc/refman/5.0/en/the-dbug-package.html . + +The trace file will contain various debug information and function +calls/returns and will become _extremly_ huge after a while, so don't +attach it to bugzilla unless requested. + | ||
[+] | Added | baselibs.conf ^ |
@@ -0,0 +1,2 @@ +libmysqlclient16 +libmysqlclient_r16 | ||
[+] | Added | default_plugins.cnf ^ |
@@ -0,0 +1,4 @@ +[server] +plugin-load=blackhole=ha_blackhole.so +plugin-load=federated=ha_federated.so +plugin-load=archive=ha_archive.so | ||
Added | mysql-5.5.8.tar.bz2 ^ | |
[+] | Added | mysql.SuSEfirewall2 ^ |
@@ -0,0 +1,6 @@ +## Name: MySQL server +## Description: opens ports for MySQL in order to allow other hosts connect to it + +# space separated list of allowed TCP ports +TCP="3306" + | ||
[+] | Added | rc.mysql-multi ^ |
@@ -0,0 +1,530 @@ +#!/bin/bash +# Copyright (c) 1995-2011 SuSE Linux AG Nuernberg, Germany. +# +# Author: Lenz Grimmer +# Maintainer: Michal Hrusecky <mhrusecky@suse.cz> +# +# mysqld_multi extension added by Richard Bos, 2008 +# +# /etc/init.d/mysql +# +# and its symbolic link +# +# /usr/sbin/rcmysql +# +### BEGIN INIT INFO +# Provides: mysql +# Required-Start: $network $remote_fs +# Required-Stop: $network $remote_fs +# Default-Start: 2 3 5 +# Default-Stop: +# Short-Description: Start the MySQL database server +# Description: Start the MySQL database server +### END INIT INFO + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status +# rc_failed set local and overall rc status to failed +# rc_failed <num> set local and overall rc status to <num> +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +. /etc/rc.status + +# First reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - insufficient privilege +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# 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/^[^=]*=//'`" ;; + --log-error=*) log_error="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --user=*) mysql_daemon_user="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --group=*) mysql_daemon_group="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + esac + done +} + +wait_for_socket() +{ + local i + for((i=0; i<150; i++)); do + sleep 0.2 + test -S $1 && i='' && break + done + test -z "$i" || return 1 + return 0 +} + +# Don't run killproc -TERM, as it could send a SIGKILL as well, possibly +# resulting in database corruption. Run kill -TERM manually instead, wait +# approximately 300 seconds and fail if mysql doesn't respond. This will at +# least prevent the SIGKILL when doing 'rcmysql stop' manually. During system +# shutdown, we are out of luck... +# See https://bugzilla.novell.com/show_bug.cgi?id=223209 +kill_mysql () +{ + local pid exe + test -e "$pid_file" || return 7 # not running + pid=`cat "$pid_file"` || return 4 # insufficient privileges + if ! test -e /proc/version; then + mount -n -t proc proc /proc + test -e /proc/version || return 100 + fi + test -L "/proc/$pid/exe" || return 7 + exe=`readlink "/proc/$pid/exe"` || return 4 + test "`echo "$exe" | grep "^$MYSQLD"`" || return 7 + kill -STOP "$pid" + kill -TERM "$pid" || return 4 # suboptimal + kill -CONT "$pid" + for i in `seq 3000`; do + # mysqld removes its pid file + test -e "$pid_file" || return 0 + LC_ALL=C sleep 0.1 + done + test -e "$pid_file" || return 0 + return 1 +} + +# 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 's|^[[:blank:]]*\[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 + + [[ -x /usr/bin/mysqld_multi ]] || { + echo -n "MySQL: /usr/bin/mysqld_multi not found" + rc_failed 5; rc_status -v; rc_exit; + } + + case "$1" in + start) + + # FIXME: + # We assume a fresh install if the directory $datadir/mysql + # does not exist and create the privilege database + # if ! test -d $datadir/mysql; then + # echo -n "Creating MySQL privilege database... " + # mysql_install_db --user=$mysql_daemon_user --datadir=$datadir || { + # rc_failed; rc_status -v; rc_exit + # } + # fi + echo -n "Starting service multi MySQL " + mysqld_multi start + + # Remember status and be verbose + rc_status -v + ;; + + stop) + echo -n "Shutting down service multi MySQL " + mysqld_multi stop + + # Remember status and be verbose + rc_status -v + ;; + + try-restart) + ## 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) + "$MYSELF" status >/dev/null && "$MYSELF" restart + + # Remember status and be quiet + rc_status + ;; + + restart|force-reload) | ||
Added | ready ^ | |
[+] | Added | series ^ |
@@ -0,0 +1,15 @@ +mysql-community-server-5.1.31-shebang.patch +mysql-community-server-5.5.6-utf8-test-results.patch +mysql-community-server-5.1.36-hotcopy.patch +mysql-community-server-5.5.6-cnf.patch +mysql-community-server-5.5.8-group.patch +mysql-community-server-5.1.45-multi-configuration.patch +mysql-community-server-5.5.6-safe-process-in-bin.patch +mysql-community-server-5.1.46-logrotate.patch +mysql-community-server-5.5.6-strncat-overflow.patch +mysql-community-server-5.1.51-install_db-quiet.patch +mysql-community-server-5.1.51-myslq-test.patch +mysql-community-server-5.1.51-mysql_config.patch +mysql-community-server-5.1.51-mysqld_multi-features.patch +mysql-community-server-5.5.7-plugins-avoid-version.patch +mysql-community-server-5.1.51-upgrade-exit-status.patch | ||
[+] | Added | suse-test-run ^ |
@@ -0,0 +1,17 @@ +#!/usr/bin/perl +# +# Test the SUSE mysql(-Max) package using the MySQL testsuite + +my $id = getpwnam("mysql") or die "can't find user \"mysql\": $!"; +my $dir = "/usr/share/mysql-test/"; + +if ($< == 0) { + ($<, $>) = ($id, $id); + if ($< != $id || $> != $id) { + die "can't switch to user mysql(id $id): $!"; + } +} + +chdir($dir) or die "can't cd to $dir: $!"; +exec("./mysql-test-run.pl", "--big-test", @ARGV); +die "can't execute mysql-test-run.pl: $!"; |