diff options
Diffstat (limited to 'support-files')
30 files changed, 803 insertions, 346 deletions
diff --git a/support-files/MacOSX/Description.plist.sh b/support-files/MacOSX/Description.plist.sh index a41e5891ecc..03212dfdeff 100644 --- a/support-files/MacOSX/Description.plist.sh +++ b/support-files/MacOSX/Description.plist.sh @@ -1,21 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<!-- - Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---> <plist version="1.0"> <dict> <key>IFPkgDescriptionDeleteWarning</key> diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh index c6ec1edeac4..7df9c5ac710 100644 --- a/support-files/MacOSX/Info.plist.sh +++ b/support-files/MacOSX/Info.plist.sh @@ -1,21 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<!-- - Copyright (C) 2003, 2008 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---> <plist version="1.0"> <dict> <key>CFBundleGetInfoString</key> diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am index 4ee5b90263c..7d4384a2a56 100644 --- a/support-files/MacOSX/Makefile.am +++ b/support-files/MacOSX/Makefile.am @@ -1,11 +1,11 @@ # Copyright (C) 2003-2006 MySQL AB # -# This program is free software; you can redistribute it and/or +# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 # of the License. # -# This program is distributed in the hope that it will be useful, +# This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. @@ -52,6 +52,3 @@ SUFFIXES = .sh -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ $< > $@-t @MV@ $@-t $@ - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/support-files/MacOSX/MySQLCOM b/support-files/MacOSX/MySQLCOM index 4d55fb44ec0..9be5edb56f7 100755 --- a/support-files/MacOSX/MySQLCOM +++ b/support-files/MacOSX/MySQLCOM @@ -1,20 +1,4 @@ #!/bin/sh - -# Copyright (C) 2003, 2004 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # /Library/StartupItems/MySQLCOM/MySQLCOM # diff --git a/support-files/MacOSX/ReadMe.txt b/support-files/MacOSX/ReadMe.txt index b3dcba21705..d81ec1f66d6 100644 --- a/support-files/MacOSX/ReadMe.txt +++ b/support-files/MacOSX/ReadMe.txt @@ -1,8 +1,378 @@ -You can find information about how to install on Mac OS X at +2.7. Installing MySQL on Mac OS X - http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html + MySQL for Mac OS X is available in a number of different forms: -The MySQL Reference Manual is also available in various formats on -http://dev.mysql.com/doc; if you're interested in the DocBook XML -sources go to http://svn.mysql.com. + * Native Package Installer format, which uses the native Mac OS + X installer to walk you through the installation of MySQL. For + more information, see Section 2.7.1, "Installing MySQL Using + the Installation Package." You can use the package installer + with Mac OS X 10.3 and later, and available for both PowerPC + and Intel architectures, and both 32-bit and 64-bit + architectures. There is no Universal Binary available using + the package installation method. The user you use to perform + the installation must have administrator privileges. + + * Tar package format, which uses a file packaged using the Unix + tar and gzip commands. To use this method, you will need to + open a Terminal window. You do not need administrator + privileges using this method, as you can install the MySQL + server anywhere using this method. For more information on + using this method, you can use the generic instructions for + using a tarball, Section 2.2, "Installing MySQL from Generic + Binaries on Unix/Linux."You can use the package installer with + Mac OS X 10.3 and later, and available for both PowerPC and + Intel architectures, and both 32-bit and 64-bit architectures. + A Universal Binary, incorporating both Power PC and Intel + architectures and 32-bit and 64-bit binaries is available. + In addition to the core installation, the Package Installer + also includes Section 2.7.2, "Installing the MySQL Startup + Item" and Section 2.7.3, "Installing and Using the MySQL + Preference Pane," both of which simplify the management of + your installation. + + * Mac OS X server includes a version of MySQL as standard. If + you want to use a more recent version than that supplied with + the Mac OS X server release, you can make use of the package + or tar formats. For more information on using the MySQL + bundled with Mac OS X, see Section 2.7.4, "Using MySQL on Mac + OS X Server." + + For additional information on using MySQL on Mac OS X, see Section + 2.7.5, "MySQL Installation on Mac OS X Notes." + +2.7.1. Installing MySQL Using the Installation Package + + You can install MySQL on Mac OS X 10.3.x ("Panther") or newer + using a Mac OS X binary package in PKG format instead of the + binary tarball distribution. Please note that older versions of + Mac OS X (for example, 10.1.x or 10.2.x) are not supported by this + package. + + The package is located inside a disk image (.dmg) file that you + first need to mount by double-clicking its icon in the Finder. It + should then mount the image and display its contents. + +Note + + Before proceeding with the installation, be sure to shut down all + running MySQL server instances by either using the MySQL Manager + Application (on Mac OS X Server) or via mysqladmin shutdown on the + command line. + + When installing from the package version, you should also install + the MySQL Preference Pane, which will allow you to control the + startup and execution of your MySQL server from System + Preferences. For more information, see Section 2.7.3, "Installing + and Using the MySQL Preference Pane." + + When installing using the package installer, the files are + installed into a directory within /usr/local matching the name of + the installation version and platform. For example, the installer + file mysql-5.1.39-osx10.5-x86_64.pkg installs MySQL into + /usr/local/mysql-5.1.39-osx10.5-x86_64 . The installation layout + of the directory is as shown in the following table: + Directory Contents of Directory + bin Client programs and the mysqld server + data Log files, databases + docs Manual in Info format + include Include (header) files + lib Libraries + man Unix manual pages + mysql-test MySQL test suite + scripts Contains the mysql_install_db script + share/mysql Error message files + sql-bench Benchmarks + support-files Scripts and sample configuration files + /tmp/mysql.sock The location of the MySQL Unix socket + + During the package installer process, a symbolic link from + /usr/local/mysql to the version/platform specific directory + created during installation will be created automatically. + + 1. Download and open the MySQL package installer, which is + provided on a disk image (.dmg). Double-click to open the disk + image, which includes the main MySQL installation package, the + MySQLStartupItem.pkg installation package, and the + MySQL.prefPane. + + 2. Double-click on the MySQL installer package. It will be named + according to the version of MySQL you have downloaded. For + example, if you have downloaded MySQL 5.1.39, double-click + mysql-5.1.39-osx10.5-x86.pkg. + + 3. You will be presented with the openin installer dialog. Click + Continue to begihn installation. + MySQL Package Installer: Step 1 + + 4. A copy of the installation instructions and other important + information relevant to this installation are display. Click + Continue . + + 5. If you have downloaded the community version of MySQL, you + will be shown a copy of the relevent GNU General Public + License. Click Continue . + + 6. Select the drive you want to use to install the MySQL Startup + Item. The drive must have a valid, bootable, Mac OS X + operating system installed. Click Continue. + MySQL Package Installer: Step 4 + + 7. You will be asked to confirm the details of the installation, + including the space required for the installation. To change + the drive on which the startup item is installed you can click + either Go Back or Change Install Location.... To install the + startup item, click Install. + + 8. Once the installation has been completed successfully, you + will be given an Install Succeeded message. + + Once you have completed the basic installation, you must complete + the post-installation steps as specifed in Section 2.13, + "Post-Installation Setup and Testing." + + For convenience, you may also want to install the Section 2.7.2, + "Installing the MySQL Startup Item" and Section 2.7.3, "Installing + and Using the MySQL Preference Pane." + +2.7.2. Installing the MySQL Startup Item + + The MySQL Installation Package includes a startup item that can be + used to automatically startup and shutdown MySQL during boot. + + To install the MySQL Startup Item: + + 1. Download and open the MySQL package installer, which is + provided on a disk image (.dmg). Double-click to open the disk + image, which includes the main MySQL installation package, the + MySQLStartupItem.pkg installation package, and the + MySQL.prefPane. + + 2. Double-click on the MySQLStartItem.pkg file to start the + installation process. + + 3. You will be presented with the Install MySQL Startup Item + dialog. + MySQL Startup Item Installer: Step 1 + Click Continue to continue the installation process. + + 4. A copy of the installation instructions and other important + information relevant to this installation are display. Click + Continue . + + 5. Select the drive you want to use to install the MySQL Startup + Item. The drive must have a valid, bootable, Mac OS X + operating system installed. Click Continue. + MySQL Startup Item Installer: Step 3 + + 6. You will be asked to confirm the details of the installation. + To change the drive on which the startup item is installed you + can click either Go Back or Change Install Location.... To + install the startup item, click Install. + + 7. Once the installation has been completed successfully, you + will be given an Install Succeeded message. + MySQL Startup Item Installer: Step 5 + + The Startup Item for MySQL is installed into + /Library/StartupItems/MySQLCOM. The Startup Item installation adds + a variable MYSQLCOM=-YES- to the system configuration file + /etc/hostconfig. If you want to disable the automatic startup of + MySQL, simply change this variable to MYSQLCOM=-NO-. + + After the installation, you can start up MySQL by running the + following commands in a terminal window. You must have + administrator privileges to perform this task. + + If you have installed the Startup Item, use this command to start + the server: +shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start + + You may be prompted for your password to complete the startup. + + If you have installed the Startup Item, use this command to stop + the server: +shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop + + You may be prompted for your password to complete the shutdown. + +2.7.3. Installing and Using the MySQL Preference Pane + + The MySQL Package installer disk image also includes a custom + MySQL Preference Pane that enables you to start, stop and control + automated startup during boot of your MySQL installation. + + To install the MySQL Preference Pane: + + 1. Download and open the MySQL package installer package, which + is provided on a disk image (.dmg). Double-click to open the + disk image, which includes the main MySQL installation + package, the MySQLStartupItem.pkg installation package, and + the MySQL.prefPane. + + 2. Double click on MySQL.prefPane. The MySQL System Preferences + will open. + + 3. If this is the first time you have installed the preference + pane, you will be asked to confirm installation and whether + you want to install the preference pane for all users, or only + the current user. To install the preference pane for all users + you will need administrator privileges. If necessary, you will + be prompted for the username and password for a user with + administrator privileges. + + 4. If you already have the MySQL Preference Pane installed, you + will be asked to confirm whether you want to overwrite the + existing MySQL Preference Pane. + +Note + + The MySQL Preference Pane only starts and stops MySQL installation + installed from the MySQL package installation that have been + installed in the default location. + + Once the MySQL Preference Pane has been installed, you can control + your MySQL server instance using the preference pane. To use the + preference pane, open the System Preferences... from the Apple + menu. Select the MySQL preference pane by clicking on the MySQL + logo within the Other section of the preference panes list. + MySQL Preference Pane + + The MySQL Preference Pane shows the current status of the MySQL + server, showing stopped (in red) if the server is not running and + running (in green) if the server has already been started. The + preference pane will also show the current setting for whether the + MySQL server has been set to start up automatically. + + * To start MySQL using the preference pane: + Click Start MySQL Server. You may be prompted for the username + and password of a user with administrator privileges to start + the MySQL server. + + * To stop MySQL using the preference pane: + Click Stop MySQL Server. You may be prompted for the username + and password of a user with administrator privileges to + shutdown the MySQL server. + + * To automatically start the MySQL server when the system boots: + Check the checkbox next to Automatically Start MySQL Server on + Startup. + + * To disable the automatic starting of the MySQL server when the + system boots: + Uncheck the checkbox next to Automatically Start MySQL Server + on Startup. + + You can close the System Preferences... once you have completed + your settings. + +2.7.4. Using MySQL on Mac OS X Server + + If you are running Mac OS X Server, a version of MySQL should + already be installed. The following table shows the versions of + MySQL that ship with Mac OS X Server versions. + Mac OS X Server Version MySQL Version + 10.2-10.2.2 3.23.51 + 10.2.3-10.2.6 3.23.53 + 10.3 4.0.14 + 10.3.2 4.0.16 + 10.4.0 4.1.10a + 10.5.0 5.0.45 + 10.6.0 5.0.82 + + The installation layout of MySQL on Mac OS X Server is as shown in + the table below: + Directory Contents of Directory + /usr/bin Client programs + /var/mysql Log files, databases + /usr/libexec The mysqld server + /usr/share/man Unix manual pages + /usr/share/mysql/mysql-test MySQL test suite + /usr/share/mysql Contains the mysql_install_db script + /var/mysql/mysql.sock The location of the MySQL Unix socket + +Note + + The MySQL server bundled with Mac OS X Server does not include the + MySQL client libraries and header files required if you want to + access and use MySQL from a third-party driver, such as Perl DBI + or PHP. For more information on obtaining and installing MySQL + libraries, see Mac OS X Server version 10.5: MySQL libraries + available for download (http://support.apple.com/kb/TA25017). + Alternatively, you can ignore the bundled MySQL server and install + MySQL from the package or tarball installation. + + For more information on managing the bundled MySQL instance in Mac + OS X Server 10.5, see Mac OS X Server: Web Technologies + Administration For Version 10.5 Leopard + (http://images.apple.com/server/macosx/docs/Web_Technologies_Admin + _v10.5.pdf). For more information on managing the bundled MySQL + instance in Mac OS X Server 10.6, see Mac OS X Server: Web + Technologies Administration Version 10.6 Snow Leopard + (http://manuals.info.apple.com/en_US/WebTech_v10.6.pdf). + +2.7.5. MySQL Installation on Mac OS X Notes + + You should keep the following issues and notes in mind: + + * The default location for the MySQL Unix socket is different on + Mac OS X and Mac OS X Server depending on the installation + type you chose. The default locations by installation are as + follows: + + Package Installer from MySQL /tmp/mysql.sock + Tarball from MySQL /tmp/mysql.sock + MySQL Bundled with Mac OS X Server /var/mysql/mysql.sock + To prevent issues, you should either change the configuration + of the socket used within your application (for example, + changing php.ini), or you should configure the socket location + using a MySQL configuration file and the socket option. For + more information, see Section 5.1.2, "Server Command Options." + + * You may need (or want) to create a specific mysql user to own + the MySQL directory and data. On Mac OS X 10.4 and lower you + can do this by using the Netinfo Manager application, located + within the Utilities folder within the Applications folder. On + Mac OS X 10.5 and later you can do this through the Directory + Utility. From Mac OS X 10.5 and later (including Mac OS X + Server 10.5) the mysql should already exist. For use in single + user mode, an entry for _mysql (note the underscore prefix) + should already exist within the system /etc/passwd file. + + * Due to a bug in the Mac OS X package installer, you may see + this error message in the destination disk selection dialog: +You cannot install this software on this disk. (null) + If this error occurs, simply click the Go Back button once to + return to the previous screen. Then click Continue to advance + to the destination disk selection again, and you should be + able to choose the destination disk correctly. We have + reported this bug to Apple and it is investigating this + problem. + + * Because the MySQL package installer installs the MySQL + contents into a version and platform specific directory, you + can use this to upgrade and migrate your database between + versions. You will need to either copy the data directory from + the old version to the new version, or alternatively specify + an alternative datadir value to set location of the data + directory. + + * You might want to add aliases to your shell's resource file to + make it easier to access commonly used programs such as mysql + and mysqladmin from the command line. The syntax for bash is: +alias mysql=/usr/local/mysql/bin/mysql +alias mysqladmin=/usr/local/mysql/bin/mysqladmin + For tcsh, use: +alias mysql /usr/local/mysql/bin/mysql +alias mysqladmin /usr/local/mysql/bin/mysqladmin + Even better, add /usr/local/mysql/bin to your PATH environment + variable. You can do this by modifying the appropriate startup + file for your shell. For more information, see Section 4.2.1, + "Invoking MySQL Programs." + + * After you have copied over the MySQL database files from the + previous installation and have successfully started the new + server, you should consider removing the old installation + files to save disk space. Additionally, you should also remove + older versions of the Package Receipt directories located in + /Library/Receipts/mysql-VERSION.pkg. diff --git a/support-files/MacOSX/StartupItem.Description.plist b/support-files/MacOSX/StartupItem.Description.plist index 1e0d975e0f2..e8ceb1ee062 100644 --- a/support-files/MacOSX/StartupItem.Description.plist +++ b/support-files/MacOSX/StartupItem.Description.plist @@ -1,21 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<!-- - Copyright (C) 2003, 2004 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---> <plist version="1.0"> <dict> <key>IFPkgDescriptionDeleteWarning</key> diff --git a/support-files/MacOSX/StartupItem.Info.plist b/support-files/MacOSX/StartupItem.Info.plist index 7e348c4adec..f403fbe7e84 100644 --- a/support-files/MacOSX/StartupItem.Info.plist +++ b/support-files/MacOSX/StartupItem.Info.plist @@ -1,21 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<!-- - Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---> <plist version="1.0"> <dict> <key>CFBundleGetInfoString</key> diff --git a/support-files/MacOSX/StartupItem.postinstall b/support-files/MacOSX/StartupItem.postinstall index ddbd9732a5c..f6f6f46f211 100755 --- a/support-files/MacOSX/StartupItem.postinstall +++ b/support-files/MacOSX/StartupItem.postinstall @@ -1,20 +1,4 @@ #!/bin/sh - -# Copyright (C) 2003 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # postinstall script for the MySQL Startup Item Installation package # diff --git a/support-files/MacOSX/StartupParameters.plist.sh b/support-files/MacOSX/StartupParameters.plist.sh index 35bc5a4f647..f5620c73f5f 100644 --- a/support-files/MacOSX/StartupParameters.plist.sh +++ b/support-files/MacOSX/StartupParameters.plist.sh @@ -1,21 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<!-- - Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---> <plist version="1.0"> <dict> <key>Description</key> diff --git a/support-files/MacOSX/mwar-wrapper b/support-files/MacOSX/mwar-wrapper index 53624931b3b..4bc5153e7ef 100755 --- a/support-files/MacOSX/mwar-wrapper +++ b/support-files/MacOSX/mwar-wrapper @@ -1,20 +1,5 @@ #!/bin/sh -# Copyright (C) 2005 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # This script can only create a library, not take it apart # again to AR files diff --git a/support-files/MacOSX/mwcc-wrapper b/support-files/MacOSX/mwcc-wrapper index 162b2e24479..914578aca1d 100755 --- a/support-files/MacOSX/mwcc-wrapper +++ b/support-files/MacOSX/mwcc-wrapper @@ -1,20 +1,5 @@ #!/bin/sh -# Copyright (C) 2005 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - if [ -z "$CWINSTALL" ] ; then echo "ERROR: You need to source 'mwvars' to set CWINSTALL and other variables" exit 1 diff --git a/support-files/MacOSX/postflight.sh b/support-files/MacOSX/postflight.sh index 1e55c542c89..451eb65e0d7 100644 --- a/support-files/MacOSX/postflight.sh +++ b/support-files/MacOSX/postflight.sh @@ -1,22 +1,4 @@ #!/bin/sh - -# Copyright (C) 2003, 2005 MySQL AB -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA - # # postflight - this script will be executed after the MySQL PKG # installation has been performed. diff --git a/support-files/MacOSX/preflight.sh b/support-files/MacOSX/preflight.sh index a214008cf52..700d0640a9e 100644 --- a/support-files/MacOSX/preflight.sh +++ b/support-files/MacOSX/preflight.sh @@ -1,22 +1,4 @@ #!/bin/sh - -# Copyright (C) 2003, 2005 MySQL AB -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA - # # preflight - this script will be executed before the MySQL PKG # installation will be performed. diff --git a/support-files/Makefile.am b/support-files/Makefile.am index efe4c399860..6b5dfbd7d8d 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -54,7 +54,9 @@ pkgsupp_DATA = my-small.cnf \ ndb-config-2-node.ini pkgsupp_SCRIPTS = mysql.server \ - mysqld_multi.server + mysqld_multi.server \ + binary-configure \ + mysql-log-rotate aclocaldir = $(datadir)/aclocal aclocal_DATA = mysql.m4 @@ -128,6 +130,3 @@ SUFFIXES = .sh -e 's!@''PERL_DATA_DUMPER''@!@PERL_DATA_DUMPER@!' \ $< > $@-t @MV@ $@-t $@ - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/support-files/RHEL4-SElinux/Makefile.am b/support-files/RHEL4-SElinux/Makefile.am index 960a1fea554..2f9a12ea0c5 100644 --- a/support-files/RHEL4-SElinux/Makefile.am +++ b/support-files/RHEL4-SElinux/Makefile.am @@ -18,6 +18,3 @@ ## Process this file with automake to create Makefile.in EXTRA_DIST = mysql.fc mysql.te - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/support-files/RHEL4-SElinux/mysql.fc b/support-files/RHEL4-SElinux/mysql.fc index b44795e6f8c..0db0ccf6e68 100644 --- a/support-files/RHEL4-SElinux/mysql.fc +++ b/support-files/RHEL4-SElinux/mysql.fc @@ -1,18 +1,3 @@ -# Copyright (C) 2007 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # MySQL Database Server # diff --git a/support-files/RHEL4-SElinux/mysql.te b/support-files/RHEL4-SElinux/mysql.te index 922389305ea..b050fa7b1a6 100644 --- a/support-files/RHEL4-SElinux/mysql.te +++ b/support-files/RHEL4-SElinux/mysql.te @@ -1,17 +1,3 @@ -# Copyright (C) 2007 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA policy_module(mysql,1.0.0) diff --git a/support-files/ccfilter b/support-files/ccfilter new file mode 100644 index 00000000000..e2957cd3228 --- /dev/null +++ b/support-files/ccfilter @@ -0,0 +1,104 @@ +#! /usr/bin/perl + +# Post-processor for compiler output to filter out warnings matched in +# support-files/compiler_warnings.supp. This makes it easier to check +# that no new warnings are introduced without needing to submit a build +# for Buildbot. +# +# Use by setting CC="ccfilter gcc" CXX="ccfilter gcc" before ./configure. +# +# By default, just filters the output for suppressed warnings. If the +# FAILONWARNING environment variable is set, then instead will fail the +# compile on encountering a non-suppressed warnings. + +use strict; +use warnings; + +my $suppressions; + +open STDOUT_COPY, ">&STDOUT" + or die "Failed to dup stdout: $!]n"; + +my $pid= open(PIPE, '-|'); + +if (!defined($pid)) { + die "Error: Cannot fork(): $!\n"; +} elsif (!$pid) { + # Child. + # actually want to send the STDERR to the parent, not the STDOUT. + # So shuffle things around a bit. + open STDERR, ">&STDOUT" + or die "Child: Failed to dup pipe to parent: $!\n"; + open STDOUT, ">&STDOUT_COPY" + or die "Child: Failed to dup parent stdout: $!\n"; + close STDOUT_COPY; + exec { $ARGV[0] } @ARGV; + die "Child: exec() failed: $!\n"; +} else { + # Parent. + close STDOUT_COPY; + my $cwd= qx(pwd); + chomp($cwd); + while (<PIPE>) { + my $line= $_; + if (/^(.*?):([0-9]+): [Ww]arning: (.*)$/) { + my ($file, $lineno, $msg)= ($1, $2, $3); + $file= "$cwd/$file"; + + next + if check_if_suppressed($file, $lineno, $msg); + die "$line\nGot warning, terminating.\n" + if $ENV{FAILONWARNING}; + print STDERR $line; + next; + } + + print STDERR $line; + } + close(PIPE); +} + +exit 0; + +sub check_if_suppressed { + my ($file, $lineno, $msg)= @_; + load_suppressions() unless defined($suppressions); + for my $s (@$suppressions) { + my ($file_re, $msg_re, $start, $end)= @$s; + if ($file =~ /$file_re/ && + $msg =~ /$msg_re/ && + (!defined($start) || $start <= $lineno) && + (!defined($end) || $end >= $lineno)) { + return 1; + } + } + return undef; +} + +sub load_suppressions { + # First find the suppressions file, might be we need to move up to + # the base directory. + my $path = "support-files/compiler_warnings.supp"; + my $exists; + for (1..10) { + $exists= -f $path; + last if $exists; + $path= '../'. $path; + } + die "Error: Could not find suppression file (out of source dir?).\n" + unless $exists; + + $suppressions= []; + open "F", "<", $path + or die "Error: Could not read suppression file '$path': $!\n"; + while (<F>) { + # Skip comment and empty lines. + next if /^\s*(\#.*)?$/; + die "Invalid syntax in suppression file '$path', line $.:\n$_" + unless /^\s*(.+?)\s*:\s*(.+?)\s*(?:[:]\s*([0-9]+)(?:-([0-9]+))?\s*)?$/; + my ($file_re, $line_re, $start, $end)= ($1, $2, $3, $4); + $end = $start + if defined($start) && !defined($end); + push @$suppressions, [$file_re, $line_re, $start, $end]; + } +} diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index 048f74aea91..a56c39b51a0 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -1,24 +1,10 @@ -# Copyright (C) 2007 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # This file contains compiler warnings that can # be ignored for various reasons. # integer.cpp: .*control reaches end of non-void function.*: 1288-1427 +integer.cpp: .*no return statement in function returning non-void.*: 1288-1427 DictTabInfo.cpp : .*invalid access to non-static.* DictTabInfo.cpp : .*macro was used incorrectly.* DbdihMain.cpp : .*unused variable.* : 6666-7013 @@ -38,8 +24,29 @@ sql_yacc.cc : .*switch statement contains 'default' but no 'case' labels.* # Things that can be ignored in InnoDB # pars0grm.tab.c: .*'yyerrorlab' : unreferenced label.* +pars0grm.c: 'yyerrorlab' : unreferenced label _flex_tmp.c: .*not enough actual parameters for macro 'yywrap'.* +lexyy.c : not enough actual parameters for macro 'yywrap' pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.* +btr/btr0cur\.c: .*value computed is not used.*: 3175-3375 +include/buf0buf\.ic: unused parameter .*mtr.* +fil/fil0fil\.c: pointer targets in passing argument.*differ in signedness +fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199 +fil/fil0fil\.c: unused parameter +log/log0recv\.c: unused variable +os/os0file\.c: unused parameter +os/os0file\.c: pointer targets in assignment differ in signedness +handler/i_s\.cc: unused variable +sync/sync0rw\.c: unused parameter +sync/sync0sync\.c: unused parameter +sync/sync0sync\.c: unused variable +ut/ut0ut\.c: ignoring return value of +srv/srv0srv\.c: value computed is not used +buf/buf0buf\.c: .*block_mutex.* might be used uninitialized +btr/btr0cur\.c: null argument where non-null required: 1800-3000 +btr/btr0btr\.c: null argument where non-null required: 2500-3000 +ibuf/ibuf0ibuf.c: null argument where non-null required: 700-1000 +fsp0fsp\.c: result of 32-bit shift implicitly converted to 64 bits # # bdb is not critical to keep up to date @@ -54,6 +61,34 @@ db_vrfy.c : .*comparison is always false due to limited range of data type.* # readline is not maintained by us # .*/cmd-line-utils/readline/.* : .* +readline\.c : unused parameter +term\.c : unused parameter +vi\.c : unused parameter +common\.c : unused parameter +term\.c : .* + + +# +# Ignore some warnings in libevent, which is not maintained by us. +# +.*/extra/libevent/.* : .*unused parameter.* +.*/extra/libevent/select\.c : .*comparison between signed and unsigned.* : 270-280 +signal\.c : .*unused parameter.* + +# +# Ignore warnings from system libraries +# +/usr/share/aclocal/audiofile.m4 : .* + +# +# Ignore strict-aliasing warnings (for now) +# +.*: break strict-aliasing rules + +# +# Ignore not important declaration warnings +# +.*: only defines private constructors and has no friends # # Ignore all conversion warnings on windows 64 @@ -76,6 +111,12 @@ db_vrfy.c : .*comparison is always false due to limited range of data type.* .* : conversion from '.*size_t' to 'UINT'.* .* : conversion from '.*size_t' to 'uInt'.* .* : conversion from '.*size_t' to 'uint16'.* +.* : The following environment variables were not found.* +.* : no public symbols found; archive member will be inaccessible +.* : DESCRIPTION statement not supported + +# Ignore uninitialized local variables on windows +.* : uninitialized local variable .* used # # The following should be fixed by the ndb team @@ -85,16 +126,60 @@ db_vrfy.c : .*comparison is always false due to limited range of data type.* .*/ndb/.* : .*defined but not used.* # +# Maria warning that is ok in debug builds +# +storage/maria/ma_pagecache.c: .*'info_check_pin' defined but not used + +# +# Pbxt +# +xaction_xt\.cc: may be used uninitialized in this function +lock_xt\.cc : uninitialized local variable .* used +restart_xt\.cc : dereferencing pointer .* does break strict-aliasing + +# +# I think these are due to mix of C and C++. +# +storage/pbxt/ : typedef.*was ignored in this declaration +ha_pbxt\.cc : variable.*might be clobbered by.*longjmp +table_xt\.cc : variable.*might be clobbered by.*longjmp + +# +# Yassl +include/runtime.hpp: .*pure_error.* +.*/extra/yassl/.*taocrypt/.*: comparison with string literal +.*/extra/yassl/taocrypt/src/blowfish\.cpp: array subscript is above array bounds +.*/extra/yassl/taocrypt/src/file\.cpp: ignoring return value +.*/extra/yassl/taocrypt/src/integer\.cpp: control reaches end of non-void function +mySTL/algorithm\.hpp: is used uninitialized in this function + +# +# Groff warnings on OpenSUSE. +# +.*/dbug/.*(groff|<standard input>) : .* + +# # Unexplanable (?) stuff # listener.cc : .*conversion from 'SOCKET' to 'int'.* net_serv.cc : .*conversion from 'SOCKET' to 'int'.* +# +# Ignorable warnings from header files +# +backward_warning\.h : This file includes at least one + # allow a little moving space for the warning below -mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600 +mi_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600 +ma_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 550-650 # # Wrong compiler warnings # .* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.* -ctype-simple.c : .*unary minus operator applied to unsigned type, result still unsigned.* +ctype-simple\.c : .*unary minus operator applied to unsigned type, result still unsigned.* + +# Wrong warning due to GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478 +regexec\.c : passing argument 3 of.*matcher.* discards qualifiers from pointer target type +libmysql\.c: passing argument 2 of .*memcpy.* discards qualifiers from pointer target type : 3000-4000 +storage/xtradb/dict/dict0dict\.c : passing argument 1 of .*strcpy.* discards qualifiers from pointer target type : 2500-3500 diff --git a/support-files/config.huge.ini.sh b/support-files/config.huge.ini.sh index f98074828a7..f98074828a7 100755..100644 --- a/support-files/config.huge.ini.sh +++ b/support-files/config.huge.ini.sh diff --git a/support-files/config.medium.ini.sh b/support-files/config.medium.ini.sh index 1de7f64912e..1de7f64912e 100755..100644 --- a/support-files/config.medium.ini.sh +++ b/support-files/config.medium.ini.sh diff --git a/support-files/config.small.ini.sh b/support-files/config.small.ini.sh index 0af60e5dc91..0af60e5dc91 100755..100644 --- a/support-files/config.small.ini.sh +++ b/support-files/config.small.ini.sh diff --git a/support-files/magic b/support-files/magic index 9844142ba93..b3f3b3ea29d 100644 --- a/support-files/magic +++ b/support-files/magic @@ -4,12 +4,23 @@ # 0 beshort 0xfe01 MySQL table definition file >2 byte x Version %d -0 belong&0xffffff00 0xfefe0300 MySQL MISAM index file +0 belong&0xffffff00 0xfefe0700 MySQL MyISAM index file >3 byte x Version %d -0 belong&0xffffff00 0xfefe0700 MySQL MISAM compressed data file +0 belong&0xffffff00 0xfefe0800 MySQL MyISAM compressed data file +>3 byte x Version %d +0 belong&0xffffff00 0xfefe0900 MySQL Maria index file +>3 byte x Version %d +0 belong&0xffffff00 0xfefe0A00 MySQL Maria compressed data file >3 byte x Version %d 0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file >3 byte x Version %d 0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file >3 byte x Version %d 0 string \376bin MySQL replication log +0 belong&0xffffff00 0xfefe0b00 +>4 string MARIALOG MySQL Maria transaction log file +>>3 byte x Version %d +0 belong&0xffffff00 0xfefe0c00 +>4 string MACF MySQL Maria control file +>>3 byte x Version %d + diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh index 81786d20917..896b139273b 100644 --- a/support-files/my-huge.cnf.sh +++ b/support-files/my-huge.cnf.sh @@ -1,13 +1,15 @@ -# Example MySQL config file for very large systems. +# Example MariaDB config file for very large systems. # # This is for a large system with memory of 1G-2G where the system runs mainly -# MySQL. +# MariaDB. # -# MySQL programs look for option files in a set of +# MariaDB programs look for option files in a set of # locations which depend on the deployment platform. # You can copy this option file to one of those -# locations. For information about these locations, see: -# http://dev.mysql.com/doc/mysql/en/option-files.html +# locations. For information about these locations, do: +# 'my_print_defaults --help' and see what is printed under +# Default options are read from the following files in the given order: +# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -25,7 +27,7 @@ socket = @MYSQL_UNIX_ADDR@ [mysqld] port = @MYSQL_TCP_PORT@ socket = @MYSQL_UNIX_ADDR@ -skip-locking +skip-external-locking key_buffer_size = 384M max_allowed_packet = 1M table_open_cache = 512 @@ -38,6 +40,9 @@ query_cache_size = 32M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 +# Point the following paths to a dedicated disk +#tmpdir = /tmp/ + # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. @@ -116,7 +121,7 @@ server-id = 1 # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = @localstatedir@ #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@ +o#innodb_log_group_home_dir = @localstatedir@ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 384M diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh index ce958a34454..7cc88e2bb12 100644 --- a/support-files/my-innodb-heavy-4G.cnf.sh +++ b/support-files/my-innodb-heavy-4G.cnf.sh @@ -4,15 +4,17 @@ #END CONFIG INFO # -# This is a MySQL example config file for systems with 4GB of memory -# running mostly MySQL using InnoDB only tables and performing complex +# This is a MariaDB example config file for systems with 4GB of memory +# running mostly MariaDB using InnoDB only tables and performing complex # queries with few connections. # -# MySQL programs look for option files in a set of +# MariaDB programs look for option files in a set of # locations which depend on the deployment platform. # You can copy this option file to one of those -# locations. For information about these locations, see: -# http://dev.mysql.com/doc/mysql/en/option-files.html +# locations. For information about these locations, do: +# 'my_print_defaults --help' and see what is printed under +# Default options are read from the following files in the given order: +# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -23,11 +25,11 @@ # # -# The following options will be read by MySQL client applications. -# Note that only client applications shipped by MySQL are guaranteed -# to read this section. If you want your own MySQL client program to +# The following options will be read by MariaDB client applications. +# Note that only client applications shipped by MariaDB are guaranteed +# to read this section. If you want your own MariaDB client program to # honor these values, you need to specify it as an option during the -# MySQL client library initialization. +# MariaDB client library initialization. # [client] #password = [your_password] @@ -37,7 +39,7 @@ socket = @MYSQL_UNIX_ADDR@ # *** Application-specific options follow here *** # -# The MySQL server +# The MariaDB server # [mysqld] @@ -46,7 +48,7 @@ port = @MYSQL_TCP_PORT@ socket = @MYSQL_UNIX_ADDR@ # back_log is the number of connections the operating system can keep in -# the listen queue, before the MySQL connection manager thread has +# the listen queue, before the MariaDB connection manager thread has # processed them. If you have a very high connection rate and experience # "connection refused" errors, you might need to increase this value. # Check your OS documentation for the maximum value of this parameter. @@ -62,14 +64,14 @@ back_log = 50 # (via the "enable-named-pipe" option) will render mysqld useless! #skip-networking -# The maximum amount of concurrent sessions the MySQL server will +# The maximum amount of concurrent sessions the MariaDB server will # allow. One of these connections will be reserved for a user with # SUPER privileges to allow the administrator to login even if the # connection limit has been reached. max_connections = 100 # Maximum amount of errors allowed per host. If this limit is reached, -# the host will be blocked from connecting to the MySQL server until +# the host will be blocked from connecting to the MariaDB server until # "FLUSH HOSTS" has been run or the server was restarted. Invalid # passwords and other errors during the connect phase result in # increasing this value. See the "Aborted_connects" status variable for @@ -171,7 +173,7 @@ query_cache_limit = 2M ft_min_word_len = 4 # If your system supports the memlock() function call, you might want to -# enable this option while running MySQL to keep it locked in memory and +# enable this option while running MariaDB to keep it locked in memory and # to avoid potential swapping out in case of high memory pressure. Good # for performance. #memlock @@ -181,11 +183,11 @@ ft_min_word_len = 4 default-storage-engine = MYISAM # Thread stack size to use. This amount of memory is always reserved at -# connection time. MySQL itself usually needs no more than 64K of +# connection time. MariaDB itself usually needs no more than 64K of # memory, while if you use your own stack hungry UDF functions or your # OS requires more stack for some operations, you might need to set this # to a higher value. -thread_stack = 192K +thread_stack = 240K # Set the default transaction isolation level. Levels available are: # READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE @@ -216,7 +218,7 @@ binlog_format=mixed #log # Print warnings to the error log file. If you have any problem with -# MySQL you should enable logging of warnings and examine the error log +# MariaDB you should enable logging of warnings and examine the error log # for possible explanations. #log_warnings @@ -229,17 +231,24 @@ slow_query_log # All queries taking more than this amount of time (in seconds) will be # trated as slow. Do not use "1" as a value here, as this will result in -# even very fast queries being logged from time to time (as MySQL +# even very fast queries being logged from time to time (as MariaDB # currently measures time with second accuracy only). long_query_time = 2 +# The directory used by MySQL for storing temporary files. For example, +# it is used to perform disk based large sorts, as well as for internal +# and explicit temporary tables. It might be good to put it on a +# swapfs/tmpfs filesystem, if you do not create very large temporary +# files. Alternatively you can put it on dedicated disk. You can +# specify multiple paths here by separating them by ";" - they will then +# be used in a round-robin fashion. +#tmpdir = /tmp # *** Replication related settings - # Unique server identification number between 1 and 2^32-1. This value # is required for both master and slave hosts. It defaults to 1 if -# "master-host" is not set, but will MySQL will not function as a master +# "master-host" is not set, but will MariaDB will not function as a master # if it is omitted. server-id = 1 @@ -320,13 +329,13 @@ key_buffer_size = 32M # This buffer is allocated when a bulk insert is detected. bulk_insert_buffer_size = 64M -# This buffer is allocated when MySQL needs to rebuild the index in +# This buffer is allocated when MariaDB needs to rebuild the index in # REPAIR, OPTIMIZE, ALTER table statements as well as in LOAD DATA INFILE # into an empty table. It is allocated per thread so be careful with # large settings. myisam_sort_buffer_size = 128M -# The maximum size of the temporary file MySQL is allowed to use while +# The maximum size of the temporary file MariaDB is allowed to use while # recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE. # If the file-size would be bigger than this, the index will be created # through the key cache (which is slower). @@ -342,7 +351,7 @@ myisam_recover # *** INNODB Specific options *** -# Use this option if you have a MySQL server with InnoDB support enabled +# Use this option if you have a MariaDB server with InnoDB support enabled # but you do not plan to use it. This will save memory and disk space # and speed up some things. #skip-innodb @@ -373,7 +382,7 @@ innodb_buffer_pool_size = 2G innodb_data_file_path = ibdata1:10M:autoextend # Set this option if you would like the InnoDB tablespace files to be -# stored in another location. By default this is the MySQL datadir. +# stored in another location. By default this is the MariaDB datadir. #innodb_data_home_dir = <directory> # Number of IO threads to use for async IO operations. This value is @@ -423,7 +432,7 @@ innodb_log_file_size = 256M # enough. innodb_log_files_in_group = 3 -# Location of the InnoDB log files. Default is the MySQL datadir. You +# Location of the InnoDB log files. Default is the MariaDB datadir. You # may wish to point it to a dedicated hard drive or a RAID1 volume for # improved performance #innodb_log_group_home_dir diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh index 7460660025c..6f8dab0b0e2 100644 --- a/support-files/my-large.cnf.sh +++ b/support-files/my-large.cnf.sh @@ -1,19 +1,21 @@ -# Example MySQL config file for large systems. +# Example MariaDB config file for large systems. # # This is for a large system with memory = 512M where the system runs mainly -# MySQL. +# MariaDB. # -# MySQL programs look for option files in a set of +# MariaDB programs look for option files in a set of # locations which depend on the deployment platform. # You can copy this option file to one of those -# locations. For information about these locations, see: -# http://dev.mysql.com/doc/mysql/en/option-files.html +# locations. For information about these locations, do: +# 'my_print_defaults --help' and see what is printed under +# Default options are read from the following files in the given order: +# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. -# The following options will be passed to all MySQL clients +# The following options will be passed to all MariaDB clients [client] #password = your_password port = @MYSQL_TCP_PORT@ @@ -21,11 +23,11 @@ socket = @MYSQL_UNIX_ADDR@ # Here follows entries for some specific programs -# The MySQL server +# The MariaDB server [mysqld] port = @MYSQL_TCP_PORT@ socket = @MYSQL_UNIX_ADDR@ -skip-locking +skip-external-locking key_buffer_size = 256M max_allowed_packet = 1M table_open_cache = 256 @@ -38,6 +40,9 @@ query_cache_size= 16M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 +# Point the following paths to different dedicated disks +#tmpdir = /tmp/ + # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh index f15fce8f15f..19ab8dfb151 100644 --- a/support-files/my-medium.cnf.sh +++ b/support-files/my-medium.cnf.sh @@ -1,20 +1,22 @@ -# Example MySQL config file for medium systems. +# Example MariaDB config file for medium systems. # -# This is for a system with little memory (32M - 64M) where MySQL plays -# an important part, or systems up to 128M where MySQL is used together with +# This is for a system with little memory (32M - 64M) where MariaDB plays +# an important part, or systems up to 128M where MariaDB is used together with # other programs (such as a web server) # -# MySQL programs look for option files in a set of +# MariaDB programs look for option files in a set of # locations which depend on the deployment platform. # You can copy this option file to one of those -# locations. For information about these locations, see: -# http://dev.mysql.com/doc/mysql/en/option-files.html +# locations. For information about these locations, do: +# 'my_print_defaults --help' and see what is printed under +# Default options are read from the following files in the given order: +# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. -# The following options will be passed to all MySQL clients +# The following options will be passed to all MariaDB clients [client] #password = your_password port = @MYSQL_TCP_PORT@ @@ -22,11 +24,11 @@ socket = @MYSQL_UNIX_ADDR@ # Here follows entries for some specific programs -# The MySQL server +# The MariaDB server [mysqld] port = @MYSQL_TCP_PORT@ socket = @MYSQL_UNIX_ADDR@ -skip-locking +skip-external-locking key_buffer_size = 16M max_allowed_packet = 1M table_open_cache = 64 @@ -36,6 +38,9 @@ read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M +# Point the following paths to different dedicated disks +#tmpdir = /tmp/ + # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh index 0fb4ec86d43..7d1adaaafde 100644 --- a/support-files/my-small.cnf.sh +++ b/support-files/my-small.cnf.sh @@ -26,7 +26,7 @@ socket = @MYSQL_UNIX_ADDR@ [mysqld] port = @MYSQL_TCP_PORT@ socket = @MYSQL_UNIX_ADDR@ -skip-locking +skip-external-locking key_buffer_size = 16K max_allowed_packet = 1M table_open_cache = 4 @@ -34,7 +34,7 @@ sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K -thread_stack = 128K +thread_stack = 240K # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 87198fc9cf5..d8725b98ca5 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -77,7 +77,12 @@ else datadir="$basedir/data" fi sbindir="$basedir/sbin" - libexecdir="$basedir/libexec" + if test -f "$basedir/bin/mysqld" + then + libexecdir="$basedir/bin" + else + libexecdir="$basedir/libexec" + fi fi # datadir_set is used to determine if datadir was set (and so should be @@ -126,6 +131,12 @@ parse_server_arguments() { datadir="$basedir/data" fi sbindir="$basedir/sbin" + if test -f "$basedir/bin/mysqld" + then + libexecdir="$basedir/bin" + else + libexecdir="$basedir/libexec" + fi libexecdir="$basedir/libexec" ;; --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` @@ -434,9 +445,36 @@ case "$mode" in fi fi ;; - *) + 'configtest') + # Safeguard (relative paths, core dumps..) + cd $basedir + echo $echo_n "Testing MySQL configuration syntax" + daemon=$bindir/mysqld + if test -x $libexecdir/mysqld + then + daemon=$libexecdir/mysqld + elif test -x $sbindir/mysqld + then + daemon=$sbindir/mysqld + elif test -x `which mysqld` + then + daemon=`which mysqld` + else + log_failure_msg "Unable to locate the mysqld binary!" + exit 1 + fi + help_out=`$daemon --help 2>&1`; r=$? + if test "$r" != 0 ; then + log_failure_msg "$help_out" + log_failure_msg "There are syntax errors in the server configuration. Please fix them!" + else + log_success_msg "Syntax OK" + fi + exit $r + ;; + *) # usage - echo "Usage: $0 {start|stop|restart|reload|force-reload|status} [ MySQL server options ]" + echo "Usage: $0 {start|stop|restart|reload|force-reload|status|configtest} [ MySQL server options ]" exit 1 ;; esac diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 28f2b0f773a..390eb95e49b 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,5 @@ -# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, Oracle and/or its affiliates. +# Copyright (c) 2010 Monty Program Ab # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,7 +23,7 @@ # change these, has to be exactly as is. %define mysql_old_vendor MySQL AB %define mysql_vendor_2 Sun Microsystems, Inc. -%define mysql_vendor Oracle and/or its affiliates +%define mysql_vendor Oracle and/or its affiliates & Monty Program Ab %define mysql_version @VERSION@ @@ -102,14 +103,24 @@ %{?_with_cluster:%define CLUSTER_BUILD 1} %{!?_with_cluster:%define CLUSTER_BUILD 0} +# use "rpmbuild --with maria" or "rpm --define '_with_maria 1'" (for RPM 3.x) +# to build with maria support (off by default) +%{?_with_maria:%define MARIA_BUILD 1} +%{!?_with_maria:%define MARIA_BUILD 0} + ############################################################################## # Product definitions - set for a "community" package ############################################################################## %define server_suffix -community %define package_suffix -community +%if %{MARIA_BUILD} +%define ndbug_comment MariaDB, a community SQL server based on the MySQL Server with Maria (GPL) +%define debug_comment MySQL Community Server - Debug [Maria] (GPL) +%else %define ndbug_comment MySQL Community Server (GPL) %define debug_comment MySQL Community Server - Debug (GPL) +%endif %define commercial 0 %define EMBEDDED_BUILD 1 %define PARTITION_BUILD 1 @@ -129,14 +140,15 @@ ############################################################################## Name: MySQL -Summary: MySQL: a very fast and reliable SQL database server +Summary: MariaDB: a very fast and reliable SQL database server Group: Applications/Databases Version: @MYSQL_U_SCORE_VERSION@ Release: %{release} -License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{mysql_license} license as shown in the Description field. -Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz -URL: http://www.mysql.com/ -Packager: %{mysql_vendor} Product Engineering Team <build@mysql.com> +License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. Under %{mysql_license} license as shown in the Description field. + +Source: http://http://askmonty.org/wiki/MariaDB:Download +URL: http://www.askmonty.org/ +Packager: Monty Program Ab Vendor: %{mysql_vendor} Provides: msqlormysql MySQL-server mysql BuildRequires: ncurses-devel @@ -148,49 +160,52 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # From the manual %description -The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, -and robust SQL (Structured Query Language) database server. MySQL Server -is intended for mission-critical, heavy-load production systems as well -as for embedding into mass-deployed software. MySQL is a trademark of -%{mysql_vendor} +The MariaDB(TM) software delivers a very fast, multi-threaded, +multi-user, and robust SQL (Structured Query Language) database server +that is binary compatible with MySQL(TM). MariaDB Server is intended +for mission-critical, heavy-load production systems as well as for +embedding into mass-deployed software. + +MariaDB is a trademark of Monty Program Ab. -Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. +Copyright (c) 2000, 2011 @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. +Use is subject to license terms. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license. -The MySQL web site (http://www.mysql.com/) provides the latest -news and information about the MySQL software. Also please see the -documentation and the manual for more information. +The MariaDB web sites (http://askmonty.org && http://mariadb.org/) +provides the latest news and information about the MariaDB +software. ############################################################################## # Sub package definition ############################################################################## %package server -Summary: MySQL: a very fast and reliable SQL database server +Summary: MariaDB: a very fast and reliable SQL database server Group: Applications/Databases Requires: coreutils grep procps /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig Provides: msqlormysql mysql-server mysql MySQL Obsoletes: MySQL mysql mysql-server %description server -The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, -and robust SQL (Structured Query Language) database server. MySQL Server -is intended for mission-critical, heavy-load production systems as well -as for embedding into mass-deployed software. MySQL is a trademark of -%{mysql_vendor} +The MariaDB(TM) software delivers a very fast, multi-threaded, +multi-user, and robust SQL (Structured Query Language) database server +that is binary compatible with MySQL(TM). MariaDB Server is intended +for mission-critical, heavy-load production systems as well as for +embedding into mass-deployed software. -Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. +Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license. -The MySQL web site (http://www.mysql.com/) provides the latest -news and information about the MySQL software. Also please see the -documentation and the manual for more information. +The MariaDB web sites (http://askmonty.org && http://mariadb.org/) +provides the latest news and information about the MariaDB +software. -This package includes the MySQL server binary +This package includes the MariaDB server binary %if %{INNODB_BUILD} (configured including InnoDB) %endif @@ -208,7 +223,8 @@ Obsoletes: mysql-client Provides: mysql-client %description client -This package contains the standard MySQL clients and administration tools. +This package contains the standard MariaDB & MySQL clients and +administration tools. %{see_base} @@ -216,7 +232,7 @@ This package contains the standard MySQL clients and administration tools. %if %{CLUSTER_BUILD} %package ndb-storage -Summary: MySQL - ndbcluster storage engine +Summary: MariaDB - ndbcluster storage engine Group: Applications/Databases %description ndb-storage @@ -229,7 +245,7 @@ computers that should store ndbcluster table data. # ------------------------------------------------------------------------------ %package ndb-management -Summary: MySQL - ndbcluster storage engine management +Summary: MariaDB - ndbcluster storage engine management Group: Applications/Databases %description ndb-management @@ -242,7 +258,7 @@ one computer in the cluster. # ------------------------------------------------------------------------------ %package ndb-tools -Summary: MySQL - ndbcluster storage engine basic tools +Summary: MariaDB - ndbcluster storage engine basic tools Group: Applications/Databases %description ndb-tools @@ -253,7 +269,7 @@ This package contains ndbcluster storage engine basic tools. # ------------------------------------------------------------------------------ %package ndb-extra -Summary: MySQL - ndbcluster storage engine extra tools +Summary: MariaDB - ndbcluster storage engine extra tools Group: Applications/Databases %description ndb-extra @@ -267,40 +283,40 @@ They should be used with caution. %package test Requires: %{name}-client perl -Summary: MySQL - Test suite +Summary: MariaDB - Test suite Group: Applications/Databases Provides: mysql-test Obsoletes: mysql-bench mysql-test AutoReqProv: no %description test -This package contains the MySQL regression test suite. +This package contains the MariaDB regression test suite. %{see_base} # ------------------------------------------------------------------------------ %package devel -Summary: MySQL - Development header files and libraries +Summary: MariaDB - Development header files and libraries Group: Applications/Databases Provides: mysql-devel Obsoletes: mysql-devel %description devel This package contains the development header files and libraries -necessary to develop MySQL client applications. +necessary to develop MariaDB client applications. %{see_base} # ------------------------------------------------------------------------------ %package shared -Summary: MySQL - Shared libraries +Summary: MariaDB - Shared libraries Group: Applications/Databases %description shared This package contains the shared libraries (*.so*) which certain -languages and applications need to dynamically load and use MySQL. +languages and applications need to dynamically load and use MariaDB. # ------------------------------------------------------------------------------ @@ -308,19 +324,19 @@ languages and applications need to dynamically load and use MySQL. %package embedded Requires: %{name}-devel -Summary: MySQL - embedded library +Summary: MariaDB - embedded library Group: Applications/Databases Obsoletes: mysql-embedded %description embedded -This package contains the MySQL server as an embedded library. +This package contains the MariaDB server as an embedded library. -The embedded MySQL server library makes it possible to run a -full-featured MySQL server inside the client application. +The embedded MariaDB server library makes it possible to run a +full-featured MariaDB server inside the client application. The main benefits are increased speed and more simple management for embedded applications. -The API is identical for the embedded MySQL version and the +The API is identical for the embedded MariaDB version and the client/server version. %{see_base} @@ -376,6 +392,26 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ LDFLAGS=\"$LDFLAGS\" \ ./configure \ $* \ + --with-innodb \ +%if %{CLUSTER_BUILD} + --with-ndbcluster \ +%else + --without-ndbcluster \ +%endif + --with-archive-storage-engine \ + --with-csv-storage-engine \ + --with-blackhole-storage-engine \ +%if %{FEDERATED_BUILD} + --with-federated-storage-engine \ +%else + --without-federated-storage-engine \ +%endif +%if %{MARIA_BUILD} + --with-plugin-maria \ + --with-maria-tmp-tables \ +%endif + --with-partition \ + --with-big-tables \ --with-mysqld-ldflags='-static' \ --with-client-ldflags='-static' \ --enable-assembler \ @@ -688,7 +724,8 @@ A manual upgrade is required. - Run the 'mysql_upgrade' program This is a brief description of the upgrade process. Important details -can be found in the MySQL manual, in the Upgrading section. +can be found in the MySQL manual, in the Upgrading section and in the +MariaDB knowledge base at http://www.askmonty.org ****************************************************************** HERE exit 1 @@ -874,11 +911,8 @@ if [ "$SERVER_TO_START" = "true" ] ; then sleep 2 fi -#echo "Thank you for installing the MySQL Community Server! For Production -#systems, we recommend MySQL Enterprise, which contains enterprise-ready -#software, intelligent advisory services, and full production support with -#scheduled service packs and more. Visit www.mysql.com/enterprise for more -#information." +#echo "Thank you for installing the MariaDB Server!" +#echo "For more information about MariaDB, visit www.mariadb.org." # Collect an upgrade history ... echo "Upgrade/install finished at `date`" >> $STATUS_FILE @@ -1103,6 +1137,7 @@ fi %files devel %defattr(-, root, root, 0755) +%doc mysql-release-%{mysql_version}/EXCEPTIONS-CLIENT %doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* %attr(755, root, root) %{_bindir}/mysql_config %dir %attr(755, root, root) %{_includedir}/mysql @@ -1188,6 +1223,10 @@ fi not in an RPM upgrade. This affects both the "mkdir" and the call of "mysql_install_db". +* Sun Feb 20 2011 Monty + Updated texts to include information about MariaDB + Added back EXCEPTIONS-CLIENT + * Thu Feb 03 2011 Joerg Bruehe <joerg.bruehe@oracle.com> - Fix bug#56581: If an installation deviates from the default file locations |